forked from dork/tarantool-java
-
Notifications
You must be signed in to change notification settings - Fork 19
JDBC status
Nikolai Ivanov edited this page May 21, 2019
·
46 revisions
The following things are known to have issues or are not supported yet while is supported by Tarantool itself:
- No escape syntax support.
- No batch execution.
- Metainfo need to be verified.
- No In/Out parameters metadata provided for prepared statements.
- ResultSet metainfo is not fully implemented.
This is not an exhaustive list.
Here is a potential list of software to test JDBC completeness coverage level:
Web apps:
Libraries / Frameworks:
Dev apps / Clients:
| Interface | Required | Supported | Covered | Details |
|---|---|---|---|---|
| Connection | 32 | 19 | 12 | |
| DatabaseMetaData | 176 | 52 | 20 | |
| Driver | 7 | 7 | 4 | |
| ParameterMetaData | 9 | 0 | 0 | #173 |
| PreparedStatement | 34 | 27 | 12 | |
| ResultSet | 56 | 47 | 16 | |
| ResultSetMetaData | 21 | 3 | 3 | |
| Statement | 37 | 17 | 12 | |
| Wrapper | 16 | 12 | 12 |
| Method | Milestone | Details |
|---|---|---|
| abort(Executor) | MVP | #71 |
| getClientInfo() | MVP | #74 |
| getClientInfo(String) | MVP | #74 |
| nativeSQL(String) | MVP | #76 |
| setClientInfo(Properties) | MVP | #74 |
| setClientInfo(String, String) | MVP | #74 |
| commit() | transactions | #63; blocked |
| getAutoCommit() | transactions | #63; blocked |
| getTransactionIsolation() | transactions | #103; blocked |
| rollback() | transactions | #63; blocked |
| setAutoCommit(boolean) | transactions | #63; blocked |
| setReadOnly(boolean) | transactions | #176; blocked |
| setTransactionIsolation(int) | transactions | #103; blocked |
| Method | Milestone | Details |
|---|---|---|
| allProceduresAreCallable() | metadata | #110 |
| allTablesAreSelectable() | metadata | #110 |
| autoCommitFailureClosesAllResultSets() | metadata | #112 |
| dataDefinitionCausesTransactionCommit() | metadata | #112 |
| dataDefinitionIgnoredInTransactions() | metadata | #112 |
| doesMaxRowSizeIncludeBlobs() | metadata | #109 |
| generatedKeyAlwaysReturned() | metadata | #112 |
| getBestRowIdentifier(String, String, String, int, boolean) | metadata | #114 |
| getCatalogs() | metadata | #105 |
| getClientInfoProperties() | metadata | #74 |
| getColumnPrivileges(String, String, String, String) | metadata | #115 |
| getCrossReference(String x 6) | metadata | #116 |
| getDatabaseMajorVersion() | metadata | #106 |
| getDatabaseMinorVersion() | metadata | #106 |
| getDefaultTransactionIsolation() | metadata | #108 |
| getExportedKeys(String, String, String) | metadata | #116 |
| getExtraNameCharacters() | metadata | #105 |
| getFunctionColumns(String, String, String, String) | metadata | #118 |
| getFunctions(String, String, String) | metadata | #104 |
| getIdentifierQuoteString() | metadata | #105 |
| getImportedKeys(String, String, String) | metadata | #116 |
| getIndexInfo(String, String, String, boolean, boolean) | metadata | #117 |
| getMaxBinaryLiteralLength() | metadata | #105 |
| getMaxCatalogNameLength() | metadata | #105 |
| getMaxCharLiteralLength() | metadata | #105 |
| getMaxColumnNameLength() | metadata | #105 |
| getMaxColumnsInGroupBy() | metadata | #109 |
| getMaxColumnsInIndex() | metadata | #109 |
| getMaxColumnsInOrderBy() | metadata | #109 |
| getMaxColumnsInSelect() | metadata | #109 |
| getMaxColumnsInTable() | metadata | #109 |
| getMaxConnections() | metadata | #109 |
| getMaxCursorNameLength() | metadata | #105 |
| getMaxIndexLength() | metadata | #105 |
| getMaxLogicalLobSize() | metadata | #109 |
| getMaxProcedureNameLength() | metadata | #105 |
| getMaxRowSize() | metadata | #109 |
| getMaxSchemaNameLength() | metadata | #105 |
| getMaxStatementLength() | metadata | #105 |
| getMaxStatements() | metadata | #109 |
| getMaxTableNameLength() | metadata | #105 |
| getMaxTablesInSelect() | metadata | #109 |
| getMaxUserNameLength() | metadata | #105 |
| getNumericFunctions() | metadata | #82 |
| getProcedureColumns(String, String, String, String) | metadata | #118 |
| getProcedureTerm() | metadata | #104 |
| getProcedures(String, String, String) | metadata | #105 |
| getSchemaTerm() | metadata | #105 |
| getSchemas() | metadata | #105 |
| getSchemas(String, String) | metadata | #105 |
| getSearchStringEscape() | metadata | #119 |
| getStringFunctions() | metadata | #82 |
| getSystemFunctions() | metadata | #82 |
| getTablePrivileges(String, String, String) | metadata | #115 |
| getTables(String, String, String, String[]) | metadata | #107 |
| getTimeDateFunctions() | metadata | #82 |
| getTypeInfo() | metadata | #113 |
| storesMixedCaseIdentifiers() | metadata | #105 |
| storesUpperCaseIdentifiers() | metadata | #105 |
| supportsANSI92EntryLevelSQL() | metadata | #108 |
| supportsANSI92FullSQL() | metadata | #108 |
| supportsANSI92IntermediateSQL() | metadata | #108 |
| supportsAlterTableWithAddColumn() | metadata | #108 |
| supportsAlterTableWithDropColumn() | metadata | #108 |
| supportsBatchUpdates() | metadata | #108 |
| supportsCatalogsInDataManipulation() | metadata | #108 |
| supportsCatalogsInIndexDefinitions() | metadata | #108 |
| supportsCatalogsInPrivilegeDefinitions() | metadata | #108 |
| supportsCatalogsInProcedureCalls() | metadata | #108 |
| supportsCatalogsInTableDefinitions() | metadata | #108 |
| supportsColumnAliasing() | metadata | #108 |
| supportsConvert() | metadata | #108 |
| supportsConvert(int fromType, int toType) | metadata | #108 |
| supportsCoreSQLGrammar() | metadata | #108 |
| supportsCorrelatedSubqueries() | metadata | #108 |
| supportsDataDefinitionAndDataManipulationTransactions() | metadata | #108 |
| supportsDataManipulationTransactionsOnly() | metadata | #108 |
| supportsDifferentTableCorrelationNames() | metadata | #108 |
| supportsExpressionsInOrderBy() | metadata | #108 |
| supportsExtendedSQLGrammar() | metadata | #108 |
| supportsFullOuterJoins() | metadata | #108 |
| supportsGetGeneratedKeys() | metadata | #108 |
| supportsGroupBy() | metadata | #108 |
| supportsGroupByBeyondSelect() | metadata | #108 |
| supportsGroupByUnrelated() | metadata | #108 |
| supportsIntegrityEnhancementFacility() | metadata | #108 |
| supportsLikeEscapeClause() | metadata | #108 |
| supportsLimitedOuterJoins() | metadata | #108 |
| supportsMinimumSQLGrammar() | metadata | #108 |
| supportsMixedCaseIdentifiers() | metadata | #105 + #108 |
| supportsMixedCaseQuotedIdentifiers() | metadata | #105 + #108 |
| supportsMultipleOpenResults() | metadata | #108 |
| supportsMultipleResultSets() | metadata | #108 |
| supportsMultipleTransactions() | metadata | #108 |
| supportsNamedParameters() | metadata | #108 |
| supportsNonNullableColumns() | metadata | #108 |
| supportsOpenCursorsAcrossCommit() | metadata | #108 |
| supportsOpenCursorsAcrossRollback() | metadata | #108 |
| supportsOpenStatementsAcrossCommit() | metadata | #108 |
| supportsOpenStatementsAcrossRollback() | metadata | #108 |
| supportsOrderByUnrelated() | metadata | #108 |
| supportsOuterJoins() | metadata | #108 |
| supportsPositionedDelete() | metadata | #108 |
| supportsPositionedUpdate() | metadata | #108 |
| supportsRefCursors() | metadata | #108 |
| supportsSavepoints() | metadata | #108 |
| supportsSchemasInDataManipulation() | metadata | #108 |
| supportsSchemasInIndexDefinitions() | metadata | #108 |
| supportsSchemasInPrivilegeDefinitions() | metadata | #108 |
| supportsSchemasInProcedureCalls() | metadata | #108 |
| supportsSchemasInTableDefinitions() | metadata | #108 |
| supportsSelectForUpdate() | metadata | #108 |
| supportsStatementPooling() | metadata | #108 |
| supportsStoredFunctionsUsingCallSyntax() | metadata | #82 + #108 |
| supportsStoredProcedures() | metadata | #82 + #108 |
| supportsSubqueriesInComparisons() | metadata | #108 |
| supportsSubqueriesInExists() | metadata | #108 |
| supportsSubqueriesInIns() | metadata | #108 |
| supportsSubqueriesInQuantifieds() | metadata | #108 |
| supportsTableCorrelationNames() | metadata | #108 |
| supportsTransactionIsolationLevel(int) | metadata | #108 |
| supportsTransactions() | metadata | #108 |
| supportsUnion() | metadata | #108 |
| supportsUnionAll() | metadata | #108 |
| Method | Milestone | Details |
|---|---|---|
| getParameterClassName(int) | transactions | #173 |
| getParameterCount() | transactions | #173 |
| getParameterMode(int) | transactions | #173 |
| getParameterType(int) | transactions | #173 |
| getParameterTypeName(int) | transactions | #173 |
| getPrecision(int) | transactions | #173 |
| getScale(int) | transactions | #173 |
| isNullable(int) | transactions | #173 |
| isSigned(int) | transactions | #173 |
| Method | Milestone | Details |
|---|---|---|
| addBatch() | MVP | #62 |
| getParameterMetaData() | transactions | #173 |
| setAsciiStream(int, InputStream, long) | ||
| setBinaryStream(int, InputStream, long) | ||
| setCharacterStream(int, Reader, int) | ||
| setCharacterStream(int, Reader, long) | ||
| setObject(int, Object, SQLType) | ||
| setObject(int, Object, SQLType, int) |
| Method | Milestone | Details |
|---|---|---|
| wasNull() | MVP | #179 |
| getDate(String, Calendar) | transactions | #91; blocked |
| getDate(int, Calendar) | transactions | #91; blocked |
| getTime(String, Calendar) | transactions | #91; blocked |
| getTime(int, Calendar) | transactions | #91; blocked |
| getTimestamp(String, Calendar) | transactions | #91; blocked |
| getTimestamp(int, Calendar) | transactions | #91; blocked |
| setFetchSize(int) | transactions | #178 |
| getFetchSize() | transactions | #178 |
| Method | Milestone | Details |
|---|---|---|
| getCatalogName(int) | ||
| getColumnClassName(int) | ||
| getColumnDisplaySize(int) | ||
| getColumnType(int) | ||
| getColumnTypeName(int) | ||
| getPrecision(int) | ||
| getScale(int) | ||
| getSchemaName(int) | ||
| getTableName(int) | ||
| isAutoIncrement(int) | ||
| isCaseSensitive(int) | ||
| isCurrency(int) | ||
| isDefinitelyWritable(int) | ||
| isNullable(int) | ||
| isReadOnly(int) | ||
| isSearchable(int) | ||
| isSigned(int) | ||
| isWritable(int) |
| Method | Milestone | Details |
|---|---|---|
| addBatch(String) | MVP | #62 |
| clearBatch() | MVP | #62 |
| executeBatch() | MVP | #62 |
| closeOnCompletion() | MVP | #180 |
| isCloseOnCompletion() | MVP | #180 |
| isPoolable() | MVP | #181 |
| setPoolable(boolean) | MVP | #181 |
| getMoreResults() | MVP | #182 |
| executeLargeBatch() | - | enough |
| executeLargeUpdate(String) | - | enough |
| getLargeMaxRows() | - | enough |
| getLargeUpdateCount() | - | enough |
| getMaxFieldSize() | MVP | [#189][#189] |
| getQueryTimeout() | MVP | [#155][#155] |
| setEscapeProcessing(boolean) | ||
| setLargeMaxRows(long) | - | enough |
| setMaxFieldSize(int) | MVP | [#189][#189] |
| setQueryTimeout(int) | MVP | [#155][#155] |
| getFetchSize() | transactions | #178 |
| setFetchSize(int) | transactions | #178 |
| Method | Milestone | Details |
|---|---|---|
| DataSource.isWrapperFor(Class<?>) | MVP | #175 |
| DataSource.unwrap(Class) | MVP | #175 |
| ParameterMetaData.isWrapperFor(Class<?>) | transactions | #173 |
| ParameterMetaData.unwrap(Class) | transactions | #173 |
Tarantool/SQL types are going to be more strict, so tables below will be updated to reflect current Tarantool and Tarantool/SQL types.
Mapping from Tarantool/SQL types into JDBC and Java types:
| Tarantool/SQL | JDBC | Java | Supported? | Details |
|---|---|---|---|---|
| BOOL | Types.BOOLEAN | boolean | No | only in 2.2 #92 |
| BOOLEAN | Types.BOOLEAN | boolean | No | only in 2.2 #92 |
| FLOAT | Types.FLOAT | double | Yes | |
| DOUBLE | Types.DOUBLE | double | Yes | |
| REAL | Types.REAL | float | Yes | |
| INT | Types.INTEGER | BigInteger | No | see also #3810; no select to BigInteger #92 |
| INTEGER | Types.INTEGER | BigInteger | No | see also #3810 |
| DECIMAL | Types.DECIMAL | BigDecimal | No | blocked by #692 and #3672 |
| DECIMAL(N) | Types.DECIMAL | BigDecimal | No | blocked by #692 and #3672 |
| DECIMAL(N, M) | Types.DECIMAL | BigDecimal | No | blocked by #692 and #3672 |
| NUMERIC | Types.NUMERIC | BigDecimal | No | blocked by #692 and #3672 |
| NUMERIC(N) | Types.NUMERIC | BigDecimal | No | blocked by #692 and #3672 |
| NUMERIC(N, M) | Types.NUMERIC | BigDecimal | No | blocked by #692 and #3672 |
| NUM | Types.NUMERIC | BigDecimal | No | blocked by #692 and #3672 |
| NUM(N) | Types.NUMERIC | BigDecimal | No | blocked by #692 and #3672 |
| NUM(N, M) | Types.NUMERIC | BigDecimal | No | blocked by #692 and #3672 |
| DATE | Types.DATE | java.sql.Date | No | blocked by #3694 |
| TIME | Types.TIME | java.sql.Time | No | blocked by #3694 |
| TIMESTAMP | Types.TIMESTAMP | java.sql.Timestamp | No | blocked by #3694 |
| CHAR(N) | Types.CHAR | String | No | blocked by #3665 |
| VARCHAR(N) | Types.VARCHAR | String | Yes | |
| TEXT | Types.VARCHAR | String | Yes | |
| SCALAR | No | only binary strings are tested #92 |
Mapping from Tarantool/SQL types into Tarantool native types (space format / index format) and additional Tarantool/SQL constraints (for reference):
| Tarantool/SQL | Tarantool native | Tarantool/SQL constraints |
|---|---|---|
| BOOL | boolean | true / false (only in 2.2) |
| BOOLEAN | boolean | true / false (only in 2.2) |
| FLOAT | number | float64 for insert, native number (int+fp) for select |
| DOUBLE | number | float64 for insert, native number (int+fp) for select |
| REAL | number | float64 for insert, native number (int+fp) for select |
| INT | integer | -2^63 .. 2^63-1 for insert, native integer (-2^63 .. 2^64-1) for select; #3810 |
| INTEGER | integer | -2^63 .. 2^63-1 for insert, native integer (-2^63 .. 2^64-1) for select; #3810 |
| VARCHAR(N) | string | native string (of any length) |
| TEXT | string | native string (of any length) |
| SCALAR | scalar | native scalar |
Tarantool native types, msgpack and Lua types (for reference):
| Tarantool native | Msgpack | Lua |
|---|---|---|
| integer | nil, pos/neg fixint, int/uint 8/16/32/64 | nil/box.NULL, number, cdata(int64_t), cdata(uint64_t) |
| number | nil, pos/neg fixint, int/uint 8/16/32/64, float 32/64 | nil/box.NULL, number, cdata(int64_t), cdata(uint64_t) |
| string | nil, fixstr, str 8/16/32 | nil/box.NULL, string |
| scalar | all above, bin 8/16/32, bool | all above, bool |