Package org.sqlite.core
Class CoreDatabaseMetaData
- java.lang.Object
-
- org.sqlite.core.CoreDatabaseMetaData
-
- Direct Known Subclasses:
JDBC3DatabaseMetaData
public abstract class CoreDatabaseMetaData extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCoreDatabaseMetaData.PrimaryKeyFinderParses the sqlite_master table for a table's primary key
-
Field Summary
Fields Modifier and Type Field Description protected SQLiteConnectionconnprotected java.sql.PreparedStatementgetAttributesprotected java.sql.PreparedStatementgetBestRowIdentifierprotected java.sql.PreparedStatementgetCatalogsprotected java.sql.PreparedStatementgetColumnPrivilegesprotected java.sql.PreparedStatementgetColumnsTblNameprotected java.sql.PreparedStatementgetGeneratedKeysUsed to save generating a new statement every call.protected java.sql.PreparedStatementgetIndexInfoprotected java.sql.PreparedStatementgetProcedureColumnsprotected java.sql.PreparedStatementgetProceduresprotected java.sql.PreparedStatementgetSchemasprotected java.sql.PreparedStatementgetSuperTablesprotected java.sql.PreparedStatementgetSuperTypesprotected java.sql.PreparedStatementgetTablePrivilegesprotected java.sql.PreparedStatementgetTablesprotected java.sql.PreparedStatementgetTableTypesprotected java.sql.PreparedStatementgetTypeInfoprotected java.sql.PreparedStatementgetUDTsprotected java.sql.PreparedStatementgetVersionColumnsprotected static java.util.regex.PatternPK_NAMED_PATTERNPattern used to extract a named primary key.protected static java.util.regex.PatternPK_UNNAMED_PATTERNPattern used to extract column order for an unnamed primary key.intrefCountReference count.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCoreDatabaseMetaData(SQLiteConnection conn)Constructor that applies the Connection object.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckOpen()voidclose()protected java.lang.Stringescape(java.lang.String val)Applies SQL escapes for special characters in a given string.protected voidfinalize()abstract java.sql.ResultSetgetGeneratedKeys()protected static java.lang.Stringquote(java.lang.String tableName)Adds SQL string quotes to the given string.
-
-
-
Field Detail
-
conn
protected SQLiteConnection conn
-
getTables
protected java.sql.PreparedStatement getTables
-
getTableTypes
protected java.sql.PreparedStatement getTableTypes
-
getTypeInfo
protected java.sql.PreparedStatement getTypeInfo
-
getCatalogs
protected java.sql.PreparedStatement getCatalogs
-
getSchemas
protected java.sql.PreparedStatement getSchemas
-
getUDTs
protected java.sql.PreparedStatement getUDTs
-
getColumnsTblName
protected java.sql.PreparedStatement getColumnsTblName
-
getSuperTypes
protected java.sql.PreparedStatement getSuperTypes
-
getSuperTables
protected java.sql.PreparedStatement getSuperTables
-
getTablePrivileges
protected java.sql.PreparedStatement getTablePrivileges
-
getIndexInfo
protected java.sql.PreparedStatement getIndexInfo
-
getProcedures
protected java.sql.PreparedStatement getProcedures
-
getProcedureColumns
protected java.sql.PreparedStatement getProcedureColumns
-
getAttributes
protected java.sql.PreparedStatement getAttributes
-
getBestRowIdentifier
protected java.sql.PreparedStatement getBestRowIdentifier
-
getVersionColumns
protected java.sql.PreparedStatement getVersionColumns
-
getColumnPrivileges
protected java.sql.PreparedStatement getColumnPrivileges
-
getGeneratedKeys
protected java.sql.PreparedStatement getGeneratedKeys
Used to save generating a new statement every call.
-
refCount
public int refCount
Reference count.
-
PK_UNNAMED_PATTERN
protected static final java.util.regex.Pattern PK_UNNAMED_PATTERN
Pattern used to extract column order for an unnamed primary key.
-
PK_NAMED_PATTERN
protected static final java.util.regex.Pattern PK_NAMED_PATTERN
Pattern used to extract a named primary key.
-
-
Constructor Detail
-
CoreDatabaseMetaData
protected CoreDatabaseMetaData(SQLiteConnection conn)
Constructor that applies the Connection object.- Parameters:
conn- Connection object.
-
-
Method Detail
-
getGeneratedKeys
public abstract java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
checkOpen
protected void checkOpen() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
close
public void close() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
quote
protected static java.lang.String quote(java.lang.String tableName)
Adds SQL string quotes to the given string.- Parameters:
tableName- The string to quote.- Returns:
- The quoted string.
-
escape
protected java.lang.String escape(java.lang.String val)
Applies SQL escapes for special characters in a given string.- Parameters:
val- The string to escape.- Returns:
- The SQL escaped string.
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable- See Also:
Object.finalize()
-
-