-
Notifications
You must be signed in to change notification settings - Fork 19
JDBC status
The following things are known to have issues or are not supported yet:
- Date/time values are broken in tarantool.
- BLOBs are broken in tarantool.
- Large INTEGER values cannot be inserted (broken in tarantool too).
- No callable / prepared callable statements.
- No escape syntax support.
- No batch execution.
- 75% of provided metainfo is incorrect or not verified.
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:
package java.sql;
Interface | Required? | Supported? | Covered? | Details |
---|---|---|---|---|
Connection | 35/55 | 17/35 + 2/20 optional | 9/35 + 2/20 optional | |
DatabaseMetaData | 178/178 | 46/178 | 9/178 | |
Wrapper | Yes | No | No | #73 |
Driver | ||||
DriverAction | ||||
ParameterMetaData | ||||
PreparedStatement | ||||
Ref | ||||
ResultSet | ||||
ResultSetMetaData | ||||
RowId | ||||
Savepoint | ||||
SQLData | ||||
SQLInput | ||||
SQLOutput | ||||
Statement | ||||
Array | No | No | No | #65; blocked |
Blob | No | No | No | #67 |
CallableStatement | No | No | No | #64 |
Clob | No | No | No | #66; blocked |
NClob | No | No | No | #68; blocked |
SQLType | N/A | N/A | N/A | |
SQLXML | No | No | No | #69; blocked |
Struct | No | No | No | #70; blocked |
interface java.sql.Connection;
Method | Required? | Supported? | Covered? | Details |
---|---|---|---|---|
abort | Yes | No | No | #71 |
clearWarnings | Yes | Yes | No | dumb, but enough |
close | Yes | Yes | Yes | |
commit | Yes | No | No | #63; blocked |
createStatement | Yes | Yes | Yes | |
createStatement(type, concurrency) | Yes | No | No | #85, #86 |
createStatement(type, concurrency, holdability) | Yes | No | No | #85, #86 |
getAutoCommit | Yes | No | No | #63; blocked |
getCatalog | Yes | Yes | No | dumb, but enough |
getClientInfo | Yes | No | No | #74 |
getClientInfo(name) | Yes | No | No | #74 |
getHoldability | Yes | Yes | Yes | |
getMetaData | Yes | Yes | Yes | |
getSchema | Yes | Yes | No | dumb, but enough |
getTransactionIsolation | Yes | No | No | #103; blocked |
getWarnings | Yes | Yes | No | dumb, but enough |
isClosed | Yes | Yes | Yes | |
isReadOnly | Yes | Yes | No | dumb, but enough |
isValid | Yes | No | No | #75 |
nativeSQL | Yes | No | No | #76 |
prepareStatement(sql) | Yes | Yes | Yes | |
prepareStatement(sql, NO_GENERATED_KEYS) | Yes | No | No | #78 |
prepareStatement(sql, type, concurrency) | Yes | No | No | #85, #86 |
prepareStatement(sql, type, concurrency, holdability) | Yes | No | No | #85, #86 |
rollback | Yes | No | No | #63; blocked |
setAutoCommit | Yes | No | No | #63; blocked |
setCatalog | Yes | Yes | No | dumb, but enough |
setClientInfo(properties) | Yes | No | No | #74 |
setClientInfo(name, value) | Yes | No | No | #74 |
setHoldability | Yes | Yes | Yes | |
setReadOnly | Yes | Yes | No | dumb, but enough |
setSchema | Yes | Yes | No | dumb, but enough |
setTransactionIsolation | Yes | No | No | #103; blocked |
isWrapperFor | Yes | Yes | Yes | |
unwrap | Yes | Yes | Yes | |
createArrayOf | No | No | No | #65; blocked |
createBlob | No | No | No | #67 |
createClob | No | No | No | #66; blocked |
createNClob | No | No | No | #68; blocked |
createSQLXML | No | No | No | #69; blocked |
createStruct | No | No | No | #70; blocked |
getNetworkTimeout | No | Yes | Yes | |
getTypeMap | No | No | No | |
prepareCall(sql) | No | No | No | |
prepareCall(sql, type, concurrency) | No | No | No | #85, #86 |
prepareCall(sql, type, concurrency, holdability) | No | No | No | #85, #86 |
prepareStatement(sql, RETURN_GENERATED_KEYS) | No | No | No | #77; blocked |
prepareStatement(sql, columnIndexes) | No | No | No | #77; blocked |
prepareStatement(sql, columnNames) | No | No | No | #77; blocked |
releaseSavepoint | No | No | No | |
rollback(savepoint) | No | No | No | |
setNetworkTimeout | No | Yes | Yes | |
setSavepoint | No | No | No | |
setSavepoint(name) | No | No | No | |
setTypeMap | No | No | No |
interface java.sql.DatabaseMetaData;
Method | Required? | Supported? | Covered? | Details |
---|---|---|---|---|
allProceduresAreCallable | Yes | ? | No | #110 |
allTablesAreSelectable | Yes | ? | No | #110 |
autoCommitFailureClosesAllResultSets | Yes | ? | No | #112 |
dataDefinitionCausesTransactionCommit | Yes | ? | No | #112 |
dataDefinitionIgnoredInTransactions | Yes | ? | No | #112 |
deletesAreDetected | Yes | Yes | No | |
doesMaxRowSizeIncludeBlobs | Yes | ? | No | #109 |
generatedKeyAlwaysReturned | Yes | ? | No | #112 |
getAttributes | Yes | Yes | No | dumb, but enough (until we'll add UDTs) |
getBestRowIdentifier | Yes | No | No | #114 |
getCatalogs | Yes | Yes | No | |
getCatalogSeparator | Yes | Yes | No | |
getCatalogTerm | Yes | No | No | #105 |
getClientInfoProperties | Yes | No | No | #74 |
getColumnPrivileges | Yes | No | No | #115 |
getColumns | Yes | Yes | Yes | |
getConnection | Yes | Yes | No | |
getCrossReference | Yes | No | No | #116 |
getDatabaseMajorVersion | Yes | No | No | #106 |
getDatabaseMinorVersion | Yes | No | No | #106 |
getDatabaseProductName | Yes | Yes | No | #106 |
getDatabaseProductVersion | Yes | Yes | No | #106 |
getDefaultTransactionIsolation | Yes | No | No | #103; blocked |
getDriverMajorVersion | Yes | Yes | No | |
getDriverMinorVersion | Yes | Yes | No | |
getDriverName | Yes | Yes | No | |
getDriverVersion | Yes | Yes | No | |
getExportedKeys | Yes | No | No | #116 |
getExtraNameCharacters | Yes | No | No | #105 |
getFunctionColumns | Yes | No | No | #118 |
getFunctions | Yes | No | No | #104 |
getIdentifierQuoteString | Yes | No | No | #105 |
getImportedKeys | Yes | No | No | #116 |
getIndexInfo | Yes | No | No | #117 |
getJDBCMajorVersion | Yes | Yes | No | #106 |
getJDBCMinorVersion | Yes | Yes | No | #106 |
getMaxBinaryLiteralLength | Yes | No | No | #105 |
getMaxCatalogNameLength | Yes | No | No | #105 |
getMaxCharLiteralLength | Yes | No | No | #105 |
getMaxColumnNameLength | Yes | No | No | #105 |
getMaxColumnsInGroupBy | Yes | No | No | #109 |
getMaxColumnsInIndex | Yes | No | No | #109 |
getMaxColumnsInOrderBy | Yes | No | No | #109 |
getMaxColumnsInSelect | Yes | No | No | #109 |
getMaxColumnsInTable | Yes | No | No | #109 |
getMaxConnections | Yes | No | No | #109 |
getMaxCursorNameLength | Yes | No | No | #105 |
getMaxIndexLength | Yes | No | No | #105 |
getMaxLogicalLobSize | Yes | No | No | #109 |
getMaxProcedureNameLength | Yes | No | No | #105 |
getMaxRowSize | Yes | No | No | #109 |
getMaxSchemaNameLength | Yes | No | No | #105 |
getMaxStatementLength | Yes | No | No | #105 |
getMaxStatements | Yes | No | No | #109 |
getMaxTableNameLength | Yes | No | No | #105 |
getMaxTablesInSelect | Yes | No | No | #109 |
getMaxUserNameLength | Yes | No | No | #105 |
getNumericFunctions | Yes | No | No | #82 |
getPrimaryKeys | Yes | Yes | Yes | |
getProcedureColumns | Yes | No | No | #118 |
getProcedures | Yes | No | No | #104 |
getProcedureTerm | Yes | No | No | #105 |
getPseudoColumns | Yes | Yes | No | dumb, but enough |
getResultSetHoldability | Yes | Yes | Yes | |
getRowIdLifetime | Yes | Yes | No | |
getSchemas() | Yes | Yes | No | |
getSchemas(catalog, schemaPattern) | Yes | Yes | No | |
getSchemaTerm | Yes | No | No | #105 |
getSearchStringEscape | Yes | No | No | #105 |
getSQLKeywords | Yes | No | No | #105 |
getSQLStateType | Yes | No | No | #119 |
getStringFunctions | Yes | No | No | #82 |
getSuperTables | Yes | Yes | No | dumb, but enough (until we'll add structured types) |
getSuperTypes | Yes | Yes | No | dumb, but enough (until we'll add structured types) |
getSystemFunctions | Yes | No | No | #82 |
getTablePrivileges | Yes | No | No | #115 |
getTables | Yes | Yes | Yes | |
getTableTypes | Yes | No | No | #107 |
getTimeDateFunctions | Yes | No | No | #82 |
getTypeInfo | Yes | No | No | #113 |
getUDTs | Yes | Yes | No | dumb, but enough |
getURL | Yes | Yes | No | |
getUserName | Yes | Yes | No | |
getVersionColumns | Yes | Yes | No | |
insertsAreDetected | Yes | Yes | No | |
isCatalogAtStart | Yes | Yes | No | |
isReadOnly | Yes | Yes | No | dumb, but enough |
locatorsUpdateCopy | Yes | Yes | No | |
nullPlusNonNullIsNull | Yes | Yes | No | |
nullsAreSortedAtEnd | Yes | No | No | #120 |
nullsAreSortedAtStart | Yes | No | No | #120 |
nullsAreSortedHigh | Yes | No | No | #120 |
nullsAreSortedLow | Yes | No | No | #120 |
othersDeletesAreVisible | Yes | Yes | No | |
othersInsertsAreVisible | Yes | Yes | No | |
othersUpdatesAreVisible | Yes | Yes | No | |
ownDeletesAreVisible | Yes | Yes | No | |
ownInsertsAreVisible | Yes | Yes | No | |
ownUpdatesAreVisible | Yes | Yes | No | |
storesLowerCaseIdentifiers | Yes | Yes | No | #105 |
storesLowerCaseQuotedIdentifiers | Yes | Yes | No | #105 |
storesMixedCaseIdentifiers | Yes | No | No | #105 |
storesMixedCaseQuotedIdentifiers | Yes | Yes | No | #105 |
storesUpperCaseIdentifiers | Yes | No | No | #105 |
storesUpperCaseQuotedIdentifiers | Yes | Yes | No | #105 |
supportsAlterTableWithAddColumn | Yes | ? | No | #108 |
supportsAlterTableWithDropColumn | Yes | ? | No | #108 |
supportsANSI92EntryLevelSQL | Yes | ? | No | #108 |
supportsANSI92FullSQL | Yes | ? | No | #108 |
supportsANSI92IntermediateSQL | Yes | ? | No | #108 |
supportsBatchUpdates | Yes | ? | No | #108 |
supportsCatalogsInDataManipulation | Yes | ? | No | #108 |
supportsCatalogsInIndexDefinitions | Yes | ? | No | #108 |
supportsCatalogsInPrivilegeDefinitions | Yes | ? | No | #108 |
supportsCatalogsInProcedureCalls | Yes | ? | No | #108 |
supportsCatalogsInTableDefinitions | Yes | ? | No | #108 |
supportsColumnAliasing | Yes | ? | No | #108 |
supportsConvert | Yes | ? | No | #108 |
supportsConvert | Yes | ? | No | #108 |
supportsCoreSQLGrammar | Yes | ? | No | #108 |
supportsCorrelatedSubqueries | Yes | ? | No | #108 |
supportsDataDefinitionAndDataManipulationTransactions | Yes | ? | No | #108 |
supportsDataManipulationTransactionsOnly | Yes | ? | No | #108 |
supportsDifferentTableCorrelationNames | Yes | ? | No | #108 |
supportsExpressionsInOrderBy | Yes | ? | No | #108 |
supportsExtendedSQLGrammar | Yes | ? | No | #108 |
supportsFullOuterJoins | Yes | ? | No | #108 |
supportsGetGeneratedKeys | Yes | ? | No | #108 |
supportsGroupBy | Yes | ? | No | #108 |
supportsGroupByBeyondSelect | Yes | ? | No | #108 |
supportsGroupByUnrelated | Yes | ? | No | #108 |
supportsIntegrityEnhancementFacility | Yes | ? | No | #108 |
supportsLikeEscapeClause | Yes | ? | No | #108 |
supportsLimitedOuterJoins | Yes | ? | No | #108 |
supportsMinimumSQLGrammar | Yes | ? | No | #108 |
supportsMixedCaseIdentifiers | Yes | No | No | #105 + #108 |
supportsMixedCaseQuotedIdentifiers | Yes | No | No | #105 + #108 |
supportsMultipleOpenResults | Yes | ? | No | #108 |
supportsMultipleResultSets | Yes | ? | No | #108 |
supportsMultipleTransactions | Yes | ? | No | #108 |
supportsNamedParameters | Yes | ? | No | #108 |
supportsNonNullableColumns | Yes | ? | No | #108 |
supportsOpenCursorsAcrossCommit | Yes | ? | No | #108 |
supportsOpenCursorsAcrossRollback | Yes | ? | No | #108 |
supportsOpenStatementsAcrossCommit | Yes | ? | No | #108 |
supportsOpenStatementsAcrossRollback | Yes | ? | No | #108 |
supportsOrderByUnrelated | Yes | ? | No | #108 |
supportsOuterJoins | Yes | ? | No | #108 |
supportsPositionedDelete | Yes | ? | No | #108 |
supportsPositionedUpdate | Yes | ? | No | #108 |
supportsRefCursors | Yes | ? | No | #108 |
supportsResultSetConcurrency | Yes | ? | No | #108 |
supportsResultSetHoldability | Yes | Yes | Yes | |
supportsResultSetType | Yes | ? | No | #108 |
supportsSavepoints | Yes | ? | No | #108 |
supportsSchemasInDataManipulation | Yes | ? | No | #108 |
supportsSchemasInIndexDefinitions | Yes | ? | No | #108 |
supportsSchemasInPrivilegeDefinitions | Yes | ? | No | #108 |
supportsSchemasInProcedureCalls | Yes | ? | No | #108 |
supportsSchemasInTableDefinitions | Yes | ? | No | #108 |
supportsSelectForUpdate | Yes | ? | No | #108 |
supportsStatementPooling | Yes | ? | No | #108 |
supportsStoredFunctionsUsingCallSyntax | Yes | No | No | #82 + #108 |
supportsStoredProcedures | Yes | No | No | #82 + #108 |
supportsSubqueriesInComparisons | Yes | ? | No | #108 |
supportsSubqueriesInExists | Yes | ? | No | #108 |
supportsSubqueriesInIns | Yes | ? | No | #108 |
supportsSubqueriesInQuantifieds | Yes | ? | No | #108 |
supportsTableCorrelationNames | Yes | ? | No | #108 |
supportsTransactionIsolationLevel | Yes | No | No | #103 + #108; blocked |
supportsTransactions | Yes | No | No | #63 + #108; blocked |
supportsUnion | Yes | ? | No | #108 |
supportsUnionAll | Yes | ? | No | #108 |
updatesAreDetected | Yes | Yes | No | |
usesLocalFilePerTable | Yes | Yes | No | |
usesLocalFiles | Yes | Yes | No | |
isWrapperFor | Yes | No | No | #73 |
unwrap | Yes | No | No | #73 |
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 |
---|---|---|---|---|
FLOAT | Types.FLOAT | double | No | |
DOUBLE | Types.DOUBLE | double | No | |
REAL | Types.REAL | float | No | |
INT | Types.INTEGER | BigInteger | No | |
INTEGER | Types.INTEGER | BigInteger | No | |
DECIMAL | Types.DECIMAL | BigDecimal | No | |
DECIMAL(N) | Types.DECIMAL | BigDecimal | No | |
DECIMAL(N, M) | Types.DECIMAL | BigDecimal | No | |
NUMERIC | Types.NUMERIC | BigDecimal | No | |
NUMERIC(N) | Types.NUMERIC | BigDecimal | No | |
NUMERIC(N, M) | Types.NUMERIC | BigDecimal | No | |
NUM | Types.NUMERIC | BigDecimal | No | |
NUM(N) | Types.NUMERIC | BigDecimal | No | |
NUM(N, M) | Types.NUMERIC | BigDecimal | No | |
DATE | Types.DATE | java.sql.Date | No | blocked by #3694 |
TIME | Types.TIME | java.sql.Time | No | blocked by #3694 |
DATETIME | N/A | N/A | N/A | to be removed |
TIMESTAMP | Types.TIMESTAMP | java.sql.Timestamp | No | blocked by #3694 |
CHAR(N) | Types.CHAR | String | No | |
VARCHAR(N) | Types.VARCHAR | String | No | |
TEXT | Types.VARCHAR | String | No | |
BLOB | Types.VARBINARY | byte[] | No | blocked by #3650, tracked by #45 |
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 |
---|---|---|
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 |
DECIMAL | number | same as REAL |
DECIMAL(N) | number | same as REAL |
DECIMAL(N, M) | number | same as REAL |
NUMERIC | number | same as REAL |
NUMERIC(N) | number | same as REAL |
NUMERIC(N, M) | number | same as REAL |
NUM | number | same as REAL |
NUM(N) | number | same as REAL |
NUM(N, M) | number | same as REAL |
DATE | number | broken at all (blocked by #3694) |
TIME | number | broken at all (blocked by #3694) |
DATETIME | number | broken at all (blocked by #3694) |
CHAR(N) | string | native string (of any length) |
VARCHAR(N) | string | native string (of any length) |
TEXT | string | native string (of any length) |
BLOB | scalar | native scalar (blocked by #3650, tracked by #45) |
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 |
Transaction and isolation level metainformation methods correctly reports now that transactions do not supported, but they are marked as 'No' in 'Supported?' column. This is because JDBC compliant driver must support transactions and at least highest (serializable) isolation level, so just report that we don't support these features does not make our driver JDBC compliant. Also we cannot report serializable isolation level before transactions will be supported, because the API states we must report TRANSACTION_NONE isolation level when transactions does not supported (see DatabaseMetaData.supportsTransactions()).