incremental work on command builder and sql writer.