Package simpleorm.drivers
Class SDriverMySQL
java.lang.Object
simpleorm.sessionjdbc.SDriver
simpleorm.drivers.SDriverMySQL
This contains MySQL specific code.
 
CHAR/VARCHAR max size 255(!) Thence TEXT.
### pierrea@email.com suggests:- (Needs testing) - SDriverMysql should have its own quoteIdentifier using ` instead of " (the character next to the 1 button above the tab button on a std US keyboard). The double quotation fails for the tablenames.
- SDriverMysql should be updated with a new driverName: MySQL-AB JDBC Driver. This is the driver name for all mysql jdbc drivers as posted on Mysql developer section. It might be worthwhile to change the driverName function to return an array of possible names instead of a single name, either that or subclass SDriverMysql to SDriverMMMysql and then include both.
- 
Nested Class SummaryNested classes/interfaces inherited from class simpleorm.sessionjdbc.SDriverSDriver.OffsetStrategy
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidappendQuotedIdentifier(String ident, StringBuffer buf) Wraps identifiers in "s to avoid reserved word issues.protected StringThe driver name to be compared to getMetaData().getDriverName()protected StringindexKeySQL(SRecordMeta meta) ReturnsINDEX (KCOL)Apparently MySQL needs the index to be created as part of the Create Table statement or it generates errors.protected voidmakeForeignKeyIndexSQL(SRecordMeta meta, int fx, SFieldReference fldRef, StringBuffer sbFkey, StringBuffer sbRefed, StringBuffer fkey) protected StringAny other text to be added after the final ")"boolean### This assuems their "innoDB" mode.Methods inherited from class simpleorm.sessionjdbc.SDriveraddNull, alterTableAddColumnSQL, alterTableDropColumnSQL, appendColumnName, appendQuotedIdentifier, appendTableName, clauseSeparator, columnTypeSQL, createSequenceDDL, createTableSQL, deleteSQL, dropSequenceDDL, dropTableNoError, foreignKeysSQL, forUpdateSQL, fromSQL, generateKeySelectMax, generateKeySequence, getLogger, getOffsetStrategy, getSession, insertSQL, joinSQL, limitSQL, mapForeignKeys, maxIdentNameLength, postColumnSQL, postFromSQL, postTablePreParenSQL, primaryKeySQL, queryExecuteFactory, registerDriver, selectSQL, selectSQL, supportsKeySequences, updateSQL, whereSQL, wholeColumnSQL
- 
Constructor Details- 
SDriverMySQLpublic SDriverMySQL()
 
- 
- 
Method Details- 
driverNameDescription copied from class:SDriverThe driver name to be compared to getMetaData().getDriverName()- Overrides:
- driverNamein class- SDriver
 
- 
appendQuotedIdentifierDescription copied from class:SDriverWraps identifiers in "s to avoid reserved word issues. (Override this for dbs that use different chars, eg [xxx] for MS-SQL. We do quote these days to avoid the endless problems with reserved words.- Overrides:
- appendQuotedIdentifierin class- SDriver
 
- 
postTablePostParenSQLAny other text to be added after the final ")"- Overrides:
- postTablePostParenSQLin class- SDriver
 
- 
supportsLockingpublic boolean supportsLocking()### This assuems their "innoDB" mode. Not true for traditional MySQL. Needs work.- Overrides:
- supportsLockingin class- SDriver
 
- 
indexKeySQLReturnsINDEX (KCOL)Apparently MySQL needs the index to be created as part of the Create Table statement or it generates errors. I don't think any other DBs support INDEX clauses.- Overrides:
- indexKeySQLin class- SDriver
 
- 
makeForeignKeyIndexSQLprotected void makeForeignKeyIndexSQL(SRecordMeta meta, int fx, SFieldReference fldRef, StringBuffer sbFkey, StringBuffer sbRefed, StringBuffer fkey) - Overrides:
- makeForeignKeyIndexSQLin class- SDriver
 
 
-