|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.sql.DBDictionary org.apache.openjpa.jdbc.sql.MySQLDictionary
public class MySQLDictionary
Dictionary for MySQL.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.DBDictionary |
---|
DBDictionary.SerializedData |
Field Summary | |
---|---|
boolean |
driverDeserializesBlobs
Whether the driver automatically deserializes blobs. |
boolean |
optimizeMultiTableDeletes
Whether to inline multi-table bulk-delete operations into MySQL's combined DELETE FROM foo, bar, baz syntax. |
String |
tableType
The MySQL table type to use when creating tables; defaults to innodb. |
boolean |
useClobs
Whether to use clobs. |
Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes |
---|
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL |
Constructor Summary | |
---|---|
MySQLDictionary()
|
Method Summary | |
---|---|
protected void |
appendSelectRange(SQLBuffer buf,
long start,
long end)
If this dictionary can select ranges, use this method to append the range SQL. |
String[] |
getAddPrimaryKeySQL(PrimaryKey pk)
Return a series of SQL statements to add the given primary key to its table. |
Object |
getBlobObject(ResultSet rs,
int column,
JDBCStore store)
Convert the specified column of the SQL ResultSet to the proper java type. |
String[] |
getCreateTableSQL(Table table)
Return a series of SQL statements to create the given table, complete with columns. |
String[] |
getDeleteTableContentsSQL(Table[] tables)
Create SQL to delete the contents of the specified tables. |
String[] |
getDropIndexSQL(Index index)
Return a series of SQL statements to drop the given index. |
protected String |
getForeignKeyConstraintSQL(ForeignKey fk)
Return the declaration SQL for the given foreign key, or null if it is not supported. |
int |
getPreferredType(int type)
Return the preferred Types type for the given one. |
protected Column |
newColumn(ResultSet colMeta)
Create a new column from the information in the schema metadata. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public String tableType
public boolean useClobs
public boolean driverDeserializesBlobs
public boolean optimizeMultiTableDeletes
DELETE FROM foo, bar, baz
syntax.
Defaults to false, since this may fail in the presence of InnoDB tables
with foreign keys.
http://dev.mysql.com/doc/refman/5.0/en/delete.html
Constructor Detail |
---|
public MySQLDictionary()
Method Detail |
---|
public String[] getCreateTableSQL(Table table)
DBDictionary
getCreateTableSQL
in class DBDictionary
public String[] getDropIndexSQL(Index index)
DBDictionary
DROP INDEX <index name>
by default.
getDropIndexSQL
in class DBDictionary
public String[] getAddPrimaryKeySQL(PrimaryKey pk)
DBDictionary
ALTER TABLE <table name> ADD
<pk cons sql >
by default.
getAddPrimaryKeySQL
in class DBDictionary
protected String getForeignKeyConstraintSQL(ForeignKey fk)
DBDictionary
DBDictionary.getCreateTableSQL(org.apache.openjpa.jdbc.schema.Table)
and DBDictionary.getAddForeignKeySQL(org.apache.openjpa.jdbc.schema.ForeignKey)
. Returns
CONSTRAINT <cons name> FOREIGN KEY (<col list>)
REFERENCES <foreign table> (<col list>)
[ON DELETE <action>] [ON UPDATE <action>]
by default.
getForeignKeyConstraintSQL
in class DBDictionary
public String[] getDeleteTableContentsSQL(Table[] tables)
DBDictionary
getDeleteTableContentsSQL
in class DBDictionary
protected void appendSelectRange(SQLBuffer buf, long start, long end)
DBDictionary
appendSelectRange
in class DBDictionary
protected Column newColumn(ResultSet colMeta) throws SQLException
DBDictionary
newColumn
in class DBDictionary
SQLException
public Object getBlobObject(ResultSet rs, int column, JDBCStore store) throws SQLException
DBDictionary
getBlobObject
in class DBDictionary
SQLException
public int getPreferredType(int type)
DBDictionary
Types
type for the given one. Returns
the given type by default.
getPreferredType
in class DBDictionary
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |