kodo.jdbc.sql
Class FoxProDictionary
java.lang.Object
|
+--kodo.jdbc.sql.DBDictionary
|
+--kodo.jdbc.sql.FoxProDictionary
- All Implemented Interfaces:
- Configurable, ConnectionDecorator
- public class FoxProDictionary
- extends DBDictionary
Dictionary for Visual FoxPro via DataDirect SequeLink
and DataDirect ODBC FoxPro driver. This will not
work with any other combination of JDBC/ODBC server and
ODBC driver.
FoxPro has the following limitations:
- Primary Keys and indexes cannot be created via JDBC
- Only has fixed-length char fields: all strings must be
trimmed in result sets
- Does not have sufficient support for foreign keys
- Statement batching is unreliable, and is not supported
- ODBC driver cannot handle certain Aggregate functions.
- Locking is extremeley unreliable. Multiple clients
accessing single datastore may result in concurrency
data validity errors.
- Statement batching is unreliable, and is not supported
Fields inherited from class kodo.jdbc.sql.DBDictionary |
arrayTypeName, autoIncrementClause, autoIncrementTypeName, batchLimit, batchParameterLimit, bigintTypeName, binaryTypeName, bitTypeName, blobTypeName, catalogSeparator, CENTI, charTypeName, clobTypeName, conf, connected, CONS_NAME_AFTER, CONS_NAME_BEFORE, CONS_NAME_MID, constraintNameMode, createPrimaryKeys, datePrecision, dateTypeName, DECI, decimalTypeName, defaultSchemaName, distinctCountColumnSeparator, distinctTypeName, doubleTypeName, driverVendor, fixedSizeTypeNameSet, floatTypeName, forUpdateClause, initializationSQL, integerTypeName, javaObjectTypeName, joinSyntax, lastGeneratedKeyQuery, log, longVarbinaryTypeName, longVarcharTypeName, maxAutoIncrementNameLength, maxCharacterFieldLength, maxColumnNameLength, maxForeignKeyNameLength, maxIndexesPerTable, maxIndexNameLength, maxPrimaryKeyNameLength, maxTableNameLength, MICRO, MILLI, NANO, nullTypeName, numericTypeName, otherTypeName, platform, realTypeName, refTypeName, requiresAliasForSubselect, requiresAutoCommitForMetadata, reservedWords, reservedWordSet, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, schemaCase, SEC, simulateLocking, smallintTypeName, storageLimitationsFatal, storeCharsAsNumbers, storeLargeNumbersAsStrings, stringLengthFunction, structTypeName, supportsAlterTableWithAddColumn, supportsAlterTableWithDropColumn, supportsAutoIncrement, supportsCascadeDeleteAction, supportsDefaultDeleteAction, supportsDeferredConstraints, supportsForeignKeys, supportsHaving, supportsLockingWithDistinctClause, supportsLockingWithInnerJoin, supportsLockingWithMultipleTables, supportsLockingWithOrderClause, supportsLockingWithOuterJoin, supportsLockingWithSelectRange, supportsMultipleNontransactionalResultSets, supportsNullDeleteAction, supportsNullTableForGetColumns, supportsNullTableForGetImportedKeys, supportsNullTableForGetIndexInfo, supportsNullTableForGetPrimaryKeys, supportsQueryTimeout, supportsRestrictDeleteAction, supportsSchemaForGetColumns, supportsSchemaForGetTables, supportsSelectEndIndex, supportsSelectForUpdate, supportsSelectStartIndex, supportsSubselect, supportsTotalCountsForBatch, supportsUpdateCountsForBatch, systemSchemas, systemSchemaSet, systemTables, systemTableSet, tableForUpdateClause, tableTypes, timestampTypeName, timeTypeName, tinyintTypeName, toLowerCaseFunction, toUpperCaseFunction, useGetBestRowIdentifierForPrimaryKeys, useGetBytesForBlobs, useGetObjectForBlobs, useGetStringForClobs, useSchemaName, useSetBytesForBlobs, useSetStringForClobs, validationSQL, varbinaryTypeName, varcharTypeName, VENDOR_DATADIRECT, VENDOR_OTHER |
Method Summary |
protected String |
appendSize(Column col,
String typeName)
Helper method to add size properties to the specified type. |
Column[] |
getColumns(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
String columnName,
Connection conn)
Reflect on the schema to find columns matching the given table and
column patterns. |
String[] |
getCreateIndexSQL(Index index)
Return a series of SQL statements to create the given index. |
protected String |
getPrimaryKeyConstraintSQL(PrimaryKey pk)
Return the declaration SQL for the given primary key. |
PrimaryKey[] |
getPrimaryKeys(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
Connection conn)
Reflect on the schema to find primary keys for the given table pattern. |
String |
getString(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper
java type. |
void |
setNull(PreparedStatement stmnt,
int idx,
int colType)
Set the given value as a parameters to the statement. |
Methods inherited from class kodo.jdbc.sql.DBDictionary |
appendSelectPostRange, appendSelectPreRange, assertSupport, canBatch, canOuterJoin, connectedConfiguration, convertSchemaCase, decorate, endConfiguration, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getArray, getAsciiStream, getBigDecimal, getBigInteger, getBinaryStream, getBlob, getBlobObject, getBoolean, getByte, getBytes, getCatalogNameForMetadata, getChar, getCharacterStream, getClob, getClobString, getColumnNameForMetadata, getCreateTableSQL, getDate, getDate, getDeclareColumnSQL, getDouble, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropPrimaryKeySQL, getDropTableSQL, getFloat, getForeignKeyConstraintSQL, getFrom, getFromSelect, getFullName, getFullName, getGeneratedKey, getGeneratedKeySequenceName, getImportedKeys, getIndexInfo, getInt, getJDBCType, getLocale, getLong, getObject, getPreferredType, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getRef, getSchemaNameForMetadata, getSelects, getShort, getTableNameForMetadata, getTables, getTime, getTimestamp, getTypeName, getValidColumnName, getValidForeignKeyName, getValidIndexName, getValidPrimaryKeyName, getValidTableName, getWhere, indexOf, isSystemIndex, isSystemTable, makeNameValid, newColumn, newDataStoreException, newForeignKey, newIndex, newPrimaryKey, newTable, refSchemaComponents, replaceMapping, replaceMapping, replaceMappingFactory, replaceSchemaFactory, serialize, setArray, setAsciiStream, setBigDecimal, setBigInteger, setBinaryStream, setBlob, setBlobObject, setBoolean, setByte, setBytes, setChar, setCharacterStream, setClob, setClobString, setConfiguration, setDate, setDate, setDouble, setFloat, setInt, setJoinSyntax, setLocale, setLong, setObject, setRef, setShort, setString, setTime, setTimestamp, setUnknown, startConfiguration, storageWarning, substring, supportsLocking, supportsRandomAccessResultSet, toNativeJoin, toSelect, toSelect, toSelectCount, toSQL92Join, toTraditionalJoin |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FoxProDictionary
public FoxProDictionary()
getString
public String getString(ResultSet rs,
int column)
throws SQLException
- Description copied from class:
DBDictionary
- Convert the specified column of the SQL ResultSet to the proper
java type.
- Overrides:
getString
in class DBDictionary
setNull
public void setNull(PreparedStatement stmnt,
int idx,
int colType)
throws SQLException
- Description copied from class:
DBDictionary
- Set the given value as a parameters to the statement. The column
type will come from
Types
.
- Overrides:
setNull
in class DBDictionary
appendSize
protected String appendSize(Column col,
String typeName)
- Description copied from class:
DBDictionary
- Helper method to add size properties to the specified type.
If present, the string "{0}" will be replaced with the size definition;
otherwise the size definition will be appended to the type name.
If your database has column types that don't allow size definitions,
override this method to return the unaltered type name for columns of
those types (or add the type names to the
fixedSizeTypeNameSet
).
- Overrides:
appendSize
in class DBDictionary
getPrimaryKeyConstraintSQL
protected String getPrimaryKeyConstraintSQL(PrimaryKey pk)
- Description copied from class:
DBDictionary
- Return the declaration SQL for the given primary key. This method is
used from within
DBDictionary.getCreateTableSQL(kodo.jdbc.schema.Table)
and
DBDictionary.getAddPrimaryKeySQL(kodo.jdbc.schema.PrimaryKey)
. Returns
CONSTRAINT <pk name> PRIMARY KEY (<col list>)
by default.
- Overrides:
getPrimaryKeyConstraintSQL
in class DBDictionary
getCreateIndexSQL
public String[] getCreateIndexSQL(Index index)
- Description copied from class:
DBDictionary
- Return a series of SQL statements to create the given index. Returns
CREATE [UNIQUE] INDEX <index name> ON <table name>
(<col list>)
by default.
- Overrides:
getCreateIndexSQL
in class DBDictionary
getColumns
public Column[] getColumns(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
String columnName,
Connection conn)
throws SQLException
- Description copied from class:
DBDictionary
- Reflect on the schema to find columns matching the given table and
column patterns.
- Overrides:
getColumns
in class DBDictionary
getPrimaryKeys
public PrimaryKey[] getPrimaryKeys(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
Connection conn)
throws SQLException
- Description copied from class:
DBDictionary
- Reflect on the schema to find primary keys for the given table pattern.
- Overrides:
getPrimaryKeys
in class DBDictionary
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.