Package de.thomas_oster.lazysql
Class MssqlAdapter
java.lang.Object
de.thomas_oster.lazysql.AbstractRDBMSAdapter
de.thomas_oster.lazysql.MssqlAdapter
- Author:
- Thomas Oster (mail@thomas-oster.de)
-
Nested Class Summary
Nested classes/interfaces inherited from class de.thomas_oster.lazysql.AbstractRDBMSAdapter
AbstractRDBMSAdapter.FullyQualifiedName, AbstractRDBMSAdapter.NotSupportedException, AbstractRDBMSAdapter.Procedure -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckSQLSyntax(Connection con, String sql, List<Argument> params) protected ClassgetColumnType(int DATA_TYPE, String TYPE_NAME, int NULLABLE) Maps the SQL Column type to java class.getSqlQueryType(Connection con, 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(Connection con, String catalog, String schema, String prefix) Methods inherited from class de.thomas_oster.lazysql.AbstractRDBMSAdapter
getAdapterByDbUri, getInsertableTableColumns, getInsertableTableColumns, getSchemas, getSchemas, getStoredProcedureParameters, getStoredProcedureParameters, getStoredProcedures, getTableColumns, getTableColumns, getTables, getTables, tryToLoadDriver
-
Constructor Details
-
MssqlAdapter
public MssqlAdapter()
-
-
Method Details
-
getStoredProcedures
public List<AbstractRDBMSAdapter.Procedure> getStoredProcedures(Connection con, String catalog, String schema, String prefix) throws SQLException, AbstractRDBMSAdapter.NotSupportedException - Overrides:
getStoredProceduresin classAbstractRDBMSAdapter- Throws:
SQLExceptionAbstractRDBMSAdapter.NotSupportedException
-
getColumnType
Description copied from class:AbstractRDBMSAdapterMaps the SQL Column type to java class. Gets the information from the getMetadata().getColumns method if it returns null, the column is ignored.- Overrides:
getColumnTypein classAbstractRDBMSAdapter- Parameters:
DATA_TYPE- the datatype from the metadataTYPE_NAME- the type name from the metadataNULLABLE- the nullable column from the metadata- Returns:
- the java Type corresponding to the SQL type name and nullable information
-
getSqlQueryType
public List<Argument> getSqlQueryType(Connection con, String sql, List<Argument> params) throws SQLException Description copied from class:AbstractRDBMSAdapterLet's the db analyze an SQL query and throws an exception or returns a map containing the names and types of the resulting rows- Specified by:
getSqlQueryTypein classAbstractRDBMSAdapter- Parameters:
con- the database connectionsql- 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 wrong
-
checkSQLSyntax
- Specified by:
checkSQLSyntaxin classAbstractRDBMSAdapter- Throws:
SQLException
-