User Tools

Site Tools


configuration:driver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

configuration:driver [2017/06/30 21:02]
yzan created
configuration:driver [2017/07/02 13:58] (current)
yzan
Line 1: Line 1:
-====== ​Driver ​======+====== ​driver.xml ​====== 
 +Defines properties of the database vendor. 
 + 
 +===Parameters===
   * **name:** The id.   * **name:** The id.
   * **driverClass:​** Java driver class name.   * **driverClass:​** Java driver class name.
Line 5: Line 8:
   * **urlPrefix:​** The prefix of the JDBC connection string.   * **urlPrefix:​** The prefix of the JDBC connection string.
   * **urlSuffix:​** The suffix of the JDBC connection string.   * **urlSuffix:​** The suffix of the JDBC connection string.
-  * **dbNameSeparator:​**  +  * **dbNameSeparator:​** ​The separator between urlPrefix and database name. 
-  * **quoteAliasOpen:​**  +  * **quoteAliasOpen:​** ​By default we are using the character(s) that we are told by the database driver... 
-  * **quoteAliasClose:​**  +  * **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:​**  +  * **quoteEntityOpen:​** ​By default double quote. In MySQL a single quote... 
-  * **quoteEntityClose:​** ​+  * **quoteEntityClose:​** ​By default double quote. In MySQL a single quote...
   * **supportsCatalogs:​** Does the database server support multiple databases (catalogs in JDBC language)?   * **supportsCatalogs:​** Does the database server support multiple databases (catalogs in JDBC language)?
   * **supportsSchemas:​** Does the database server support multiple schemas? ​   * **supportsSchemas:​** Does the database server support multiple schemas? ​
-  * **supportsCreateTableAs:​**  +  * **supportsCreateTableAs:​** ​By default true. False in MS SQL... 
-  * **supportsWithData:​**  +  * **supportsWithData:​** ​By default false. Has to be true for MonetDB... ​ 
-  * **supportsJoinUsing:​**  +  * **supportsJoinUsing:​** ​By default false. Useful for PostgreSQL and MySQL. 
-  * **supportsSelectExists:​**  +  * **supportsSelectExists:​** ​By default false. Useful for PostgreSQL and MySQL. 
-  * **corrSyntax:​**  +  * **corrSyntax:​** ​Define the command for correlation if the database provides such command. 
-  * **dateAddSyntax:​**  +  * **dateAddSyntax:​** ​Because we want to be able to express time ranges. This syntax doesn'​t deal with leap years. 
-  * **dateAddMonth:​**  +  * **dateAddMonth:​** ​Because we want to be able to express time ranges. This syntax correctly deals with leap years. 
-  * **dateDiffSyntax:​** ​ +  * **dateDiffSyntax:​** ​Not all databases support conversion of time to number. 
-  * **dateToNumber:​** ​ +  * **insertTimestampSyntax:​** ​Syntax for timestamp (it's used for creation of journal table). 
-  * **insertTimestampSyntax:​**  +  * **stdDevCommand:​** ​The command for calculation of standard deviation. 
-  * **stdDevCommand:​**  +  * **charLengthCommand:​** ​The command for calculation of string length.
-  * **charLengthCommand:​** ​+
   * **typeVarchar:​** The name of varchar data type in the database.   * **typeVarchar:​** The name of varchar data type in the database.
   * **typeInteger:​** The name of integer 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.   * **typeDecimal:​** The name of decimal data type in the database.
   * **typeTimestamp:​** The name of timertamp data type in the database.   * **typeTimestamp:​** The name of timertamp data type in the database.
-  * **limitSyntax:​**  +  * **limitSyntax:​** ​The command for calculation of sample standard deviation. 
-  * **indexNameSyntax:​**  +  * **indexNameSyntax:​** ​Use "​idx_table_column"​ or "​column"?​ 
-  * **randomCommand:​**  +  * **randomCommand:​** ​Command to use for generating a decimal number in range 0..1. 
-  * **testQuery:​** ​+  * **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 [[https://​github.com/​brettwooldridge/​HikariCP|slow]] them down. 
 + 
 +===Example=== 
 +<code xml> 
 +<​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>​ 
 +</​code>​