Package de.thomas_oster.lazysql
Class DbQueryTyper
java.lang.Object
de.thomas_oster.lazysql.DbQueryTyper
- Author:
- Thomas Oster (mail@thomas-oster.de)
-
Method Summary
Modifier and TypeMethodDescriptiongetInsertableTableColumns(String name, String prefix) getSchemas(String prefix) getSqlQueryType(String sql, List<Argument> params) Let's the db analyze an SQL query and throws an exception or returns a map containing the names and types of the resulting rowsgetStoredProcedures(String prefix) getStoredProcedures(String catalog, String schema, String prefix) getTableColumns(String name, String prefix)
-
Method Details
-
getTables
public List<String> getTables(String prefix) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getTables
public List<String> getTables(String catalog, String schema, String prefix) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getSchemas
public List<String> getSchemas(String prefix) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getFqn
public AbstractRDBMSAdapter.FullyQualifiedName getFqn(String name) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getTableColumns
public List<Argument> getTableColumns(String name, String prefix) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getInsertableTableColumns
public List<Argument> getInsertableTableColumns(String name, String prefix) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getStoredProcedures
public List<AbstractRDBMSAdapter.Procedure> getStoredProcedures(String catalog, String schema, String prefix) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getStoredProcedures
public List<AbstractRDBMSAdapter.Procedure> getStoredProcedures(String prefix) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getStoredProcedureParameters
public List<Argument> getStoredProcedureParameters(String name) throws SQLException, AbstractRDBMSAdapter.NotSupportedException -
getSqlQueryType
public List<Argument> getSqlQueryType(String sql, List<Argument> params) throws SQLException, AbstractRDBMSAdapter.NotSupportedException Let's the db analyze an SQL query and throws an exception or returns a map containing the names and types of the resulting rows- Parameters:
sql- the sql queryparams- a list of parameters used in this query- Returns:
- returns a list of arguments corresponding to the query result type
- Throws:
SQLException- if the query is invalidAbstractRDBMSAdapter.NotSupportedException- if the corresponding adapter cannot check the query result type
-