Module basedialect
Basic database dialect implementation. This class is extended
by the different DB-specific dialect implementations.
Instance Methods
Instance Properties
Creates a new base dialect
Returns
|
A newly created BaseDialect instance |
See
BaseDialect.prototype.addSqlLimit
(sql, limit)
Extends the SQL statement passed as argument with a limit restriction. Dialect
implementations should override this.
Parameters
String |
sql |
The SQL statement to add the limit restriction to |
Limit |
limit |
The limit |
BaseDialect.prototype.addSqlOffset
(sql, offset)
Extends the SQL statement passed as argument with an offset restriction. Dialect
implementations should override this.
Parameters
String |
sql |
The SQL statement to add the offset restriction to |
Number |
offset |
The offset |
BaseDialect.prototype.addSqlRange
(sql, offset, limit)
Extends the SQL statement passed as argument with a range restriction. Dialect
implementations should override this.
Parameters
String |
sql |
The SQL statement to add the range restriction to |
Number |
offset |
The offset |
Limit |
limit |
The limit |
BaseDialect.prototype.closeQuote
Contains the closing quote character used to quote table and column names
Returns the boolean value for the value passed as argument
Returns
Boolean |
The boolean value |
BaseDialect.prototype.getColumnType
(name)
Returns the column type for the given internal type name
Parameters
String |
name |
The internal type name |
Returns
ColumnType |
The column type |
Returns the name of the default schema. Dialect implementations can override this.
Parameters
java.sql.Connection |
conn |
The connection to use |
Returns
String |
The name of the default schema |
Returns the storage engine type. This is only needed for MySQL databases
Returns
String |
The storage engine type |
BaseDialect.prototype.getJdbcType
(number)
Returns the data type for the given JDBC type number
Parameters
Number |
number |
The JDBC type number |
Returns the SQL statement for retrieving the next value of a sequence. Dialect
implementations should override this.
Parameters
String |
sequenceName |
The name of the sequence |
BaseDialect.prototype.getType
(name)
Parameters
String |
name |
The name of the type as defined in the database dialect |
Returns true if the underlying database supports sequences. Dialect
implementations should override this. Defaults to false.
Returns
Boolean |
True if the database supports sequences, false otherwise |
BaseDialect.prototype.openQuote
Contains the opening quote character used to quote table and column names
BaseDialect.prototype.quote
(str)
Returns the string passed as argument enclosed in quotes
Parameters
String |
str |
The string to enclose in quotes |
Returns
String |
The string enclosed in quotes |
BaseDialect.prototype.registerColumnType
(typeName, columnType)
Registers a column type for the given internal type name
Parameters
String |
typeName |
The internal type name |
ColumnType |
columnType |
The column type to register |
BaseDialect.prototype.registerJdbcType
(jdbcTypeNumber, dataType)
Registers a column data type for the given JDBC type number
Parameters
Number |
jdbcTypeNumber |
The JDBC type number |
Object |
dataType |
The data type to register |