Package de.calamanari.adl.sql
package de.calamanari.adl.sql
-
ClassDescriptionThis sub-type of
AdlTypeis especially made for SQL conversion.Often anAdlSqlTypes behavior will be common resp. applicable in many scenarios but we want to change the formatter or add a type caster.TheDefaultAdlSqlTypemaps a selection of the SQL-types defined inTypesand decorate them with the ability to act asAdlType.Default implementation of aQueryParameterto pass a value to be set on a prepared statementTheDefaultQueryParameterApplicatorexclusively supports theDefaultAdlSqlTypeas base types, means the types themselves or any type that returns aDefaultAdlSqlTypeas its base type.TheDefaultQueryParameterCreatortakes the base type (AdlType.getBaseType()) of an argument's type and tries to create aQueryParameterapplicable to the base type (AdlSqlType.getBaseType()) of the requested SQL-type.The formatters in this enumeration define the default behavior when formatting values for sql.AQueryParameterencapsulates the action to correctly set a parameter on a prepared statement.Instances encapsulate the knowledge how to apply a parameter to a statement.AQueryParameterCreatorcreates aQueryParameterfrom an argument value of an expression.Exception to be thrown on unexpected problems when setting up an sql-query.AQueryParameterparses a template with named parameters (${id}) to trigger the registered listener on any occurrence with the name and the exact position.When parsing a template a listener can replace the parameter references, typically with question marks and collect the parameters in correct order.AnQueryTemplateWithParameterscombines an SQL-script with positional parameters (question marks) with the parameters to be set once the relatedPreparedStatementhas been created.Identifies the kind of queryA list of SQL-generation related words and phrases etc.Some additional utilities for formatting SQL