Updated on 2024-06-13 GMT+08:00

JDBC API Reference

The DLI JDBC driver supports multiple APIs of the JDBC standard, but some APIs cannot be invoked by users. For example, when transaction-related API prepareCall is invoked, the SQLFeatureNotSupportedException exception is reported. For details about the APIs, see the JDBC official website https://docs.oracle.com/javase/8/docs/api/java/sql/package-summary.html.

Supported APIs

The following tables list the APIs supported by the DLI JDBC driver and provide remarks on possible incompatibilities with the JDBC standard.

  • Common signatures supported by Connection APIs
    • Statement createStatement()
    • PreparedStatement prepareStatement(String sql)
    • void close()
    • boolean isClosed()
    • DatabaseMetaData getMetaData()
    • PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
  • Common signatures supported by Driver APIs
    • Connection connect(String url, Properties info)
    • boolean acceptsURL(String url)
    • DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
  • Common signatures supported by Connection APIs
    • String getColumnClassName(int column)
    • int getColumnCount()
    • int getColumnDisplaySize(int column)
    • String getColumnLabel(int column)
    • String getColumnName(int column)
    • int getColumnType(int column)
    • String getColumnTypeName(int column)
    • int getPrecision(int column)
    • int getScale(int column)
    • boolean isCaseSensitive(int column)
  • Common signatures supported by Statement APIs
    • ResultSet executeQuery(String sql)
    • int executeUpdate(String sql)
    • boolean execute(String sql)
    • void close()
    • int getMaxRows()
    • void setMaxRows(int max)
    • int getQueryTimeout()
    • void setQueryTimeout(int seconds)
    • void cancel()
    • ResultSet getResultSet()
    • int getUpdateCount()
    • boolean isClosed()
  • Common signatures supported by PreparedStatement APIs
    • void clearParameters()
    • boolean execute()
    • ResultSet executeQuery()
    • int executeUpdate()
    • PreparedStatement Set methods
  • Common signatures supported by ResultSet APIs
    • int getRow()
    • boolean isClosed()
    • boolean next()
    • void close()
    • int findColumn(String columnLabel)
    • boolean wasNull()
    • Get methods
  • Common signatures supported by DatabaseMetaData APIs
    • ResultSet getCatalogs()

      DLI does not have the concept of Catalog, so an empty ResultSet is returned.

    • ResultSet getColumns(String catalog, String schemaPattern,

      String tableNamePattern, String columnNamePattern)

    • Connection getConnection()
    • getTables(String catalog, String schemaPattern,String tableNamePattern, String types[])

      This method does not use the Catalog parameter, and schemaPattern corresponds to the database concept of DLI.

    • ResultSet getTableTypes()
    • ResultSet getSchemas()
    • ResultSet getSchemas(String catalog, String schemaPattern)