Package org.sqlite.parser
Class DefaultSchemaProvider
java.lang.Object
org.sqlite.parser.DefaultSchemaProvider
- All Implemented Interfaces:
SchemaProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindTables
(String dbName, String tableNamePattern) Find all tables matching the specified pattern.findTables
(String dbName, String tableNamePattern, boolean all) Find the database containing this table.getDbNames
(String dbName) PRAGMA database_list
-
Constructor Details
-
DefaultSchemaProvider
-
-
Method Details
-
findTables
Description copied from interface:SchemaProvider
Find all tables matching the specified pattern.- Specified by:
findTables
in interfaceSchemaProvider
- Parameters:
dbName
- May be null to search in all databases, empty to search in"temp"
and"main"
.tableNamePattern
- LIKE pattern. May be null to retrieve all tables.- Throws:
SQLException
-
findTables
public List<QualifiedName> findTables(String dbName, String tableNamePattern, boolean all) throws SQLException - Throws:
SQLException
-
getDbName
Description copied from interface:SchemaProvider
Find the database containing this table.- Specified by:
getDbName
in interfaceSchemaProvider
- Parameters:
dbName
- May be null to search in all databases, empty to search in"temp"
and"main"
.tableName
- Table name- Returns:
"temp"
or"main"
or attached database name. If there is no table matchingtableName
, the returned value is undefined.- Throws:
SQLException
-
getDbNames
Description copied from interface:SchemaProvider
PRAGMA database_list- Specified by:
getDbNames
in interfaceSchemaProvider
- Parameters:
dbName
- May be null to search in all databases, empty to search in"temp"
and"main"
.- Throws:
SQLException
-
getSchema
- Specified by:
getSchema
in interfaceSchemaProvider
- Parameters:
dbName
-null
means"main"
.tableName
- Table name- Returns:
- SQL used to create the specified table
- Throws:
SQLException
-