Class FoxProDictionary

  • All Implemented Interfaces:
    JoinSyntaxes, Configurable, IdentifierConfiguration, ConnectionDecorator, LoggingConnectionDecorator.SQLWarningHandler

    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
    • ODBC driver cannot handle certain Aggregate functions.
    • Locking is extremeley unreliable. Multiple clients accessing single datastore may result in concurrency data validity errors.
    • Constructor Detail

      • FoxProDictionary

        public FoxProDictionary()
    • Method Detail

      • getString

        public java.lang.String getString​(java.sql.ResultSet rs,
                                          int column)
                                   throws java.sql.SQLException
        Description copied from class: DBDictionary
        Convert the specified column of the SQL ResultSet to the proper java type.
        Overrides:
        getString in class DBDictionary
        Throws:
        java.sql.SQLException
      • setNull

        public void setNull​(java.sql.PreparedStatement stmnt,
                            int idx,
                            int colType,
                            Column col)
                     throws java.sql.SQLException
        Description copied from class: DBDictionary
        Set null as a parameter to the statement. The column type will come from Types.
        Overrides:
        setNull in class DBDictionary
        Throws:
        java.sql.SQLException
      • appendSize

        protected java.lang.String appendSize​(Column col,
                                              java.lang.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).

        Some databases support "type modifiers", for example the unsigned "modifier" in MySQL. In these cases the size should go between the type and the "modifier", instead of after the modifier. For example CREATE table FOO ( myint INT (10) UNSIGNED . . .) instead of CREATE table FOO ( myint INT UNSIGNED (10) . . .). Type modifiers should be added to typeModifierSet in subclasses.

        Overrides:
        appendSize in class DBDictionary
      • getCreateIndexSQL

        public java.lang.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​(java.sql.DatabaseMetaData meta,
                                   java.lang.String catalog,
                                   java.lang.String schemaName,
                                   java.lang.String tableName,
                                   java.lang.String columnName,
                                   java.sql.Connection conn)
                            throws java.sql.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
        Throws:
        java.sql.SQLException
      • getPrimaryKeys

        public PrimaryKey[] getPrimaryKeys​(java.sql.DatabaseMetaData meta,
                                           java.lang.String catalog,
                                           java.lang.String schemaName,
                                           java.lang.String tableName,
                                           java.sql.Connection conn)
                                    throws java.sql.SQLException
        Description copied from class: DBDictionary
        Reflect on the schema to find primary keys for the given table pattern.
        Overrides:
        getPrimaryKeys in class DBDictionary
        Throws:
        java.sql.SQLException