dialects update + minnor refactoring
sql framework nearly OK.