Package org.pentaho.aggdes.model
Interface Dialect
public interface Dialect
Description of the capabilities of a database, its SQL dialect, and driver.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcomment(StringBuilder buf, String s) Appends a single-line comment to a string builder.Returns the SQL type string for integer values.Returns the SQL type string for integer values.intReturns the maximum length of a column name.intReturns the maximum length of a table name.voidquoteIdentifier(StringBuilder buf, String... names) Appends to a buffer one or more identifiers, quoted appropriately for this Dialect.booleansupportsPrecision(DatabaseMetaData meta, String type) Returns true if database column DDL supports precision, ie INT(10) vs.voidTerminates a SQL command.
-
Field Details
-
NL
-
-
Method Details
-
quoteIdentifier
Appends to a buffer one or more identifiers, quoted appropriately for this Dialect.For example, in the SQL Server dialect,
quoteIdentifier(buf, "foo", "bar baz")generates"[foo].[bar baz]".- Parameters:
buf- Buffernames- One of more identifiers
-
getIntegerTypeString
String getIntegerTypeString()Returns the SQL type string for integer values.This value is assumed to the be type returned by the
COUNT()aggregate function. Typically"INTEGER".- Returns:
- integer type string
-
getDoubleTypeString
String getDoubleTypeString()Returns the SQL type string for integer values.This value is assumed to the be type returned by the
SUM()andAVG()aggregate functions. Typically"DOUBLE".- Returns:
- double type string
-
removeInvalidIdentifierCharacters
-
getMaximumTableNameLength
int getMaximumTableNameLength()Returns the maximum length of a table name.- Returns:
- maximum length of a table name
-
getMaximumColumnNameLength
int getMaximumColumnNameLength()Returns the maximum length of a column name.- Returns:
- maximum length of a column name
-
comment
Appends a single-line comment to a string builder.- Parameters:
buf- String builders- String
-
terminateCommand
Terminates a SQL command.For most dialects, this appends
";{newline}"tobuf.- Parameters:
buf- String builder
-
supportsPrecision
Returns true if database column DDL supports precision, ie INT(10) vs. INT.- Parameters:
meta- database metadata objecttype- the type of the column- Returns:
- true if supports precision
- Throws:
SQLException- on error
-