Interface JDBCContext


  • public interface JDBCContext
    Properties for a JDBC data source instance.
    Since:
    3.0
    Author:
    Magnus Rylander
    • Method Detail

      • getDataSourceName

        String getDataSourceName()
        Returns the name of the data source instance.
        Returns:
        a data source name
        Since:
        3.0
      • getDataSourceID

        Guid getDataSourceID()
        Returns the ID of the data source instance.
        Returns:
        a data source ID.
        Since:
        3.0
      • getConnection

        Connection getConnection()
                          throws SQLException
        Returns a database connection.
        Returns:
        a JDBC connection
        Throws:
        SQLException - if a database error occurs
        Since:
        3.0
      • getTypeName

        String getTypeName()
        Returns the name of the JDBC type configuration.
        Returns:
        a type name
        Since:
        3.0
      • getTypeSettings

        JDBCTypeSettings getTypeSettings()
        Returns the JDBC type configuration.
        Returns:
        a JDBCTypeSettings instance
        Since:
        3.0
      • getMetadataProvider

        JDBCMetadataProvider getMetadataProvider()
        Returns a new instance of a metadata provider.
        Returns:
        a JDBCMetadataProvider instance
        Since:
        3.0
      • getSQLRuntime

        SQLRuntime getSQLRuntime()
        Returns a new instance of a SQL Runtime.
        Returns:
        a SQLRuntime instance
        Since:
        3.0
      • getFetchSize

        int getFetchSize​(int columnCount)
        Returns the fetch size that specifies the amount of data fetched with each database round trip for a query.

        The fetch size is the number of rows calculated from the given column count.

        Parameters:
        columnCount - number of columns in each row
        Returns:
        a fetch size
        Since:
        3.0
      • getBatchSize

        int getBatchSize​(int columnCount)
        Returns the batch size that specifies the amount of data in each batch update.

        The batch size is the number of operation calculated from the given column count.

        Parameters:
        columnCount - number of columns in each operation
        Returns:
        a batch size
        Since:
        3.0
      • isReadOnly

        boolean isReadOnly()
        Tells if the data source is readonly.

        A data source that are readonly indicates that no SQL commands other than queries are allowed, i.e. use of temporary tables are prohibited.

        Returns:
        true if read only, false otherwise
        Since:
        3.0
      • resolveTable

        DataSourceTable resolveTable​(DataSourceTable tableAlias)
        Resolves a table alias to a real source table.
        Parameters:
        tableAlias - a DataSourceTable value
        Returns:
        the resolved DataSourceTable if the provided table was a known table alias, otherwise, a copy of provided DataSourceTable is returned.
        Since:
        10.1
      • getTableAliases

        MetadataItem[] getTableAliases​(String catalog,
                                       String schema)
        Returns all table aliases for tables in the specified catalog and schema.
        Parameters:
        catalog - a catalog name, if null
        schema - schema
        Returns:
        MetadataItem[]
        Since:
        3.0