参考资料
JDBC 4.3 Specification
https://jcp.org/aboutJava/communityprocess/mrel/jsr221/index3.html
Catalog
存储组全名,如 root.sg
Database
存储组全名,如 root.sg
Schema
存储组全名,如 root.sg
Table
- Align by device 的表结构:
- 默认的设备数据表:_defaultDeviceTable
- 每个设备类型一个表
- deviceType1
- deviceType2
- Align by timestamp的表结构:
- 宽表:_defaultWideTable
Column
- 默认的设备数据表:time,device,s1,s2, ...
- 一个设备类型表:time,device,s1,s2, ...
- 宽表:time,root.sg.d1.s1, root.sg.d1.s2, ...
Primary key
- 默认的设备数据表:time,device
- 一个设备类型表:time,device
- 宽表:time
SQL Example:
SELECT *, ‘1’ FROM "root.sg"._defaultDeviceTable
WHERE device = ‘root.sg.d1’ AND ("time" < 4 OR s1 < 20) LIMIT 2 OFFSET 1;
SELECT *, ‘1’ FROM "root.sg".devicetype1
WHERE device = ‘root.sg.d1’ AND ("time" < 4 OR s1 < 20) LIMIT 2 OFFSET 1;
SELECT *, ‘1’ FROM "root.sg".devicetype2
WHERE device = ‘root.sg.d1’ AND ("time" < 4 OR s1 < 20) LIMIT 2 OFFSET 1;
SELECT *, ‘1’ FROM "root.sg"._defaultWideTable
WHERE device = ‘root.sg.d1’ AND ("time" < 4 OR s1 < 20) LIMIT 2 OFFSET 1;
Survey for JDBC Metadata
metadata | Modifier and Type | Method | Description | mysql返回值 | itodb返回值 |
DatabaseMetaData | boolean | allProceduresAreCallable() | Retrieves whether the current user can call all the procedures returned by the method getProcedures. | FALSE | FALSE |
boolean | allTablesAreSelectable() | Retrieves whether the current user can use all the tables returned by the method getTables in a SELECT statement. | FALSE | TRUE | |
boolean | autoCommitFailureClosesAllResultSets() | Retrieves whether a SQLException while autoCommit is true indicates that all open ResultSets are closed, even ones that are holdable. | FALSE | 需要确认结果集是否关闭itodb返回false | |
boolean | dataDefinitionCausesTransactionCommit() | Retrieves whether a data definition statement within a transaction forces the transaction to commit. | TRUE | FALSE | |
boolean | dataDefinitionIgnoredInTransactions() | Retrieves whether this database ignores a data definition statement within a transaction. | FALSE | FALSE | |
boolean | deletesAreDetected(int type) | Retrieves whether or not a visible row delete can be detected by calling the method ResultSet.rowDeleted. | FALSE | TRUE | |
boolean | doesMaxRowSizeIncludeBlobs() | Retrieves whether the return value for the method getMaxRowSize includes the SQL data types LONGVARCHAR and LONGVARBINARY. | TRUE | 暂定FALSE,后续有可能调整,代码加上批注(英文) | |
boolean | generatedKeyAlwaysReturned() | Retrieves whether a generated key will always be returned if the column name(s) or index(es) specified for the auto generated key column(s) are valid and the statement succeeds. | TRUE | TRUE | |
ResultSet | getAttributes( java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, java.lang.String attributeNamePattern) | Retrieves a description of the given attribute of the given type for a user-defined type (UDT) that is available in the given schema and catalog. | 横向列名 TYPE_CAT TYPE_SCHEM TYPE_NAME ATTR_NAME DATA_TYPE ATTR_TYPE_NAME ATTR_SIZE DECIMAL_DIGITS NUM_PREC_RADIX NULLABLE REMARKS ATTR_DEF SQL_DATA_TYPE SQL_DATETIME_SUB CHAR_OCTET_LENGTH ORDINAL_POSITION IS_NULLABLE SCOPE_CATALOG SCOPE_SCHEMA SCOPE_TABLE SOURCE_DATA_TYPE | empty | |
ResultSet | getBestRowIdentifier( java.lang.String catalog, java.lang.String schema, java.lang.String table, int scope, boolean nullable) | Retrieves a description of a table's optimal set of columns that uniquely identifies a row. | 横向列名 SCOPE COLUMN_NAME DATA_TYPE TYPE_NAME COLUMN_SIZE BUFFER_LENGTH DECIMAL_DIGITS PSEUDO_COLUMN | SCOPE COLUMN_NAME DATA_TYPE TYPE_NAME COLUMN_SIZE BUFFER_LENGTH DECIMAL_DIGITS PSEUDO_COLUMN(需更新文档) | |
ResultSet | getCatalogs() | Retrieves the catalog names available in this database. | mysql 返回数据库列表相当于 show databases | 存储组(需更新文档) | |
java.lang.String | getCatalogSeparator() | Retrieves the String that this database uses as the separator between a catalog and table name. | mysql返回. | 返回表或者数据库的分隔符(暂定.) | |
java.lang.String | getCatalogTerm() | Retrieves the database vendor's preferred term for "catalog". | mysql 返回database | storage group | |
ResultSet | getClientInfoProperties() | Retrieves a list of the client info properties that the driver supports. | mysql 返回null 列名 NAME MAX_LEN DEFAULT_VALUE DESCRIPTION | NAME=fetch_size MAX_LEN=int.maxvalue DEFAULT_VALUE=1000 DESCRIPTION=文字描述 | |
ResultSet | getColumnPrivileges( java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String columnNamePattern) | Retrieves a description of the access rights for a table's columns. | 列名: TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME GRANTOR GRANTEE PRIVILEGE IS_GRANTABLE | TABLE_CAT=store group TABLE_SCHEM=store group TABLE_NAME COLUMN_NAME=device+measurment GRANTOR=null GRANTEE =当前用户 PRIVILEGE=select、i、d IS_GRANTABLE =false | |
ResultSet | getColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern) | Retrieves a description of table columns available in the specified catalog. | 列名 TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME DATA_TYPE TYPE_NAME COLUMN_SIZE BUFFER_LENGTH DECIMAL_DIGITS NUM_PREC_RADIX NULLABLE columnNoNulls columnNullable columnNullableUnknown REMARKS COLUMN_DEF SQL_DATA_TYPE SQL_DATETIME_SUB CHAR_OCTET_LENGTH ORDINAL_POSITION SCOPE_CATALOG SCOPE_SCHEMA SCOPE_TABLE SOURCE_DATA_TYPE | TABLE_CAT=null TABLE_SCHEM =存储组全名 TABLE_NAME = COLUMN_NAME = DATA_TYPE = TYPE_NAME COLUMN_SIZE BUFFER_LENGTH DECIMAL_DIGITS NUM_PREC_RADIX NULLABLE columnNoNulls columnNullable columnNullableUnknown REMARKS COLUMN_DEF SQL_DATA_TYPE SQL_DATETIME_SUB CHAR_OCTET_LENGTH ORDINAL_POSITION SCOPE_CATALOG SCOPE_SCHEMA SCOPE_TABLE SOURCE_DATA_TYPE | |
Connection | getConnection() | Retrieves the connection that produced this metadata object. | Connection | Connection | |
ResultSet | getCrossReference( java.lang.String parentCatalog, java.lang.String parentSchema, java.lang.String parentTable, java.lang.String foreignCatalog, java.lang.String foreignSchema, java.lang.String foreignTable) | Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table). | PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY | empty | |
int | getDatabaseMajorVersion() | Retrieves the major version number of the underlying database. | mysql主版本号5.6 返回5 | 返回主版本号 | |
int | getDatabaseMinorVersion() | Retrieves the minor version number of the underlying database. | mysql次版本号5.6返回6 | 返回次版本号 | |
java.lang.String | getDatabaseProductName() | Retrieves the name of this database product. | mysql | IOTdb | |
java.lang.String | getDatabaseProductVersion() | Retrieves the version number of this database product. | 产品版本号5.6.1 | 产品版本号 | |
int | getDefaultTransactionIsolation() | Retrieves this database's default transaction isolation level. | 返回事物隔离级别(默认脏读)返回3 | 返回其他数值0 | |
int | getDriverMajorVersion() | Retrieves this JDBC driver's major version number. | 主版本号5.1返回5 | 主版本号 | |
int | getDriverMinorVersion() | Retrieves this JDBC driver's minor version number. | 次版本号5.1返回1 | 次版本号 | |
java.lang.String | getDriverName() | Retrieves the name of this JDBC driver. | 驱动名称 | 驱动名称 | |
java.lang.String | getDriverVersion() | Retrieves the version number of this JDBC driver as a String. | 驱动版本号5.1.1 | 驱动版本号 | |
ResultSet | getExportedKeys( java.lang.String catalog, java.lang.String schema, java.lang.String table) | Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table). | 列名 PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ short UPDATE_RULE short DELETE_RULE short FK_NAME PK_NAME DEFERRABILITY | empty | |
java.lang.String | getExtraNameCharacters() | Retrieves all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _). | #@ | 空字符串 | |
ResultSet | getFunctionColumns( java.lang.String catalog, java.lang.String schemaPattern, java.lang.String functionNamePattern, java.lang.String columnNamePattern) | Retrieves a description of the given catalog's system or user function parameters and return type. | 列名 FUNCTION_CAT FUNCTION_SCHEM FUNCTION_NAME COLUMN_NAME COLUMN_TYPE DATA_TYPE TYPE_NAME PRECISIONa LENGTH SCALE RADIX NULLABLE REMARKS CHAR_OCTET_LENGTH ORDINAL_POSITION IS_NULLABLE SPECIFIC_NAME | 列名(需服务器返回) FUNCTION_CAT FUNCTION_SCHEM FUNCTION_NAME COLUMN_NAME COLUMN_TYPE DATA_TYPE TYPE_NAME PRECISIONa LENGTH SCALE RADIX NULLABLE REMARKS CHAR_OCTET_LENGTH ORDINAL_POSITION IS_NULLABLE SPECIFIC_NAME | |
ResultSet | getFunctions(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String functionNamePattern) | Retrieves a description of the system and user functions available in the given catalog. | 列名 FUNCTION_CAT FUNCTION_SCHEM FUNCTION_NAME REMARKS FUNCTION_TYPE SPECIFIC_NAME | 列名(服务器返回) FUNCTION_CAT FUNCTION_SCHEM FUNCTION_NAME REMARKS FUNCTION_TYPE SPECIFIC_NAME | |
java.lang.String | getIdentifierQuoteString() | Retrieves the string used to quote SQL identifiers. | 返回` | 单双引号 | |
ResultSet | getImportedKeys( java.lang.String catalog, java.lang.String schema, java.lang.String table) | Retrieves a description of the primary key columns that are referenced by the given table's foreign key columns (the primary keys imported by a table). | 列名: PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ short UPDATE_RULE short DELETE_RULE short FK_NAME String PK_NAME String DEFERRABILITY | empty | |
ResultSet | getIndexInfo(java.lang.String catalog, java.lang.String schema, java.lang.String table, boolean unique, boolean approximate) | Retrieves a description of the given table's indices and statistics. | 列名 TABLE_CAT TABLE_SCHEM TABLE_NAME NON_UNIQUE INDEX_QUALIFIER INDEX_NAME TYPE ORDINAL_POSITION COLUMN_NAME ASC_OR_DESC CARDINALITY PAGES FILTER_CONDITION | empty | |
int | getJDBCMajorVersion() | Retrieves the major JDBC version number for this driver. | jdbc 主版本号 | jdbc 主版本号 | |
int | getJDBCMinorVersion() | Retrieves the minor JDBC version number for this driver. | jdbc次版本号 | jdbc次版本号 | |
int | getMaxBinaryLiteralLength() | Retrieves the maximum number of hex characters this database allows in an inline binary literal. | 16777208 | interger.maxvalue | |
int | getMaxCatalogNameLength() | Retrieves the maximum number of characters that this database allows in a catalog name. | 32 | 1024(注释虽无限制但不建议) | |
int | getMaxCharLiteralLength() | Retrieves the maximum number of characters this database allows for a character literal. | 16777208 | interger.maxvalue | |
int | getMaxColumnNameLength() | Retrieves the maximum number of characters this database allows for a column name. | 64 | 1024(注释无限制不建议) | |
int | getMaxColumnsInGroupBy() | Retrieves the maximum number of columns this database allows in a GROUP BY clause. | 64 | group by 个数1 | |
int | getMaxColumnsInIndex() | Retrieves the maximum number of columns this database allows in an index. | 确认最大索引个数16 | 0 | |
int | getMaxColumnsInOrderBy() | Retrieves the maximum number of columns this database allows in an ORDER BY clause. | 64 | 返回1 | |
int | getMaxColumnsInSelect() | Retrieves the maximum number of columns this database allows in a SELECT list. | 256 | select最大列数(确认) | |
int | getMaxColumnsInTable() | Retrieves the maximum number of columns this database allows in a table. | 512 | max | |
int | getMaxConnections() | Retrieves the maximum number of concurrent connections to this database that are possible. | 最大链接(确认) | 服务器取 | |
int | getMaxCursorNameLength() | Retrieves the maximum number of characters that this database allows in a cursor name. | 64 | 返回0 | |
int | getMaxIndexLength() | Retrieves the maximum number of bytes this database allows for an index, including all of the parts of the index. | 256 | integer.maxvalue | |
default long | getMaxLogicalLobSize() | Retrieves the maximum number of bytes this database allows for the logical size for a LOB. | 0 | integer.maxvalue | |
int | getMaxProcedureNameLength() | Retrieves the maximum number of characters that this database allows in a procedure name. | 0 | 返回0 | |
int | getMaxRowSize() | Retrieves the maximum number of bytes this database allows in a single row. | 2147483639 | 2147483639(注释无限制) | |
int | getMaxSchemaNameLength() | Retrieves the maximum number of characters that this database allows in a schema name. | 0 | 1024(注释无限制不建议) | |
int | getMaxStatementLength() | Retrieves the maximum number of characters this database allows in an SQL statement. | 65531 | thrift . 获取.framesize | |
int | getMaxStatements() | Retrieves the maximum number of active statements to this database that can be open at the same time. | 0 | 0 | |
int | getMaxTableNameLength() | Retrieves the maximum number of characters this database allows in a table name. | 64 | 1024(注释无限制不建议) | |
int | getMaxTablesInSelect() | Retrieves the maximum number of tables this database allows in a SELECT statement. | 256 | 1024(注释无限制不建议) | |
int | getMaxUserNameLength() | Retrieves the maximum number of characters this database allows in a user name. | 16 | 1024(注释无限制不建议) | |
java.lang.String | getNumericFunctions() | Retrieves a comma-separated list of math functions available with this database. | 返回函数mysql返回ABS,ACOS,ASIN, ATAN,ATAN2,BIT_COUNT, CEILING,COS,COT,DEGREES,EXP, FLOOR,LOG,LOG10,MAX,MIN, MOD,PI,POW,POWER,RADIANS, RAND,ROUND,SIN, SQRT,TAN,TRUNCATE** DATABASE,USER,SYSTEM_USER, SESSION_USER, PASSWORD,ENCRYPT, LAST_INSERT_ID,VERSION | 服务器取 | |
ResultSet | getPrimaryKeys( java.lang.String catalog, java.lang.String schema, java.lang.String table) | Retrieves a description of the given table's primary key columns. | 列名 TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME | 两种times、device time | |
ResultSet | getProcedureColumns( java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern, java.lang.String columnNamePattern) | Retrieves a description of the given catalog's stored procedure parameter and result columns. | 列名 PROCEDURE_CAT PROCEDURE_SCHEM PROCEDURE_NAME COLUMN_NAME COLUMN_TYPE DATA_TYPE TYPE_NAME PRECISION LENGTH SCALE RADIX NULLABLE REMARKS COLUMN_DEF SQL_DATA_TYPE SQL_DATETIME_SUB CHAR_OCTET_LENGTH ORDINAL_POSITION IS_NULLABLE SPECIFIC_NAME | e | |
ResultSet | getProcedures( java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern ) | Retrieves a description of the stored procedures available in the given catalog. | 列名 PROCEDURE_CAT PROCEDURE_SCHEM PROCEDURE_NAME REMARKS String PROCEDURE_TYPE SPECIFIC_NAME | e | |
java.lang.String | getProcedureTerm() | Retrieves the database vendor's preferred term for "procedure". | PROCEDURE | e | |
ResultSet | getPseudoColumns( java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern) | Retrieves a description of the pseudo or hidden columns available in a given table within the specified catalog and schema. | 列名 RowNum ,RowID, CURRVAL, NEXTVAL,UID, USER,Level,ORA_ROWSCN。 | TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME DATA_TYPE COLUMN_SIZE DECIMAL_DIGITS NUM_PREC_RADIX COLUMN_USAGE REMARKS CHAR_OCTET_LENGTH IS_NULLABLE (目前只有times) | |
int | getResultSetHoldability() | Retrieves this database's default holdability for ResultSet objects. | 返回1,ResultSet的可保持性确定使用commit() Connection 接口的方法提交事务(包含 游标/ ResultSet对象)时 是否应关闭ResultSet对象(光标) 或使其保持打开状态。 DatabaseMetaData接口的 getResultSetHoldability() 方法检索基础数据库的ResultSet 对象的默认可保存性。 可保存性的整数值, 该值将为1或2,其中,1表示值 HOLD_CURSORS_OVER_COMMIT。 如果ResultSet对象的可保存性设置为此值。 每当使用commit()Connection接口的 方法提交/保存事务时,在当前事务中创建的 ResultSet对象(已打开)将保持打开状态。 如果ResultSet对象的 可保存性设置为此值。每当您使用commit()Connection接口 的方法提交/保存事务时,在当前事务中创建的ResultSet 对象(已打开)将被关闭。 | 返回1 | |
RowIdLifetime | getRowIdLifetime() | Indicates whether this data source supports the SQL ROWID type, and the lifetime for which a RowId object remains valid. | ROWID_UNSUPPORTED | ROWID_UNSUPPORTED | |
ResultSet | getSchemas() | Retrieves the schema names available in this database. | TABLE_SCHEM TABLE_CATALOG | 存储组服务器获取 | |
ResultSet | getSchemas(java.lang.String catalog, java.lang.String schemaPattern) | Retrieves the schema names available in this database. | TABLE_SCHEM TABLE_CATALOG | 存储组服务器获取 | |
java.lang.String | getSchemaTerm() | Retrieves the database vendor's preferred term for "schema". | “” | stroge group | |
java.lang.String | getSearchStringEscape() | Retrieves the string that can be used to escape wildcard characters. | \ | \ | |
java.lang.String | getSQLKeywords() | Retrieves a comma-separated list of all of this database's SQL keywords that are NOT also SQL:2003 keywords. | 输出sql关键字如:database | 返回不存在的antlr | |
int | getSQLStateType() | Indicates whether the SQLSTATE returned by SQLException.getSQLState is X/Open (now known as Open Group) SQL CLI or SQL:2003. | mysql返回2(含义) | 返回0,返回数字表示false,mysql返回2 | |
java.lang.String | getStringFunctions() | Retrieves a comma-separated list of string functions available with this database. | 返回函数列表例如:ASCII,BIN, BIT_LENGTH,CHAR, CHARACTER_LENGTH, CHAR_LENGTH,CONCAT, CONCAT_WS,CONV,ELT, EXPORT_SET,FIELD, FIND_IN_SET,HEX,INSERT, INSTR,LCASE,LEFT, LENGTH,LOAD_FILE,LOCATE, LOCATE,LOWER, LPAD,LTRIM,MAKE_SET,MATCH,MID,OCT, OCTET_LENGTH,ORD,POSITION, QUOTE,REPEAT, REPLACE,REVERSE,RIGHT,RPAD, RTRIM,SOUNDEX, SPACE,STRCMP,SUBSTRING, SUBSTRING, SUBSTRING,SUBSTRING, SUBSTRING_INDEX,TRIM, UCASE,UPPER | 服务器 | |
ResultSet | getSuperTables( java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern) | Retrieves a description of the table hierarchies defined in a particular schema in this database. | TABLE_CAT TABLE_SCHEM TABLE_NAME SUPERTABLE_NAME | e | |
ResultSet | getSuperTypes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern) | Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database. | TYPE_CAT TYPE_SCHEM TYPE_NAME SUPERTYPE_CAT SUPERTYPE_SCHEM SUPERTYPE_NAME | e | |
java.lang.String | getSystemFunctions() | Retrieves a comma-separated list of system functions available with this database. | 返回内置函数mysql返回DATABASE USER PASSWORD | 服务器 | |
ResultSet | getTablePrivileges(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern) | Retrieves a description of the access rights for each table available in a catalog. | TABLE_CAT TABLE_SCHEM TABLE_NAME GRANTOR GRANTEE PRIVILEGE IS_GRANTABLE | 服务器 | |
ResultSet | getTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String[] types) | Retrieves a description of the tables available in the given catalog. | TABLE_CAT Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM". the table null) be null)
name of the designated "identifier" column of a typed table (may be null)
values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED". (may be null) | TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION(服务器返回) | |
ResultSet | getTableTypes() | Retrieves the table types available in this database. | TABLE_TYPE 返回表的类型mysql返回TABLE VIEW LOCAL TEMPORARY | table | |
java.lang.String | getTimeDateFunctions() | Retrieves a comma-separated list of the time and date functions available with this database. | 返回日期函数mysql返回如下DAYOFWEEK,WEEKDAY,DAYOFMONTH, DAYOFYEAR,MONTH,DAYNAME, MONTHNAME,QUARTER,WEEK, YEAR,HOUR,MINUTE,SECOND, PERIOD_ADD,PERIOD_DIFF, TO_DAYS,FROM_DAYS, DATE_FORMAT,TIME_FORMAT, CURDATE, CURRENT_DATE,CURTIME, CURRENT_TIME,NOW,SYSDATE, CURRENT_TIMESTAMP, UNIX_TIMESTAMP,FROM_UNIXTIME, SEC_TO_TIME,TIME_TO_SEC SESSION_USER,PASSWORD, ENCRYPT,LAST_INSERT_ID,VERSION | now(服务器返回) | |
ResultSet | getTypeInfo() | Retrieves a description of all the data types supported by this database. | 检索当前数据库支持的所有标准 SQL 类型的说明, TYPE_NAME DATA_TYPE PRECISION LITERAL_PREFIX LITERAL_SUFFIX CREATE_PARAMS NULLABLE short CASE_SENSITIVE SEARCHABLE UNSIGNED_ATTRIBUTE FIXED_PREC_SCALE AUTO_INCREMENT LOCAL_TYPE_NAME MINIMUM_SCALE MAXIMUM_SCALE SQL_DATA_TYPE SQL_DATETIME_SUB NUM_PREC_RADIX | 服务器 | |
ResultSet | getUDTs(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, int[] types) | Retrieves a description of the
user-defined types (UDTs) defined in a particular schema. | TYPE_CAT TYPE_SCHEM TYPE_NAME CLASS_NAME DATA_TYPE REMARKS BASE_TYPE | e | |
java.lang.String | getURL() | Retrieves the URL for this DBMS. | mysql返回 | 返回url | |
java.lang.String | getUserName() | Retrieves the user name as known to this database. | 返回用户名username@219.142.240.74 | 返回用户名username@219.142.240.74 | |
ResultSet | getVersionColumns( java.lang.String catalog, java.lang.String schema, java.lang.String table) | Retrieves a description of a table's columns that are automatically updated when any value in a row is updated. | 列名 SCOPE COLUMN_NAME DATA_TYPE TYPE_NAME COLUMN_SIZE BUFFER_LENGTH DECIMAL_DIGITS PSEUDO_COLUMN | e | |
boolean | insertsAreDetected(int type) | Retrieves whether or not a visible row insert can be detected by calling the method ResultSet.rowInserted. | FALSE | FALSE | |
boolean | isCatalogAtStart() | Retrieves whether a catalog appears at the start of a fully qualified table name. | TRUE | FALSE | |
boolean | isReadOnly() | Retrieves whether this database is in read-only mode. | FALSE | 服务器返回 | |
boolean | locatorsUpdateCopy() | Indicates whether updates made to a LOB are made on a copy or directly to the LOB. | TRUE | FALSE | |
boolean | nullPlusNonNullIsNull() | Retrieves whether this database supports concatenations between NULL and non-NULL values being NULL. | TRUE | FALSE | |
boolean | nullsAreSortedAtEnd() | Retrieves whether NULL values are sorted at the end regardless of sort order. | FALSE | FALSE | |
boolean | nullsAreSortedAtStart() | Retrieves whether NULL values are sorted at the start regardless of sort order. | FALSE | FALSE | |
boolean | nullsAreSortedHigh() | Retrieves whether NULL values are sorted high. | FALSE | FALSE | |
boolean | nullsAreSortedLow() | Retrieves whether NULL values are sorted low. | TRUE | FALSE | |
boolean | othersDeletesAreVisible(int type) | Retrieves whether deletes made by others are visible. | FALSE | TRUE | |
boolean | othersInsertsAreVisible(int type) | Retrieves whether inserts made by others are visible. | FALSE | TRUE | |
boolean | othersUpdatesAreVisible(int type) | Retrieves whether updates made by others are visible. | FALSE | TRUE | |
boolean | ownDeletesAreVisible(int type) | Retrieves whether a result set's own deletes are visible. | FALSE | TRUE | |
boolean | ownInsertsAreVisible(int type) | Retrieves whether a result set's own inserts are visible. | FALSE | TRUE | |
boolean | ownUpdatesAreVisible(int type) | Retrieves whether for the given type of ResultSet object, the result set's own updates are visible. | FALSE | TRUE | |
boolean | storesLowerCaseIdentifiers() | Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in lower case. | FALSE | FALSE | |
boolean | storesLowerCaseQuotedIdentifiers() | Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in lower case. | FALSE | FALSE | |
boolean | storesMixedCaseIdentifiers() | Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case. | TRUE | TRUE | |
boolean | storesMixedCaseQuotedIdentifiers() | Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in mixed case. | TRUE | TRUE | |
boolean | storesUpperCaseIdentifiers() | Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in upper case. | FALSE | TRUE | |
boolean | storesUpperCaseQuotedIdentifiers() | Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in upper case. | TRUE | TRUE | |
boolean | supportsAlterTableWithAddColumn() | Retrieves whether this database supports ALTER TABLE with add column. | TRUE | TRUE | |
boolean | supportsAlterTableWithDropColumn() | Retrieves whether this database supports ALTER TABLE with drop column. | TRUE | TRUE | |
boolean | supportsANSI92EntryLevelSQL() | Retrieves whether this database supports the ANSI92 entry level SQL grammar. | TRUE | FALSE | |
boolean | supportsANSI92FullSQL() | Retrieves whether this database supports the ANSI92 full SQL grammar supported. | TRUE | FALSE | |
boolean | supportsANSI92IntermediateSQL() | Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported. | FALSE | FALSE | |
boolean | supportsBatchUpdates() | Retrieves whether this database supports batch updates. | TRUE | TRUE | |
boolean | supportsCatalogsInDataManipulation() | Retrieves whether a catalog name can be used in a data manipulation statement. | TRUE | TRUE | |
boolean | supportsCatalogsInIndexDefinitions() | Retrieves whether a catalog name can be used in an index definition statement. | TRUE | TRUE | |
boolean | supportsCatalogsInPrivilegeDefinitions() | Retrieves whether a catalog name can be used in a privilege definition statement. | TRUE | TRUE | |
boolean | supportsCatalogsInProcedureCalls() | Retrieves whether a catalog name can be used in a procedure call statement. | TRUE | TRUE | |
boolean | supportsCatalogsInTableDefinitions() | Retrieves whether a catalog name can be used in a table definition statement. | TRUE | TRUE | |
boolean | supportsColumnAliasing() | Retrieves whether this database supports column aliasing. | TRUE | TRUE | |
boolean | supportsConvert() | Retrieves whether this database supports the JDBC scalar function CONVERT for the conversion of one JDBC type to another. | FALSE | FALSE | |
boolean | supportsConvert(int fromType, int toType) | Retrieves whether this database supports the JDBC scalar function CONVERT for conversions between the JDBC types fromType and toType. | TRUE | FALSE | |
boolean | supportsCoreSQLGrammar() | Retrieves whether this database supports the ODBC Core SQL grammar. | TRUE | FALSE | |
boolean | supportsCorrelatedSubqueries() | Retrieves whether this database supports correlated subqueries. | TRUE | FALSE | |
boolean | supportsDataDefinitionAndData ManipulationTransactions() | Retrieves whether this database supports both data definition and data manipulation statements within a transaction. | FALSE | FALSE | |
boolean | supportsDataManipulationTransactionsOnly() | Retrieves whether this database supports only data manipulation statements within a transaction. | FALSE | TRUE | |
boolean | supportsDifferentTableCorrelationNames() | Retrieves whether, when table correlation names are supported, they are restricted to being different from the names of the tables. | TRUE | FALSE | |
boolean | supportsExpressionsInOrderBy() | Retrieves whether this database supports expressions in ORDER BY lists. | TRUE | TRUE | |
boolean | supportsExtendedSQLGrammar() | Retrieves whether this database supports the ODBC Extended SQL grammar. | FALSE | FALSE | |
boolean | supportsFullOuterJoins() | Retrieves whether this database supports full nested outer joins. | TRUE | TRUE | |
boolean | supportsGetGeneratedKeys() | Retrieves whether auto- generated keys can be retrieved after a statement has been executed | TRUE | FALSE | |
boolean | supportsGroupBy() | Retrieves whether this database supports some form of GROUP BY clause. | TRUE | TRUE | |
boolean | supportsGroupByBeyondSelect() | Retrieves whether this database supports using columns not included in the SELECT statement in a GROUP BY clause provided that all of the columns in the SELECT statement are included in the GROUP BY clause. | TRUE | TRUE | |
boolean | supportsGroupByUnrelated() | Retrieves whether this database supports using a column that is not in the SELECT statement in a GROUP BY clause. | TRUE | TRUE | |
boolean | supportsIntegrityEnhancementFacility() | Retrieves whether this database supports the SQL Integrity Enhancement Facility. | FALSE | FALSE | |
boolean | supportsLikeEscapeClause() | Retrieves whether this database supports specifying a LIKE escape clause. | TRUE | FALSE | |
boolean | supportsLimitedOuterJoins() | Retrieves whether this database provides limited support for outer joins. | TRUE | TRUE | |
boolean | supportsMinimumSQLGrammar() | Retrieves whether this database supports the ODBC Minimum SQL grammar. | TRUE | FALSE | |
boolean | supportsMixedCaseIdentifiers() | Retrieves whether this database treats mixed case unquoted SQL identifiers as case sensitive and as a result stores them in mixed case. | TRUE | TRUE | |
boolean | supportsMixedCaseQuotedIdentifiers() | Retrieves whether this database treats mixed case quoted SQL identifiers as case sensitive and as a result stores them in mixed case. | TRUE | TRUE | |
boolean | supportsMultipleOpenResults() | Retrieves whether it is possible to have multiple ResultSet objects returned from a CallableStatement object simultaneously. | TRUE | FALSE | |
boolean | supportsMultipleResultSets() | Retrieves whether this database supports getting multiple ResultSet objects from a single call to the method execute. | TRUE | FALSE | |
boolean | supportsMultipleTransactions() | Retrieves whether this database allows having multiple transactions open at once (on different connections). | TRUE | TRUE | |
boolean | supportsNamedParameters() | Retrieves whether this database supports named parameters to callable statements. | FALSE | FALSE | |
boolean | supportsNonNullableColumns() | Retrieves whether columns in this database may be defined as non-nullable. | TRUE | FALSE | |
boolean | supportsOpenCursorsAcrossCommit() | Retrieves whether this database supports keeping cursors open across commits. | FALSE | FALSE | |
boolean | supportsOpenCursorsAcrossRollback() | Retrieves whether this database supports keeping cursors open across rollbacks. | FALSE | FALSE | |
boolean | supportsOpenStatementsAcrossCommit() | Retrieves whether this database supports keeping statements open across commits. | FALSE | FALSE | |
boolean | supportsOpenStatementsAcrossRollback() | Retrieves whether this database supports keeping statements open across rollbacks. | FALSE | FALSE | |
boolean | supportsOrderByUnrelated() | Retrieves whether this database supports using a column that is not in the SELECT statement in an ORDER BY clause. | FALSE | TRUE | |
boolean | supportsOuterJoins() | Retrieves whether this database supports some form of outer join. | TRUE | TRUE | |
boolean | supportsPositionedDelete() | Retrieves whether this database supports positioned DELETE statements. | FALSE | FALSE | |
boolean | supportsPositionedUpdate() | Retrieves whether this database supports positioned UPDATE statements. | FALSE | FALSE | |
default boolean | supportsRefCursors() | Retrieves whether this database supports REF CURSOR. | FALSE | FALSE | |
boolean | supportsResultSetConcurrency(int type, int concurrency) | Retrieves whether this database supports the given concurrency type in combination with the given result set type. | TRUE | FALSE | |
boolean | supportsResultSetHoldability(int holdability) | Retrieves whether this database supports the given result set holdability. | FALSE | 返回true ResultSet的可保持性确定使用commit()Connection接口的方法提交事务(包含上述游标/ ResultSet对象)时是关闭还是保持ResultSet对象(光标)打开。 ResultSet接口提供两个值来指定ResultSet的可保存性,即- CLOSE_CURSORS_AT_COMMIT:如果ResultSet对象的可保存性设置为此值。每当您使用commit()Connection接口的方法提交/保存事务时,在当前事务中创建的ResultSet对象(已打开)将被关闭。 HOLD_CURSORS_OVER_COMMIT:如果ResultSet对象的可保存性设置为此值。每当使用commit()Connection接口的方法提交/保存事务时,在当前事务中创建的ResultSet对象(已打开)将保持打开状态。 | |
boolean | supportsResultSetType(int type) | Retrieves whether this database supports the given result set type. | FALSE | next() 返回true,其他返回 false | |
boolean | supportsSavepoints() | Retrieves whether this database supports savepoints. | TRUE | FALSE | |
boolean | supportsSchemasInDataManipulation() | Retrieves whether a schema name can be used in a data manipulation statement. | FALSE | FALSE | |
boolean | supportsSchemasInIndexDefinitions() | Retrieves whether a schema name can be used in an index definition statement. | FALSE | FALSE | |
boolean | supportsSchemasInPrivilegeDefinitions() | Retrieves whether a schema name can be used in a privilege definition statement. | FALSE | FALSE | |
boolean | supportsSchemasInProcedureCalls() | Retrieves whether a schema name can be used in a procedure call statement. | FALSE | FALSE | |
boolean | supportsSchemasInTableDefinitions() | Retrieves whether a schema name can be used in a table definition statement. | FALSE | FALSE | |
boolean | supportsSelectForUpdate() | Retrieves whether this database supports SELECT FOR UPDATE statements. | TRUE | FALSE | |
default boolean | supportsSharding() | Retrieves whether this database supports sharding. | FALSE | ||
boolean | supportsStatementPooling() | Retrieves whether this database supports statement pooling. | FALSE | FALSE(暂时) | |
boolean | supportsStoredFunctionsUsingCallSyntax() | Retrieves whether this database supports invoking user-defined or vendor functions using the stored procedure escape syntax. | TRUE | FALSE | |
boolean | supportsStoredProcedures() | Retrieves whether this database supports stored procedure calls that use the stored procedure escape syntax. | TRUE | FALSE | |
boolean | supportsSubqueriesInComparisons() | Retrieves whether this database supports subqueries in comparison expressions. | TRUE | FALSE | |
boolean | supportsSubqueriesInExists() | Retrieves whether this database supports subqueries in EXISTS expressions. | TRUE | FALSE | |
boolean | supportsSubqueriesInIns() | Retrieves whether this database supports subqueries in IN expressions. | TRUE | FALSE | |
boolean | supportsSubqueriesInQuantifieds() | Retrieves whether this database supports subqueries in quantified expressions. | TRUE | FALSE | |
boolean | supportsTableCorrelationNames() | Retrieves whether this database supports table correlation names. | TRUE | FALSE | |
boolean | supportsTransactionIsolationLevel(int level) | Retrieves whether this database supports the given transaction isolation level. | 传1、2是true,其他false | FALSE | |
boolean | supportsTransactions() | Retrieves whether this database supports transactions. | TRUE | FALSE | |
boolean | supportsUnion() | Retrieves whether this database supports SQL UNION. | TRUE | FALSE | |
boolean | supportsUnionAll() | Retrieves whether this database supports SQL UNION ALL. | TRUE | FALSE | |
boolean | updatesAreDetected(int type) | Retrieves whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated. | FALSE | FALSE | |
boolean | usesLocalFilePerTable() | Retrieves whether this database uses a file for each table. | FALSE | FALSE | |
boolean | usesLocalFiles() | Retrieves whether this database stores tables in a local file. | FALSE | FALSE | |
ResultSetMetaData | java.lang.String | getCatalogName(int column) | Gets the designated column's table's catalog name. | 返回数据库名称 | 存储组名字 |
java.lang.String | getColumnClassName(int column) | Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. | 返回int、float等 | 返回int23,int64,text,boolean、float、double | |
int | getColumnCount() | Returns the number of columns in this ResultSet object. | 返回列数 | 返回列数 | |
int | getColumnDisplaySize(int column) | Indicates the designated column's normal maximum width in characters. | 在数据库中类型的最大字符个数 | 返回integer.maxvaule | |
java.lang.String | getColumnLabel(int column) | Gets the designated column's suggested title for use in printouts and displays. | 列标题(别名) | 列标题(别名) | |
java.lang.String | getColumnName(int column) | Get the designated column's name. | 列名 | 列名 | |
int | getColumnType(int column) | Retrieves the designated column's SQL type. | 返回类型如java.lang.String | 返回类型 | |
java.lang.String | getColumnTypeName(int column) | Retrieves the designated column's database-specific type name. | 数据类型名:VARCHAR | 返回如int32 | |
int | getPrecision(int column) | Get the designated column's specified column size. | 返回指定列大小如varchar(100)返回100 | 返回指定列大小 | |
int | getScale(int column) | Gets the designated column's number of digits to right of the decimal point. | 获取小数点右边的指定列的位数例如float(255,2)返回2 | 部分float指定位数,目前无接口,没指定用户java默认 | |
java.lang.String | getSchemaName(int column) | Get the designated column's table's schema. | 模式名称;如果不存在可用的模式名称, 则返回一个空 string,mysql返回空string | 存储组名字 | |
java.lang.String | getTableName(int column) | Gets the designated column's table name. | 放回表名 | 返回表名 | |
boolean | isAutoIncrement(int column) | Indicates whether the designated column is automatically numbered. | 自增返回true非自增返回false | FALSE | |
boolean | isCaseSensitive(int column) | Indicates whether a column's case matters. | FALSE | TRUE | |
boolean | isCurrency(int column) | Indicates whether the designated column is a cash value. | 货币性返回true,其他返回false | FALSE | |
boolean | isDefinitelyWritable(int column) | Indicates whether a write on the designated column will definitely succeed. | TRUE | FALSE | |
int | isNullable(int column) | Indicates the nullability of values in the designated column. | 为空返回false,非空为true | TRUE | |
boolean | isReadOnly(int column) | Indicates whether the designated column is definitely not writable. | FALSE | TRUE | |
boolean | isSearchable(int column) | Indicates whether the designated column can be used in a where clause. | TRUE | TRUE | |
boolean | isSigned(int column) | Indicates whether values in the designated column are signed numbers. | 数值型为true,其他为false | TRUE | |
boolean | isWritable(int column) | Indicates whether it is possible for a write on the designated column to succeed. | TRUE | FALSE | |
RowSetMetaData | void | setAutoIncrement(int columnIndex, boolean property) | Sets whether the designated column is automatically numbered, The default is for a RowSet object's columns not to be automatically numbered. | ||
void | setCaseSensitive(int columnIndex, boolean property) | Sets whether the designated column is case sensitive. | |||
void | setCatalogName(int columnIndex, java.lang.String catalogName) | Sets the designated column's table's catalog name, if any, to the given String. | |||
void | setColumnCount(int columnCount) | Sets the number of columns in the RowSet object to the given number. | |||
void | setColumnDisplaySize(int columnIndex, int size) | Sets the designated column's normal maximum width in chars to the given int. | |||
void | setColumnLabel(int columnIndex, java.lang.String label) | Sets the suggested column title for use in printouts and displays, if any, to the given String. | |||
void | setColumnName(int columnIndex, java.lang.String columnName) | Sets the name of the designated column to the given String. | |||
void | setColumnType(int columnIndex, int SQLType) | Sets the designated column's SQL type to the one given. | |||
void | setColumnTypeName(int columnIndex, java.lang.String typeName) | Sets the designated column's type name that is specific to the data source, if any, to the given String. | |||
void | setCurrency(int columnIndex, boolean property) | Sets whether the designated column is a cash value. | |||
void | setNullable(int columnIndex, int property) | Sets whether the designated column's value can be set to NULL. | |||
void | setPrecision(int columnIndex, int precision) | Sets the designated column's number of decimal digits to the given int. | |||
void | setScale(int columnIndex, int scale) | Sets the designated column's number of digits to the right of the decimal point to the given int. | |||
void | setSchemaName(int columnIndex, java.lang.String schemaName) | Sets the name of the designated column's table's schema, if any, to the given String. | |||
void | setSearchable(int columnIndex, boolean property) | Sets whether the designated column can be used in a where clause. | |||
void | setSigned(int columnIndex, boolean property) | Sets whether the designated column is a signed number. | |||
void | setTableName(int columnIndex, java.lang.String tableName) | Sets the designated column's table name, if any, to the given String. | |||
ParameterMetaData | java.lang.String | getParameterClassName(int param) | Retrieves the fully-qualified name of the Java class whose instances should be passed to the method PreparedStatement.setObject. | 返回java.lang.String | string |
int | getParameterCount() | Retrieves the number of parameters in the PreparedStatement object for which this ParameterMetaData object contains information. | 返回数量 | 返回数量 | |
int | getParameterMode(int param) | Retrieves the designated parameter's mode. | 1:ParameterMetaData.parameterModeIn, 3:ParameterMetaData.parameterModeOut, or 4:ParameterMetaData.parameterModeInOut 0:ParameterMetaData.parameterModeUnknown | 1 | |
int | getParameterType(int param) | Retrieves the designated parameter's SQL type. | 返回12(mysql 不支持) | ||
java.lang.String | getParameterTypeName(int param) | Retrieves the designated parameter's database- specific type name. | 返回类型如VARCHAR | 返回类型 | |
int | getPrecision(int param) | Retrieves the designated parameter's specified column size. | 0 | 0 | |
int | getScale(int param) | Retrieves the designated parameter's number of digits to right of the decimal point. | 0 | 0 | |
int | isNullable(int param) | Retrieves whether null values are allowed in the designated parameter. | 报异常 | ||
boolean | isSigned(int param) | Retrieves whether values for the designated parameter can be signed numbers. | FALSE | FALSE |