Package | Description |
---|---|
tap.db |
Modifier and Type | Class and Description |
---|---|
class |
DBCancelledException
Exception thrown when a processing of a
DBConnection is cancelled. |
Modifier and Type | Method and Description |
---|---|
boolean |
JDBCConnection.addUploadedTable(TAPTable tableDef,
TableIterator data)
Important note:
Only tables uploaded by users can be created in the database.
|
boolean |
DBConnection.addUploadedTable(TAPTable tableDef,
TableIterator data)
Add the defined and given table inside the TAP_UPLOAD schema.
|
protected void |
JDBCConnection.checkUploadedTableDef(TAPTable tableDef)
Ensures that the given table MUST be inside the upload schema in ADQL.
|
protected void |
JDBCConnection.commit()
Commit the current transaction.
|
protected void |
JDBCConnection.createTAPSchemaTable(TAPTable table,
java.sql.Statement stmt)
Create the specified standard TAP_SCHEMA tables into the database.
|
protected void |
JDBCConnection.createTAPTableIndexes(TAPTable table,
java.sql.Statement stmt)
Create the DB indexes corresponding to the given TAP_SCHEMA table.
|
boolean |
JDBCConnection.dropUploadedTable(TAPTable tableDef)
Important note:
Only tables uploaded by users can be dropped from the database.
|
boolean |
DBConnection.dropUploadedTable(TAPTable tableDef)
Drop the specified uploaded table from the database.
|
protected void |
JDBCConnection.executeBatchUpdates(java.sql.PreparedStatement stmt,
int nbRows)
Execute all batched queries.
|
TableIterator |
JDBCConnection.executeQuery(ADQLQuery adqlQuery) |
TableIterator |
DBConnection.executeQuery(ADQLQuery adqlQuery)
Let executing the given ADQL query.
|
protected void |
JDBCConnection.executeUpdate(java.sql.PreparedStatement stmt,
int indRow)
"Execute" the query update.
|
protected void |
JDBCConnection.fillTAPSchema(TAPMetadata meta)
Fill all the standard tables of TAP_SCHEMA (schemas, tables, columns, keys and key_columns).
|
protected int |
JDBCConnection.fillUploadedTable(TAPTable metaTable,
TableIterator data)
Fill the table uploaded by the user with the given data.
|
protected static java.lang.String |
JDBCConnection.getDBMSName(java.lang.String dbUrl)
Deprecated.
(since 2.1) Should be replaced by
. |
TAPMetadata |
JDBCConnection.getTAPSchema()
In this implementation, this function is first creating a virgin
TAPMetadata object
that will be filled progressively by calling the following functions: |
TAPMetadata |
DBConnection.getTAPSchema()
Fetch the whole content of TAP_SCHEMA.
|
protected boolean |
JDBCConnection.isColumnExisting(java.lang.String schemaName,
java.lang.String tableName,
java.lang.String columnName,
java.sql.DatabaseMetaData dbMeta)
Tell whether the specified column exists in the specified table of the database.
|
protected boolean |
JDBCConnection.isTableExisting(java.lang.String schemaName,
java.lang.String tableName,
java.sql.DatabaseMetaData dbMeta)
Tell whether the specified table exists in the database.
|
protected void |
JDBCConnection.loadColumns(TAPTable tableDef,
java.util.List<TAPTable> lstTables,
java.util.Map<java.lang.String,TAPCoosys> mapCoosys,
java.sql.Statement stmt)
Load into the corresponding tables all columns listed in TAP_SCHEMA.columns.
|
protected void |
JDBCConnection.loadColumns(TAPTable tableDef,
java.util.List<TAPTable> lstTables,
java.sql.Statement stmt)
Deprecated.
This method is now replaced by
JDBCConnection.loadColumns(TAPTable, List, Map, Statement) which has an additional parameter:
the list of declared coordinate systems. |
protected java.util.Map<java.lang.String,TAPCoosys> |
JDBCConnection.loadCoosys(TAPTable tableDef,
TAPMetadata metadata,
java.sql.Statement stmt)
Load all coordinate systems declared in the TAP_SCHEMA.
|
protected void |
JDBCConnection.loadKeys(TAPTable keysDef,
TAPTable keyColumnsDef,
java.util.List<TAPTable> lstTables,
java.sql.Statement stmt)
Load into the corresponding tables all keys listed in TAP_SCHEMA.keys and detailed in TAP_SCHEMA.key_columns.
|
protected void |
JDBCConnection.loadSchemas(TAPTable tableDef,
TAPMetadata metadata,
java.sql.Statement stmt)
Load into the given metadata all schemas listed in TAP_SCHEMA.schemas.
|
protected java.util.List<TAPTable> |
JDBCConnection.loadTables(TAPTable tableDef,
TAPMetadata metadata,
java.sql.Statement stmt)
Load into the corresponding metadata all tables listed in TAP_SCHEMA.tables.
|
void |
JDBCConnection.setTAPSchema(TAPMetadata metadata)
This function is just calling the following functions:
|
void |
DBConnection.setTAPSchema(TAPMetadata metadata)
Empty and then fill all the TAP_SCHEMA tables with the given list of metadata.
|
protected void |
JDBCConnection.startTransaction()
Start a transaction.
|
Constructor and Description |
---|
JDBCConnection(java.sql.Connection conn,
JDBCTranslator translator,
java.lang.String connID,
TAPLog logger)
Create a JDBC connection by wrapping the given connection.
|
JDBCConnection(java.lang.String driverPath,
java.lang.String dbUrl,
java.lang.String dbUser,
java.lang.String dbPassword,
JDBCTranslator translator,
java.lang.String connID,
TAPLog logger)
Creates a JDBC connection to the specified database and with the specified JDBC driver.
|