more work on pluggable sql flavors. tests pass.