A jdbc.quote.id option specifies a default value of a quotation symbol for ids in a SQL.
The jdbc.quote.id option takes a quotation symbol
to quote ids in a SQL command.
In case of SQL-92 comformance dababases, "
(double quote) is used.
Therefore the default is "
.
The jdbc.quote.id option generates no additional classes. The jdbc.quote.id option just modified the behavior of Relaxer table objects.
The jdbc.quote.id option adds no additional methods to Relaxer objects.
List 12.9.3.1[jdbcQuoteId.rng] is a sample schema for the jdbc.quote.id option.
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> <start> <ref name="account"/> </start> <define name="account"> <element name="account"> <attribute name="accountNo"> <data type="token"/> </attribute> <element name="balance"> <data type="int"/> </element> <element name="owner"> <data type="token"/> </element> <ref name="address"/> <zeroOrMore> <ref name="phone"/> </zeroOrMore> </element> </define> <define name="address"> <element name="address"> <attribute name="zip"> <data type="token"/> </attribute> <text/> </element> </define> <define name="phone"> <element name="phone"> <attribute name="area"> <data type="token"/> </attribute> <data type="token"/> </element> </define> </grammar>
Execution of Relaxer with the jdbc.quote.id option is as follows. Note that, because back-quote (`) has a special meaning in UNIX shell, the back-quote (`) is escaped using back-slash (\).
$ relaxer -jdbc -jdbc.data.quote.id:\` jdbcDataProfile.rng
CREATE TABLE `account` ( `accountNo` VARCHAR(32) NOT NULL, `balance` INTEGER NOT NULL, `owner` VARCHAR(32) NOT NULL, `address` VARCHAR(128) NOT NULL, `address_zip` VARCHAR(32) NOT NULL, `phone` VARCHAR(512) )
List 12.9.3.1.2[account.ddl] is the DDL generated by this command.
CREATE TABLE `account` ( `accountNo` VARCHAR(32) NOT NULL, `balance` INTEGER NOT NULL, `owner` VARCHAR(32) NOT NULL, `address` VARCHAR(128) NOT NULL, `address_zip` VARCHAR(32) NOT NULL, `phone` VARCHAR(512) )
The DDL is tuned for MySQL with regard to the following issues. The datatype of the columns are not tuned.
`
(backquote).