Class Syntax
java.lang.Object
org.apache.sis.internal.metadata.sql.Syntax
- Direct Known Subclasses:
Database,SQLBuilder
Information about the syntax to use for building SQL statements.
This object extract from
DatabaseMetaData the information needed by SQLBuilder.
It can be cached if many SQLBuilder instances are going to be created.- Since:
- 1.1
- Version:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal DialectThe database dialect.(package private) final StringThe string that can be used to escape wildcard characters.(package private) final StringThe characters used for quoting identifiers, or an empty string if none.(package private) final booleanWhether the schema name should be written between quotes. -
Constructor Summary
ConstructorsConstructorDescriptionSyntax(DatabaseMetaData metadata, boolean quoteSchema) Creates a newSyntaxinitialized from the given database metadata.Creates a newSyntaxinitialized to the same metadata than the given template. -
Method Summary
-
Field Details
-
dialect
The database dialect. This is used for a few database-dependent syntax. -
quote
The characters used for quoting identifiers, or an empty string if none. This is the value returned byDatabaseMetaData.getIdentifierQuoteString(). -
quoteSchema
final boolean quoteSchemaWhether the schema name should be written between quotes. Iffalse, we will let the database engine uses its default lower case / upper case policy. -
escape
The string that can be used to escape wildcard characters. This is the value returned byDatabaseMetaData.getSearchStringEscape().
-
-
Constructor Details
-
Syntax
Creates a newSyntaxinitialized from the given database metadata.- Parameters:
metadata- the database metadata.quoteSchema- whether the schema name should be written between quotes.- Throws:
SQLException- if an error occurred while fetching the database metadata.
-
Syntax
Syntax(Syntax other) Creates a newSyntaxinitialized to the same metadata than the given template.- Parameters:
other- the template from which to copy metadata.
-