Lightweight MySQL adapter and SQL generator