云服务器内容精选
-
java.sql.PreparedStatement java.sql.PreparedStatement是预处理语句接口。 表1 对java.sql.PreparedStatement的支持情况 方法名 返回值类型 支持JDBC4 支持计划外ALT clearParameters() void Yes Yes execute() boolean Yes Yes executeQuery() ResultSet Yes Yes excuteUpdate() int Yes Yes executeLargeUpdate() long No Yes getMetaData() ResultSetMetaData Yes Yes getParameterMetaData() ParameterMetaData Yes Yes setArray(int parameterIndex, Array x) void Yes Yes setAsciiStream(int parameterIndex, InputStream x, int length) void Yes Yes setBinaryStream(int parameterIndex, InputStream x) void Yes No setBinaryStream(int parameterIndex, InputStream x, int length) void Yes No setBinaryStream(int parameterIndex, InputStream x, long length) void Yes No setBlob(int parameterIndex, InputStream inputStream) void Yes No setBlob(int parameterIndex, InputStream inputStream, long length) void Yes No setBlob(int parameterIndex, Blob x) void Yes No setCharacterStream(int parameterIndex, Reader reader) void Yes No setCharacterStream(int parameterIndex, Reader reader, int length) void Yes No setClob(int parameterIndex, Reader reader) void Yes No setClob(int parameterIndex, Reader reader, long length) void Yes No setClob(int parameterIndex, Clob x) void Yes No setDate(int parameterIndex, Date x, Calendar cal) void Yes Yes setNull(int parameterIndex, int sqlType) void Yes Yes setNull(int parameterIndex, int sqlType, String typeName) void Yes Yes setObject(int parameterIndex, Object x) void Yes No setObject(int parameterIndex, Object x, int targetSqlType) void Yes No setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) void Yes No setSQLXML(int parameterIndex, SQLXML xmlObject) void Yes Yes setTime(int parameterIndex, Time x) void Yes Yes setTime(int parameterIndex, Time x, Calendar cal) void Yes Yes setTimestamp(int parameterIndex, Timestamp x) void Yes Yes setTimestamp(int parameterIndex, Timestamp x, Calendar cal) void Yes Yes setUnicodeStream(int parameterIndex, InputStream x, int length) void Yes Yes setURL(int parameterIndex, URL x) void Yes Yes setBoolean(int parameterIndex, boolean x) void Yes Yes setBigDecimal(int parameterIndex, BigDecimal x) void Yes Yes setByte(int parameterIndex, byte x) void Yes Yes setBytes(int parameterIndex, byte[] x) void Yes Yes setDate(int parameterIndex, Date x) void Yes Yes setDouble(int parameterIndex, double x) void Yes Yes setFloat(int parameterIndex, float x) void Yes Yes setInt(int parameterIndex, int x) void Yes Yes setLong(int parameterIndex, long x) void Yes Yes setShort(int parameterIndex, short x) void Yes Yes setString(int parameterIndex, String x) void Yes Yes setNString(int parameterIndex, String x) void Yes Yes addBatch() void Yes Yes executeBatch() int[] Yes Yes addBatch()、execute()必须在clearBatch()之后才能执行。 调用executeBatch()方法并不会清除batch。用户必须显式使用clearBatch()清除。 在添加了一个batch的绑定变量后,用户若想重用这些值(再次添加一个batch),无需再次使用set*()方法。 以下方法是从java.sql.Statement继承而来:close、execute、executeQuery、executeUpdate、getConnection、getResultSet、getUpdateCount、isClosed、setMaxRows、setFetchSize、enableStreamingResults。 executeLargeUpdate()方法必须在JDBC4.2及以上版本使用。 当提交模式为autocommit时,执行executeBatch前如果驱动JDBC侧将 batchMode设置为OFF,executeBatch会将整个batch展开为单独事务执行,等同于批量语句内部包含commit或者abort,执行后不支持ALT重放。 父主题: JDBC接口参考
-
java.sql.Driver java.sql.Driver是数据库驱动接口。 表1 对java.sql.Driver的支持情况 方法名 返回值类型 支持JDBC4 acceptsURL(String url) Boolean Yes connect(String url, Properties info) Connection Yes jdbcCompliant() Boolean Yes getMajorVersion() int Yes getMinorVersion() int Yes getParentLogger() Logger Yes getPropertyInfo(String url, Properties info) DriverPropertyInfo[] Yes 父主题: JDBC接口参考
-
java.sql.PreparedStatement java.sql.PreparedStatement是预处理语句接口。 表1 对java.sql.PreparedStatement的支持情况 方法名 返回值类型 支持JDBC4 clearParameters() void Yes execute() Boolean Yes executeQuery() ResultSet Yes excuteUpdate() int Yes executeLargeUpdate() long No getMetaData() ResultSetMetaData Yes getParameterMetaData() ParameterMetaData Yes setArray(int parameterIndex, Array x) void Yes setAsciiStream(int parameterIndex, InputStream x, int length) void Yes setBinaryStream(int parameterIndex, InputStream x) void Yes setBinaryStream(int parameterIndex, InputStream x, int length) void Yes setBinaryStream(int parameterIndex, InputStream x, long length) void Yes setBlob(int parameterIndex, InputStream inputStream) void Yes setBlob(int parameterIndex, InputStream inputStream, long length) void Yes setBlob(int parameterIndex, Blob x) void Yes setCharacterStream(int parameterIndex, Reader reader) void Yes setCharacterStream(int parameterIndex, Reader reader, int length) void Yes setClob(int parameterIndex, Reader reader) void Yes setClob(int parameterIndex, Reader reader, long length) void Yes setClob(int parameterIndex, Clob x) void Yes setDate(int parameterIndex, Date x, Calendar cal) void Yes setNull(int parameterIndex, int sqlType) void Yes setNull(int parameterIndex, int sqlType, String typeName) void Yes setObject(int parameterIndex, Object x) void Yes setObject(int parameterIndex, Object x, int targetSqlType) void Yes setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) void Yes setSQLXML(int parameterIndex, SQLXML xmlObject) void Yes setTime(int parameterIndex, Time x) void Yes setTime(int parameterIndex, Time x, Calendar cal) void Yes setTimestamp(int parameterIndex, Timestamp x) void Yes setTimestamp(int parameterIndex, Timestamp x, Calendar cal) void Yes setUnicodeStream(int parameterIndex, InputStream x, int length) void Yes setURL(int parameterIndex, URL x) void Yes setBoolean(int parameterIndex, boolean x) void Yes setBigDecimal(int parameterIndex, BigDecimal x) void Yes setByte(int parameterIndex, byte x) void Yes setBytes(int parameterIndex, byte[] x) void Yes setDate(int parameterIndex, Date x) void Yes setDouble(int parameterIndex, double x) void Yes setFloat(int parameterIndex, float x) void Yes setInt(int parameterIndex, int x) void Yes setLong(int parameterIndex, long x) void Yes setShort(int parameterIndex, short x) void Yes setString(int parameterIndex, String x) void Yes setNString(int parameterIndex, String x) void Yes addBatch() void Yes executeBatch() int[] Yes addBatch()、execute()必须在clearBatch()之后才能执行。 调用executeBatch()方法并不会清除batch。用户必须显式使用clearBatch()清除。 在添加了一个batch的绑定变量后,用户若想重用这些值(再次添加一个batch),无需再次使用set*()方法。 以下方法是从java.sql.Statement继承而来:close、execute、executeQuery、executeUpdate、getConnection、getResultSet、getUpdateCount、isClosed、setMaxRows、setFetchSize、enableStreamingResults。 executeLargeUpdate()方法必须在JDBC4.2及以上版本使用。 父主题: JDBC接口参考
-
javax.sql.PooledConnection javax.sql.PooledConnection是由连接池创建的连接接口。 表1 对javax.sql.PooledConnection的支持情况 方法名 返回值类型 支持JDBC4 支持计划外ALT addConnectionEventListener (ConnectionEventListener listener) void Yes Yes close() void Yes Yes getConnection() Connection Yes Yes removeConnectionEventListener (ConnectionEventListener listener) void Yes Yes 父主题: JDBC接口参考
-
java.sql.ResultSetMetaData java.sql.ResultSetMetaData是对ResultSet对象相关信息的具体描述。 表1 对java.sql.ResultSetMetaData的支持情况 方法名 返回值类型 支持JDBC4 getCatalogName(int column) String Yes getColumnClassName(int column) String Yes getColumnCount() int Yes getColumnDisplaySize(int column) int Yes getColumnLabel(int column) String Yes getColumnName(int column) String Yes getColumnType(int column) int Yes getColumnTypeName(int column) String Yes getPrecision(int column) int Yes getScale(int column) int Yes getSchemaName(int column) String Yes getTableName(int column) String Yes isAutoIncrement(int column) boolean Yes isCaseSensitive(int column) boolean Yes isCurrency(int column) boolean Yes isDefinitelyWritable(int column) boolean Yes isNullable(int column) int Yes isReadOnly(int column) boolean Yes isSearchable(int column) boolean Yes isSigned(int column) boolean Yes isWritable(int column) boolean Yes 父主题: JDBC接口参考
-
java.sql.DatabaseMetaData java.sql.DatabaseMetaData是数据库对象定义接口。 表1 对java.sql.DatabaseMetaData的支持情况 方法名 返回值类型 支持JDBC4 allProceduresAreCallable() boolean Yes allTablesAreSelectable() boolean Yes autoCommitFailureClosesAllResultSets() boolean Yes dataDefinitionCausesTransactionCommit() boolean Yes dataDefinitionIgnoredInTransactions() boolean Yes deletesAreDetected(int type) boolean Yes doesMaxRowSizeIncludeBlobs() boolean Yes generatedKeyAlwaysReturned() boolean Yes getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) ResultSet Yes getCatalogs() ResultSet Yes getCatalogSeparator() String Yes getCatalogTerm() String Yes getClientInfoProperties() ResultSet Yes getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) ResultSet Yes getConnection() Connection Yes getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable) ResultSet Yes getDefaultTransactionIsolation() int Yes getExportedKeys(String catalog, String schema, String table) ResultSet Yes getExtraNameCharacters() String Yes getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) ResultSet Yes getFunctions(String catalog, String schemaPattern, String functionNamePattern) ResultSet Yes getIdentifierQuoteString() String Yes getImportedKeys(String catalog, String schema, String table) ResultSet Yes getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) ResultSet Yes getMaxBinaryLiteralLength() int Yes getMaxCatalogNameLength() int Yes getMaxCharLiteralLength() int Yes getMaxColumnNameLength() int Yes getMaxColumnsInGroupBy() int Yes getMaxColumnsInIndex() int Yes getMaxColumnsInOrderBy() int Yes getMaxColumnsInSelect() int Yes getMaxColumnsInTable() int Yes getMaxConnections() int Yes getMaxCursorNameLength() int Yes getMaxIndexLength() int Yes getMaxLogicalLobSize() default long Yes getMaxProcedureNameLength() int Yes getMaxRowSize() int Yes getMaxSchemaNameLength() int Yes getMaxStatementLength() int Yes getMaxStatements() int Yes getMaxTableNameLength() int Yes getMaxTablesInSelect() int Yes getMaxUserNameLength() int Yes getNumericFunctions() String Yes getPrimaryKeys(String catalog, String schema, String table) ResultSet Yes getPartitionTablePrimaryKeys(String catalog, String schema, String table) ResultSet Yes getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) ResultSet Yes getProcedures(String catalog, String schemaPattern, String procedureNamePattern) ResultSet Yes getProcedureTerm() String Yes getSchemas() ResultSet Yes getSchemas(String catalog, String schemaPattern) ResultSet Yes getSchemaTerm() String Yes getSearchStringEscape() String Yes getSQLKeywords() String Yes getSQLStateType() int Yes getStringFunctions() String Yes getSystemFunctions() String Yes getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) ResultSet Yes getTimeDateFunctions() String Yes getTypeInfo() ResultSet Yes getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) ResultSet Yes getURL() String Yes getVersionColumns(String catalog, String schema, String table) ResultSet Yes insertsAreDetected(int type) boolean Yes locatorsUpdateCopy() boolean Yes othersDeletesAreVisible(int type) boolean Yes othersInsertsAreVisible(int type) boolean Yes othersUpdatesAreVisible(int type) boolean Yes ownDeletesAreVisible(int type) boolean Yes ownInsertsAreVisible(int type) boolean Yes ownUpdatesAreVisible(int type) boolean Yes storesLowerCaseIdentifiers() boolean Yes storesMixedCaseIdentifiers() boolean Yes storesUpperCaseIdentifiers() boolean Yes supportsBatchUpdates() boolean Yes supportsCatalogsInDataManipulation() boolean Yes supportsCatalogsInIndexDefinitions() boolean Yes supportsCatalogsInPrivilegeDefinitions() boolean Yes supportsCatalogsInProcedureCalls() boolean Yes supportsCatalogsInTableDefinitions() boolean Yes supportsCorrelatedSubqueries() boolean Yes supportsDataDefinitionAndDataManipulationTransactions() boolean Yes supportsDataManipulationTransactionsOnly() boolean Yes supportsGetGeneratedKeys() boolean Yes supportsMixedCaseIdentifiers() boolean Yes supportsMultipleOpenResults() boolean Yes supportsNamedParameters() boolean Yes supportsOpenCursorsAcrossCommit() boolean Yes supportsOpenCursorsAcrossRollback() boolean Yes supportsOpenStatementsAcrossCommit() boolean Yes supportsOpenStatementsAcrossRollback() boolean Yes supportsPositionedDelete() boolean Yes supportsPositionedUpdate() boolean Yes supportsRefCursors() boolean Yes supportsResultSetConcurrency(int type, int concurrency) boolean Yes supportsResultSetType(int type) boolean Yes supportsSchemasInIndexDefinitions() boolean Yes supportsSchemasInPrivilegeDefinitions() boolean Yes supportsSchemasInProcedureCalls() boolean Yes supportsSchemasInTableDefinitions() boolean Yes supportsSelectForUpdate() boolean Yes supportsStatementPooling() boolean Yes supportsStoredFunctionsUsingCallSyntax() boolean Yes supportsStoredProcedures() boolean Yes supportsSubqueriesInComparisons() boolean Yes supportsSubqueriesInExists() boolean Yes supportsSubqueriesInIns() boolean Yes supportsSubqueriesInQuantifieds() boolean Yes supportsTransactionIsolationLevel(int level) boolean Yes supportsTransactions() boolean Yes supportsUnion() boolean Yes supportsUnionAll() boolean Yes updatesAreDetected(int type) boolean Yes getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) ResultSet Yes getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) ResultSet Yes getTableTypes() ResultSet Yes getUserName() String Yes isReadOnly() boolean Yes nullsAreSortedHigh() boolean Yes nullsAreSortedLow() boolean Yes nullsAreSortedAtStart() boolean Yes nullsAreSortedAtEnd() boolean Yes getDatabaseProductName() String Yes getDatabaseProductVersion() String Yes getDriverName() String Yes getDriverVersion() String Yes getDriverMajorVersion() int Yes getDriverMinorVersion() int Yes usesLocalFiles() boolean Yes usesLocalFilePerTable() boolean Yes supportsMixedCaseIdentifiers() boolean Yes storesUpperCaseIdentifiers() boolean Yes storesLowerCaseIdentifiers() boolean Yes supportsMixedCaseQuotedIdentifiers() boolean Yes storesUpperCaseQuotedIdentifiers() boolean Yes storesLowerCaseQuotedIdentifiers() boolean Yes storesMixedCaseQuotedIdentifiers() boolean Yes supportsAlterTableWithAddColumn() boolean Yes supportsAlterTableWithDropColumn() boolean Yes supportsColumnAliasing() boolean Yes nullPlusNonNullIsNull() boolean Yes supportsConvert() boolean Yes supportsConvert(int fromType, int toType) boolean Yes supportsTableCorrelationNames() boolean Yes supportsDifferentTableCorrelationNames() boolean Yes supportsExpressionsInOrderBy() boolean Yes supportsOrderByUnrelated() boolean Yes supportsGroupBy() boolean Yes supportsGroupByUnrelated() boolean Yes supportsGroupByBeyondSelect() boolean Yes supportsLikeEscapeClause() boolean Yes supportsMultipleResultSets() boolean Yes supportsMultipleTransactions() boolean Yes supportsNonNullableColumns() boolean Yes supportsMinimumSQLGrammar() boolean Yes supportsCoreSQLGrammar() boolean Yes supportsExtendedSQLGrammar() boolean Yes supportsANSI92EntryLevelSQL() boolean Yes supportsANSI92IntermediateSQL() boolean Yes supportsANSI92FullSQL() boolean Yes supportsIntegrityEnhancementFacility() boolean Yes supportsOuterJoins() boolean Yes supportsFullOuterJoins() boolean Yes supportsLimitedOuterJoins() boolean Yes isCatalogAtStart() boolean Yes supportsSchemasInDataManipulation() boolean Yes supportsSavepoints() boolean Yes supportsResultSetHoldability(int holdability) boolean Yes getResultSetHoldability() int Yes getDatabaseMajorVersion() int Yes getDatabaseMinorVersion() int Yes getJDBCMajorVersion() int Yes getJDBCMinorVersion() int Yes getPartitionTablePrimaryKeys(String catalog, String schema, String table)方法用于获取分区表含全局索引的主键列,使用示例如下: PgDatabaseMetaData dbmd = (PgDatabaseMetaData)conn.getMetaData(); dbmd.getPartitionTablePrimaryKeys("catalogName", "schemaName", "tableName"); 父主题: JDBC接口参考
-
java.sql.DatabaseMetaData java.sql.DatabaseMetaData是数据库对象定义接口。 表1 对java.sql.DatabaseMetaData的支持情况 方法名 返回值类型 支持JDBC4 支持计划外ALT allProceduresAreCallable() boolean Yes Yes allTablesAreSelectable() boolean Yes Yes autoCommitFailureClosesAllResultSets() boolean Yes Yes dataDefinitionCausesTransactionCommit() boolean Yes Yes dataDefinitionIgnoredInTransactions() boolean Yes Yes deletesAreDetected(int type) boolean Yes Yes doesMaxRowSizeIncludeBlobs() boolean Yes Yes generatedKeyAlwaysReturned() boolean Yes Yes getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) ResultSet Yes Yes getCatalogs() ResultSet Yes Yes getCatalogSeparator() String Yes Yes getCatalogTerm() String Yes Yes getClientInfoProperties() ResultSet Yes Yes getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) ResultSet Yes Yes getConnection() Connection Yes Yes getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable) ResultSet Yes Yes getDefaultTransactionIsolation() int Yes Yes getExportedKeys(String catalog, String schema, String table) ResultSet Yes Yes getExtraNameCharacters() String Yes Yes getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) ResultSet Yes Yes getFunctions(String catalog, String schemaPattern, String functionNamePattern) ResultSet Yes Yes getIdentifierQuoteString() String Yes Yes getImportedKeys(String catalog, String schema, String table) ResultSet Yes Yes getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) ResultSet Yes Yes getMaxBinaryLiteralLength() int Yes Yes getMaxCatalogNameLength() int Yes Yes getMaxCharLiteralLength() int Yes Yes getMaxColumnNameLength() int Yes Yes getMaxColumnsInGroupBy() int Yes Yes getMaxColumnsInIndex() int Yes Yes getMaxColumnsInOrderBy() int Yes Yes getMaxColumnsInSelect() int Yes Yes getMaxColumnsInTable() int Yes Yes getMaxConnections() int Yes Yes getMaxCursorNameLength() int Yes Yes getMaxIndexLength() int Yes Yes getMaxLogicalLobSize() default long Yes Yes getMaxProcedureNameLength() int Yes Yes getMaxRowSize() int Yes Yes getMaxSchemaNameLength() int Yes Yes getMaxStatementLength() int Yes Yes getMaxStatements() int Yes Yes getMaxTableNameLength() int Yes Yes getMaxTablesInSelect() int Yes Yes getMaxUserNameLength() int Yes Yes getNumericFunctions() String Yes Yes getPrimaryKeys(String catalog, String schema, String table) ResultSet Yes Yes getPartitionTablePrimaryKeys(String catalog, String schema, String table) ResultSet Yes Yes getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) ResultSet Yes Yes getProcedures(String catalog, String schemaPattern, String procedureNamePattern) ResultSet Yes Yes getProcedureTerm() String Yes Yes getSchemas() ResultSet Yes Yes getSchemas(String catalog, String schemaPattern) ResultSet Yes Yes getSchemaTerm() String Yes Yes getSearchStringEscape() String Yes Yes getSQLKeywords() String Yes Yes getSQLStateType() int Yes Yes getStringFunctions() String Yes Yes getSystemFunctions() String Yes Yes getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) ResultSet Yes Yes getTimeDateFunctions() String Yes Yes getTypeInfo() ResultSet Yes Yes getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) ResultSet Yes Yes getURL() String Yes Yes getVersionColumns(String catalog, String schema, String table) ResultSet Yes Yes insertsAreDetected(int type) boolean Yes Yes locatorsUpdateCopy() boolean Yes Yes othersDeletesAreVisible(int type) boolean Yes Yes othersInsertsAreVisible(int type) boolean Yes Yes othersUpdatesAreVisible(int type) boolean Yes Yes ownDeletesAreVisible(int type) boolean Yes Yes ownInsertsAreVisible(int type) boolean Yes Yes ownUpdatesAreVisible(int type) boolean Yes Yes storesLowerCaseIdentifiers() boolean Yes Yes storesMixedCaseIdentifiers() boolean Yes Yes storesUpperCaseIdentifiers() boolean Yes Yes supportsBatchUpdates() boolean Yes Yes supportsCatalogsInDataManipulation() boolean Yes Yes supportsCatalogsInIndexDefinitions() boolean Yes Yes supportsCatalogsInPrivilegeDefinitions() boolean Yes Yes supportsCatalogsInProcedureCalls() boolean Yes Yes supportsCatalogsInTableDefinitions() boolean Yes Yes supportsCorrelatedSubqueries() boolean Yes Yes supportsDataDefinitionAndDataManipulationTransactions() boolean Yes Yes supportsDataManipulationTransactionsOnly() boolean Yes Yes supportsGetGeneratedKeys() boolean Yes Yes supportsMixedCaseIdentifiers() boolean Yes Yes supportsMultipleOpenResults() boolean Yes Yes supportsNamedParameters() boolean Yes Yes supportsOpenCursorsAcrossCommit() boolean Yes Yes supportsOpenCursorsAcrossRollback() boolean Yes Yes supportsOpenStatementsAcrossCommit() boolean Yes Yes supportsOpenStatementsAcrossRollback() boolean Yes Yes supportsPositionedDelete() boolean Yes Yes supportsPositionedUpdate() boolean Yes Yes supportsRefCursors() boolean Yes Yes supportsResultSetConcurrency(int type, int concurrency) boolean Yes Yes supportsResultSetType(int type) boolean Yes Yes supportsSchemasInIndexDefinitions() boolean Yes Yes supportsSchemasInPrivilegeDefinitions() boolean Yes Yes supportsSchemasInProcedureCalls() boolean Yes Yes supportsSchemasInTableDefinitions() boolean Yes Yes supportsSelectForUpdate() boolean Yes Yes supportsStatementPooling() boolean Yes Yes supportsStoredFunctionsUsingCallSyntax() boolean Yes Yes supportsStoredProcedures() boolean Yes Yes supportsSubqueriesInComparisons() boolean Yes Yes supportsSubqueriesInExists() boolean Yes Yes supportsSubqueriesInIns() boolean Yes Yes supportsSubqueriesInQuantifieds() boolean Yes Yes supportsTransactionIsolationLevel(int level) boolean Yes Yes supportsTransactions() boolean Yes Yes supportsUnion() boolean Yes Yes supportsUnionAll() boolean Yes Yes updatesAreDetected(int type) boolean Yes Yes getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) ResultSet Yes Yes getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) ResultSet Yes Yes getTableTypes() ResultSet Yes Yes getUserName() String Yes Yes isReadOnly() boolean Yes Yes nullsAreSortedHigh() boolean Yes Yes nullsAreSortedLow() boolean Yes Yes nullsAreSortedAtStart() boolean Yes Yes nullsAreSortedAtEnd() boolean Yes Yes getDatabaseProductName() String Yes Yes getDatabaseProductVersion() String Yes Yes getDriverName() String Yes Yes getDriverVersion() String Yes Yes getDriverMajorVersion() int Yes Yes getDriverMinorVersion() int Yes Yes usesLocalFiles() boolean Yes Yes usesLocalFilePerTable() boolean Yes Yes supportsMixedCaseIdentifiers() boolean Yes Yes storesUpperCaseIdentifiers() boolean Yes Yes storesLowerCaseIdentifiers() boolean Yes Yes supportsMixedCaseQuotedIdentifiers() boolean Yes Yes storesUpperCaseQuotedIdentifiers() boolean Yes Yes storesLowerCaseQuotedIdentifiers() boolean Yes Yes storesMixedCaseQuotedIdentifiers() boolean Yes Yes supportsAlterTableWithAddColumn() boolean Yes Yes supportsAlterTableWithDropColumn() boolean Yes Yes supportsColumnAliasing() boolean Yes Yes nullPlusNonNullIsNull() boolean Yes Yes supportsConvert() boolean Yes Yes supportsConvert(int fromType, int toType) boolean Yes Yes supportsTableCorrelationNames() boolean Yes Yes supportsDifferentTableCorrelationNames() boolean Yes Yes supportsExpressionsInOrderBy() boolean Yes Yes supportsOrderByUnrelated() boolean Yes Yes supportsGroupBy() boolean Yes Yes supportsGroupByUnrelated() boolean Yes Yes supportsGroupByBeyondSelect() boolean Yes Yes supportsLikeEscapeClause() boolean Yes Yes supportsMultipleResultSets() boolean Yes Yes supportsMultipleTransactions() boolean Yes Yes supportsNonNullableColumns() boolean Yes Yes supportsMinimumSQLGrammar() boolean Yes Yes supportsCoreSQLGrammar() boolean Yes Yes supportsExtendedSQLGrammar() boolean Yes Yes supportsANSI92EntryLevelSQL() boolean Yes Yes supportsANSI92IntermediateSQL() boolean Yes Yes supportsANSI92FullSQL() boolean Yes Yes supportsIntegrityEnhancementFacility() boolean Yes Yes supportsOuterJoins() boolean Yes Yes supportsFullOuterJoins() boolean Yes Yes supportsLimitedOuterJoins() boolean Yes Yes isCatalogAtStart() boolean Yes Yes supportsSchemasInDataManipulation() boolean Yes Yes supportsSavepoints() boolean Yes Yes supportsResultSetHoldability(int holdability) boolean Yes Yes getResultSetHoldability() int Yes Yes getDatabaseMajorVersion() int Yes Yes getDatabaseMinorVersion() int Yes Yes getJDBCMajorVersion() int Yes Yes getJDBCMinorVersion() int Yes Yes uppercaseAttributeName为true时,以下方法会将查询结果转为大写,可转换范围与java中的toUpperCase方法一致。 public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) public ResultSet getSchemas(String catalog, String schemaPattern) public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) public ResultSet getPrimaryKeys(String catalog, String schema, String table) protected ResultSet getImportedExportedKeys(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) public ResultSet getIndexInfo(String catalog, String schema, String tableName, boolean unique, boolean approximate) public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) getPartitionTablePrimaryKeys(String catalog, String schema, String table)方法用于获取分区表含全局索引的主键列,使用示例如下: PgDatabaseMetaData dbmd = (PgDatabaseMetaData)conn.getMetaData(); dbmd.getPartitionTablePrimaryKeys("catalogName", "schemaName", "tableName"); 父主题: JDBC接口参考
-
ChainedStreamBuilder的继承关系 ChainedStreamBuilder是逻辑复制的接口,实现类是ReplicationStreamBuilder,该类位于com.huawei.gaussdb.jdbc.replication.fluent Package中,该类的声明如下: public class ReplicationStreamBuilder implements ChainedStreamBuilder
-
javax.sql.ConnectionPoolDataSource javax.sql.ConnectionPoolDataSource是数据源连接池接口。 表1 对javax.sql.ConnectionPoolDataSource的支持情况 方法名 返回值类型 支持JDBC4 支持计划外ALT getPooledConnection() PooledConnection Yes Yes getPooledConnection(String user,String password) PooledConnection Yes Yes 父主题: JDBC接口参考
-
常用方法 表1 LogicalCreateSlotBuilder常用方法 方法名 返回值类型 描述 throws withSlotName(String slotName) T 指定复制槽名。 - withOutputPlugin(String outputPlugin) ChainedLogicalCreateSlotBuilder 插件名称,当前支持mppdb_decoding、sql_decoding、parallel_binary_decoding、parallel_json_decoding、parallel_text_decoding。 mppdb_decoding:一种解码的输出格式,设置后输出内容为JSON格式。输出的结果包含相关数据的属性信息和属性对应的值。sql_decoding、parallel_binary_decoding、parallel_json_decoding、parallel_text_decoding等根据插件格式不同,分别输出sql格式、二进制格式、json格式和text格式。 - make() void 在数据库中创建具有指定参数的插槽。 SQLException self() ChainedLogicalCreateSlotBuilder 返回ChainedLogicalCreateSlotBuilder的实现。 - 本接口类不支持计划外ALT特性。
-
常用方法 表1 LogicalCreateSlotBuilder常用方法 返回值 方法 描述 throws T withSlotName(String slotName) 指定复制槽名。 - ChainedLogicalCreateSlotBuilder withOutputPlugin(String outputPlugin) 插件名称,当前支持mppdb_decoding、sql_decoding、parallel_binary_decoding、parallel_json_decoding、parallel_text_decoding。 mppdb_decoding:一种解码的输出格式,设置后输出内容为JSON格式。输出的结果包含相关数据的属性信息和属性对应的值。sql_decoding、parallel_binary_decoding、parallel_json_decoding、parallel_text_decoding等根据插件格式不同,分别输出sql格式、二进制格式、json格式和text格式。 - void make() 在数据库中创建具有指定参数的插槽。 SQLException ChainedLogicalCreateSlotBuilder self() 返回ChainedLogicalCreateSlotBuilder的实现。 -
-
常用方法 表1 CopyManager常用方法 返回值 方法 描述 throws 支持JDBC4 CopyIn copyIn(String sql) - SQLException Yes long copyIn(String sql, InputStream from) 使用COPY FROM STDIN从InputStream中快速向数据库中的表加载数据。 SQLException,IOException Yes long copyIn(String sql, InputStream from, int bufferSize) 使用COPY FROM STDIN从InputStream中快速向数据库中的表加载指定长度的数据。 SQLException,IOException Yes long copyIn(String sql, Reader from) 使用COPY FROM STDIN从Reader中快速向数据库中的表加载数据。 SQLException,IOException Yes long copyIn(String sql, Reader from, int bufferSize) 使用COPY FROM STDIN从Reader中快速向数据库中的表加载指定长度的数据。 SQLException,IOException Yes CopyOut copyOut(String sql) - SQLException Yes long copyOut(String sql, OutputStream to) 将一个COPY TO STDOUT的结果集从数据库发送到OutputStream类中。 SQLException,IOException Yes long copyOut(String sql, Writer to) 将一个COPY TO STDOUT的结果集从数据库发送到Writer类中。 SQLException,IOException Yes
-
javax.naming.Context javax.naming.Context是连接配置的上下文接口。 表1 对javax.naming.Context的支持情况 方法名 返回值类型 支持JDBC4 支持计划外ALT bind(Name name, Object obj) void Yes Yes bind(String name, Object obj) void Yes Yes lookup(Name name) Object Yes Yes lookup(String name) Object Yes Yes rebind(Name name, Object obj) void Yes Yes rebind(String name, Object obj) void Yes Yes rename(Name oldName, Name newName) void Yes Yes rename(String oldName, String newName) void Yes Yes unbind(Name name) void Yes Yes unbind(String name) void Yes Yes 父主题: JDBC接口参考
-
PGobject 表1 PGobject常用方法 方法名 返回值类型 描述 throws 支持JDBC4 支持计划外ALT getStruct() Object[] 获取复合类型子类型名,按创建顺序排序。 - Yes Yes getValue() String 获取复合类型字符串形式值。 - Yes Yes getArrayValue() String[] 获取复合类型数组形式值,以复合数据类型字段顺序排序。 - Yes Yes getAttributes() Object[] 获取复合类型对象数组形式值(如果组成字段类型为Table类型和Array类型则返回为PgArray,如果组成字段为复合类型则返回PGobject,其他类型返回字符串值)。 SQLException Yes Yes 父主题: JDBC接口参考
-
PGobject 表1 PGobject常用方法 返回值 方法 描述 throws 支持JDBC4 Object[] getStruct() 获取复合类型子类型名,按创建顺序排序。 - Yes String getValue() 获取复合类型字符串形式值。 - Yes String[] getArrayValue() 获取复合类型数组形式值,以复合数据类型字段顺序排序。 - Yes Object[] getAttributes() 获取复合类型对象数组形式值(如果组成字段类型为Table类型和Array类型则返回为PgArray,如果组成字段为复合类型则返回PGobject,其他类型返回字符串值)。 SQLException Yes 父主题: JDBC接口参考
更多精彩内容
CDN加速
GaussDB
文字转换成语音
免费的服务器
如何创建网站
域名网站购买
私有云桌面
云主机哪个好
域名怎么备案
手机云电脑
SSL证书申请
云点播服务器
免费OCR是什么
电脑云桌面
域名备案怎么弄
语音转文字
文字图片识别
云桌面是什么
网址安全检测
网站建设搭建
国外CDN加速
SSL免费证书申请
短信批量发送
图片OCR识别
云数据库MySQL
个人域名购买
录音转文字
扫描图片识别文字
OCR图片识别
行驶证识别
虚拟电话号码
电话呼叫中心软件
怎么制作一个网站
Email注册网站
华为VNC
图像文字识别
企业网站制作
个人网站搭建
华为云计算
免费租用云托管
云桌面云服务器
ocr文字识别免费版
HTTPS证书申请
图片文字识别转换
国外域名注册商
使用免费虚拟主机
云电脑主机多少钱
鲲鹏云手机
短信验证码平台
OCR图片文字识别
SSL证书是什么
申请企业邮箱步骤
免费的企业用邮箱
云免流搭建教程
域名价格