Package org.javalite.activejdbc.dialects
Class DefaultDialect
java.lang.Object
org.javalite.activejdbc.dialects.DefaultDialect
- All Implemented Interfaces:
Serializable
,Dialect
- Direct Known Subclasses:
DB2Dialect
,H2Dialect
,MSSQLDialect
,MySQLDialect
,OracleDialect
,PostgreSQLDialect
,SQLiteDialect
- Author:
- Igor Polevoy, Eric Nielsen
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendDate(StringBuilder query, Date value)
protected void
appendEmptyRow(MetaModel metaModel, StringBuilder query)
protected void
appendOrderBy(StringBuilder query, List<String> orderBys)
protected void
appendQuestions(StringBuilder query, int count)
protected void
appendSelect(StringBuilder queryBuilder, String tableName, String[] columns, String tableAlias, String subQuery, List<String> orderBys)
protected void
appendSubQuery(StringBuilder queryBuilder, String subQuery)
protected void
appendTime(StringBuilder query, Time value)
protected void
appendTimestamp(StringBuilder query, Timestamp value)
protected void
appendValue(StringBuilder query, Object value, String... replacements)
deleteManyToManyAssociation(Many2ManyAssociation association)
formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset)
insertManyToManyAssociation(Many2ManyAssociation association)
insertParametrized(MetaModel metaModel, List<String> columns, boolean containsId)
overrideDriverTypeConversion(MetaModel mm, String attributeName, Object value)
protected String
selectCount(String from)
selectCount(String table, String where)
selectExists(MetaModel metaModel)
selectManyToManyAssociation(Many2ManyAssociation association, String sourceFkColumnName, int questionsCount)
selectStar(String table)
selectStar(String table, String where)
selectStarParametrized(String table, String... parameters)
Produces a parametrized AND query.toArray(String typeName, Object value, Connection connection)
Converts the input
-
Field Details
-
ORDER_BY_PATTERN
-
GROUP_BY_PATTERN
-
-
Constructor Details
-
DefaultDialect
public DefaultDialect()
-
-
Method Details
-
selectStar
- Specified by:
selectStar
in interfaceDialect
-
selectStar
- Specified by:
selectStar
in interfaceDialect
-
selectStarParametrized
Produces a parametrized AND query. Example:String sql = dialect.selectStarParametrized("people", "name", "ssn", "dob"); //generates: //SELECT * FROM people WHERE name = ? AND ssn = ? AND dob = ?
- Specified by:
selectStarParametrized
in interfaceDialect
- Parameters:
table
- name of tableparameters
- list of parameter names- Returns:
- something like: "select * from table_name where name = ? and last_name = ? ..."
-
appendEmptyRow
-
appendQuestions
-
appendOrderBy
-
appendSubQuery
-
appendSelect
-
formSelect
public String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset)- Specified by:
formSelect
in interfaceDialect
-
overrideDriverTypeConversion
- Specified by:
overrideDriverTypeConversion
in interfaceDialect
-
selectCount
- Specified by:
selectCount
in interfaceDialect
-
selectCount
- Specified by:
selectCount
in interfaceDialect
-
selectExists
- Specified by:
selectExists
in interfaceDialect
-
selectManyToManyAssociation
public String selectManyToManyAssociation(Many2ManyAssociation association, String sourceFkColumnName, int questionsCount)- Specified by:
selectManyToManyAssociation
in interfaceDialect
-
insertManyToManyAssociation
- Specified by:
insertManyToManyAssociation
in interfaceDialect
-
insertParametrized
- Specified by:
insertParametrized
in interfaceDialect
-
deleteManyToManyAssociation
- Specified by:
deleteManyToManyAssociation
in interfaceDialect
-
appendValue
-
replace
-
appendDate
-
appendTime
-
appendTimestamp
-
insert
-
update
-
toArray
Converts the input
-