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 Dialect
The database dialect.(package private) final String
The string that can be used to escape wildcard characters.(package private) final String
The characters used for quoting identifiers, or an empty string if none.(package private) final boolean
Whether the schema name should be written between quotes. -
Constructor Summary
ConstructorsConstructorDescriptionSyntax
(DatabaseMetaData metadata, boolean quoteSchema) Creates a newSyntax
initialized from the given database metadata.Creates a newSyntax
initialized 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 newSyntax
initialized 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 newSyntax
initialized to the same metadata than the given template.- Parameters:
other
- the template from which to copy metadata.
-