public class MySqlDialect extends GenericSqlDialect
Copyright 2010 Partner Software, Inc.
| Constructor and Description |
|---|
MySqlDialect() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
cogTypeToSqlType(CogType type)
Helper for converting from a CogType to a Sql flavor specific data type.
|
java.lang.String |
createTable(CogSchema schema,
CogStructureType tableType)
Returns complete Sql create table statement.
|
java.lang.String |
describeTable(java.lang.String tableName,
java.lang.String databaseName)
Returns sql for describing a table.
|
java.lang.String |
describleTableColumnKey()
Returns key name for column name found in describe table
ResultSet |
java.lang.String |
describleTableTypeKey()
Returns key name for column type found in describe table
ResultSet |
boolean |
isDescribeTableSupported()
Returns true if this flavor of sql supports describe table
via sql statments.
|
boolean |
isListDatabasesSupported()
Returns true if this flavor of sql supports list databases
via sql statements.
|
boolean |
isListTablesSupported()
Returns true if this flavor of sql supports list tables
via sql statements.
|
java.lang.String |
listDatabases()
Returns sql for listing databases
If
isDescribeTableSupported() returns false, should
throw an UnsupportedOperationException |
java.lang.String |
listTables(java.lang.String databaseName)
Returns sql for listing table names in database.
|
java.lang.String |
selectSql(DataRecordQuery query,
CogStructureType tableType)
Returns complete Sql select statement.
|
java.lang.String |
sqlTypeToCogType(java.lang.String sqlType)
Helper for converting from a Sql data type to a Cog value type.
|
addColumn, alterColumn, createTableFromSelect, dbToObject, dropColumn, handleSorts, isAlterColumnSupported, listFields, objectToDb, objectToDbSql, parseFilter, renameTablepublic java.lang.String selectSql(DataRecordQuery query, CogStructureType tableType)
SqlDialectselectSql in interface SqlDialectselectSql in class GenericSqlDialectquery - - Query describing select statement.tableType - - CogStructureType defining table. Type name is assumed to be table name.public java.lang.String cogTypeToSqlType(CogType type)
SqlDialectcogTypeToSqlType in interface SqlDialectcogTypeToSqlType in class GenericSqlDialecttype - - CogType to convert to Sql type.public java.lang.String sqlTypeToCogType(java.lang.String sqlType)
SqlDialectsqlTypeToCogType in interface SqlDialectsqlTypeToCogType in class GenericSqlDialectsqlType - - String representing sql type (ie, varchar(255))public java.lang.String createTable(CogSchema schema, CogStructureType tableType)
SqlDialectcreateTable in interface SqlDialectcreateTable in class GenericSqlDialectschema - - Schema defining column types.tableType - - CogStructureType defining table. Type name is assumed to be table name.public boolean isListTablesSupported()
SqlDialectisListTablesSupported in interface SqlDialectisListTablesSupported in class GenericSqlDialectpublic boolean isDescribeTableSupported()
SqlDialectisDescribeTableSupported in interface SqlDialectisDescribeTableSupported in class GenericSqlDialectpublic boolean isListDatabasesSupported()
SqlDialectisListDatabasesSupported in interface SqlDialectisListDatabasesSupported in class GenericSqlDialectpublic java.lang.String listDatabases()
SqlDialectisDescribeTableSupported() returns false, should
throw an UnsupportedOperationExceptionlistDatabases in interface SqlDialectlistDatabases in class GenericSqlDialectpublic java.lang.String listTables(java.lang.String databaseName)
SqlDialectisListTablesSupported() returns false, throws
an UnsupportedOperationExceptionlistTables in interface SqlDialectlistTables in class GenericSqlDialectdatabaseName - - Name of database to list tables frompublic java.lang.String describeTable(java.lang.String tableName,
java.lang.String databaseName)
SqlDialectisDescribeTableSupported() returns false, throws
an UnsupportedOperationExceptiondescribeTable in interface SqlDialectdescribeTable in class GenericSqlDialecttableName - - Name of table to describedatabaseName - - Name of database containing tablepublic java.lang.String describleTableColumnKey()
SqlDialectResultSetdescribleTableColumnKey in interface SqlDialectdescribleTableColumnKey in class GenericSqlDialectpublic java.lang.String describleTableTypeKey()
SqlDialectResultSetdescribleTableTypeKey in interface SqlDialectdescribleTableTypeKey in class GenericSqlDialect