A jdbc.config option specifies a configuration for data access.
The jdbc.config option takes one of the following values, or a configuration file name, as a parameter.
The default configuration is sql92
.
The jdbc.config option generates no additional classes. The jdbc.config option just modified the behavior of Relaxer table objects.
The jdbc.config option adds no additional methods to Relaxer objects.
List 12.5.3.1[jdbcConfig.rng] is a sample schema for the jdbc.config 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.config option is as follows:
$ relaxer -jdbc -jdbc.config:mysql jdbcConfig.rng
List 12.5.3.1.1[account.ddl] is the DDL generated.
CREATE TABLE `account` ( `accountNo` VARCHAR(32) NOT NULL, `balance` INTEGER NOT NULL, `owner` VARCHAR(32) NOT NULL, `address` TEXT NOT NULL, `address_zip` VARCHAR(32) NOT NULL, `phone` TEXT )
The DDL is tuned for MySQL with regard to the following issues.