User Tools

Site Tools


configuration:driver

driver.xml

Defines properties of the database vendor.

Parameters

  • name: The id.
  • driverClass: Java driver class name.
  • defaultPort: The default port of the database.
  • urlPrefix: The prefix of the JDBC connection string.
  • urlSuffix: The suffix of the JDBC connection string.
  • dbNameSeparator: The separator between urlPrefix and database name.
  • quoteAliasOpen: By default we are using the character(s) that we are told by the database driver…
  • quoteAliasClose: …but users may have their own opinion about the right sequence. Also, the driver may not be well implemented. Or the driver can be outdated.
  • quoteEntityOpen: By default double quote. In MySQL a single quote…
  • quoteEntityClose: By default double quote. In MySQL a single quote…
  • supportsCatalogs: Does the database server support multiple databases (catalogs in JDBC language)?
  • supportsSchemas: Does the database server support multiple schemas?
  • supportsCreateTableAs: By default true. False in MS SQL…
  • supportsWithData: By default false. Has to be true for MonetDB…
  • supportsJoinUsing: By default false. Useful for PostgreSQL and MySQL.
  • supportsSelectExists: By default false. Useful for PostgreSQL and MySQL.
  • corrSyntax: Define the command for correlation if the database provides such command.
  • dateAddSyntax: Because we want to be able to express time ranges. This syntax doesn't deal with leap years.
  • dateAddMonth: Because we want to be able to express time ranges. This syntax correctly deals with leap years.
  • dateDiffSyntax: Not all databases support conversion of time to number.
  • insertTimestampSyntax: Syntax for timestamp (it's used for creation of journal table).
  • stdDevCommand: The command for calculation of standard deviation.
  • charLengthCommand: The command for calculation of string length.
  • typeVarchar: The name of varchar data type in the database.
  • typeInteger: The name of integer data type in the database.
  • typeDecimal: The name of decimal data type in the database.
  • typeTimestamp: The name of timertamp data type in the database.
  • limitSyntax: The command for calculation of sample standard deviation.
  • indexNameSyntax: Use “idx_table_column” or “column”?
  • randomCommand: Command to use for generating a decimal number in range 0..1.
  • testQuery: The validation query for drivers that do not provide isValid() method. Do not set it for JDBC 4.0 compliant drivers as it would slow them down.

Example

<drivers>
	<driver name="MySQL"
		driverClass="com.mysql.jdbc.Driver"
		defaultPort="3306"
		urlPrefix="jdbc:mysql://"
		dbNameSeparator="/"
		quoteAliasOpen="'"
		quoteAliasClose="'"
		supportsCatalogs="true"
		supportsSchemas="false"
		supportsJoinUsing="true"
		supportsSelectExists="true"
		dateAddSyntax="DATE_ADD(@baseDate, INTERVAL @amount @datePart)"
		dateAddMonth="DATE_ADD(@baseDate, INTERVAL @amount month)"
		dateDiffSyntax="DATEDIFF(@dateTo, @dateFrom)"
		charLengthCommand="char_length"
		randomCommand="rand()"/>
</drivers>

Page Tools