public class SDriverMySQL extends SDriver
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.
SDriver.OffsetStrategy
Constructor and Description |
---|
SDriverMySQL() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendQuotedIdentifier(java.lang.String ident,
java.lang.StringBuffer buf)
Wraps identifiers in "s to avoid reserved word issues.
|
protected java.lang.String |
driverName()
The driver name to be compared to getMetaData().getDriverName()
|
protected java.lang.String |
indexKeySQL(SRecordMeta meta)
Returns
INDEX (KCOL)
Apparantly MySQL needs the index to be created as part of the Create Table statement or it generates
errors. |
protected void |
makeForeignKeyIndexSQL(SRecordMeta meta,
int fx,
SFieldReference fldRef,
java.lang.StringBuffer sbFkey,
java.lang.StringBuffer sbRefed,
java.lang.StringBuffer fkey) |
protected java.lang.String |
postTablePostParenSQL(SRecordMeta meta)
Any other text to be added after the final ")"
|
boolean |
supportsLocking()
### This assuems their "innoDB" mode.
|
addNull, 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
protected java.lang.String driverName()
SDriver
driverName
in class SDriver
protected void appendQuotedIdentifier(java.lang.String ident, java.lang.StringBuffer buf)
SDriver
appendQuotedIdentifier
in class SDriver
protected java.lang.String postTablePostParenSQL(SRecordMeta meta)
postTablePostParenSQL
in class SDriver
public boolean supportsLocking()
supportsLocking
in class SDriver
protected java.lang.String indexKeySQL(SRecordMeta meta)
INDEX (KCOL)
Apparantly 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.
indexKeySQL
in class SDriver
protected void makeForeignKeyIndexSQL(SRecordMeta meta, int fx, SFieldReference fldRef, java.lang.StringBuffer sbFkey, java.lang.StringBuffer sbRefed, java.lang.StringBuffer fkey)
makeForeignKeyIndexSQL
in class SDriver