A few more tweaks and bugfixes:
- scope_identity only works for mssql, added a switch based on config,
- removed the nasty cast error (only visible on runtime, lol)
- removed id parameter from CreateInsertSQL (mysql returns 0 if you set the id explicitly)
- Tablename auto-set from DBxxx class attribute