primaryKeySQL
PRIMARY KEY(KCOL, KCOL) appended to end.SDriverDB2, SDriverDerby, SDriverHSQLH2, SDriverInformix, SDriverInterbase, SDriverMSSQL, SDriverMySQL, SDriverOracle, SDriverPostgres, SDriverSapDB, SDriverSybase, SQLiteDriver(Profiling suggests that memoising these generaters could produce a 5-10% improvement in bulk updates.)
There is now one driver instance per connection so one can say SSession.getDriver().setMyFavouriteParam(...)
SQL 92 standard data types, I think:- boolean, Character(n), character varying(n), date, float(p), real, double precission, smallint, int | integer, decimal(p,s), numeric(p,s), time, interval, timestamp with timezone,
protected voidaddNull(StringBuffer sql,
 SFieldScalar fld) voidappendColumnName(SFieldScalar field,
 StringBuffer buf) protected voidappendQuotedIdentifier(String ident,
 StringBuffer buf) protected voidappendQuotedIdentifier(String ident,
 StringBuffer buf,
 char quote) voidappendTableName(SRecordMeta table,
 StringBuffer buf) protected StringclauseSeparator(String indent) protected StringcolumnTypeSQL(SFieldScalar field,
 String defalt) protected StringcreateSequenceDDL(String name) createTableSQL(SRecordMeta<?> meta) CREATE TABLE for this table.protected StringdeleteSQL(SRecordMeta from,
 ArrayList where,
 SRecordInstance instance,
 Object[] keyMetaValues) protected Stringprotected StringdropSequenceDDL(String name) voiddropTableNoError(String table) protected StringforeignKeysSQL(SRecordMeta meta) FOREIGN KEY (FKCOL, FKCOL) REFERENCES FTABLE (KCOL,
 KCOL)
 appended to end.protected StringforUpdateSQL(boolean forUpdate) protected voidfromSQL(SRecordMeta from,
 SRecordMeta[] joinTables,
 StringBuffer res) protected longgenerateKeySelectMax(SRecordMeta rec,
 SFieldScalar keyFld) protected longgenerateKeySequence(SRecordMeta<?> rec,
 SFieldScalar keyFld) protected SDriver.OffsetStrategyprotected StringindexKeySQL(SRecordMeta meta) protected StringinsertSQL(ArrayList<SFieldScalar> updates,
 SRecordMeta from) protected StringjoinSQL(SRecordMeta[] joinTables) protected StringlimitSQL(long offset,
 long limit) protected voidmakeForeignKeyIndexSQL(SRecordMeta meta,
 int fx,
 SFieldReference fldRef,
 StringBuffer sbFkey,
 StringBuffer sbRefed,
 StringBuffer fkey) protected StringmapForeignKeys(SRecordMeta<?> meta,
 boolean foreignKey) intprotected StringpostColumnSQL(SFieldMeta field) protected StringpostFromSQL(boolean forUpdate) protected Stringprotected Stringprotected StringprimaryKeySQL(SRecordMeta<?> meta) PRIMARY KEY(KCOL, KCOL) appended to end.protected simpleorm.sessionjdbc.SQueryExecutequeryExecuteFactory(SSessionJdbc session,
 SQuery query) voidprotected StringselectSQL(SFieldScalar[] select,
 SRecordMeta<?> from,
 String join,
 String where,
 String orderBy,
 boolean forUpdate,
 simpleorm.sessionjdbc.SQueryExecute sps) protected StringselectSQL(SFieldScalar[] select,
 SRecordMeta from,
 SFieldScalar[] where,
 String orderBy,
 boolean forUpdate,
 simpleorm.sessionjdbc.SQueryExecute sps) booleanbooleanprotected StringupdateSQL(ArrayList<SFieldScalar> updates,
 SRecordMeta from,
 ArrayList<SFieldScalar> where,
 SRecordInstance instance,
 Object[] keyMetaValues) protected voidwhereSQL(StringBuffer ret,
 ArrayList<SFieldScalar> where,
 SRecordInstance instance,
 Object[] keyMetaValues) protected StringMY_COL VARCHAR(13) NOT NULL.CREATE TABLE for this table. Delegated from
 SRecord. This is split up into many sub-methods so that they can be
 selectively specialized by other drivers.MY_COL VARCHAR(13) NOT NULL.#SMANDATORYPRIMARY KEY(KCOL, KCOL) appended to end.FOREIGN KEY (FKCOL, FKCOL) REFERENCES FTABLE (KCOL,
 KCOL)
 appended to end.select and where are arrays
 of SFieldMetas. Returns SQL statement as a string.
 
This now quotes table and column names so that they become case independent.
sps is links to the SPreparedStatement object. It can have arbitrary properties set to provide fine control over the query. Examples include limits.
Oracle, Postgresql, and new in MS SQL 2005 support data versioning or snapshots. This means that repeatable read is achieved by caching the previous value read instead of using read locks. This approach makes it critical to add FOR UPDATE where appropriate or there is effectively no locking.
Indeed, in Oracle, you are guaranteed that several SELECTS will return the same value, but a subsequent SELECT FOR UPDATE in the same transaction may return a different value.
offset - number of rows to skiplimit - number of rows to retrieveupdates and where are SSArrayLists
 of SFieldMetas. Returns SQL statement as a string.updates and where are SSArrayLists
 of SFieldMetas. Returns SQL statement as a string.where are SSArrayLists of SFieldMetas. Returns
 SQL statement as a string.Defaults to BULK
## (There is scope to optimize this at some point so that one JDBC call can both generate the sequence number and insert a new record. But that means that the new record's key is not available until insert time which causes problems for foreign keys. Alternatively one can get batches of 10 (say) sequences at a time and then use an internal counter, but this will leave big holes in the sequence. Defer this to version 1.)