A jdbc.data.profile option specifies a configuration for data access.
The jdbc.data.profile option takes one of the following values, or a configuration file name, as a parameter.
The default configuration is sql92
.
The jdbc.data.profile option generates no additional classes. The jdbc.data.profile option just modified the behavior of Relaxer table objects.
The jdbc.data.profile option adds no additional methods to Relaxer objects.
List 12.8.3.1[jdbcDataProfile.rng] is a sample schema for the jdbc.data.profile 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.data.profile option is as follows:
$ relaxer -jdbc -jdbc.data.profile:mysql jdbcDataProfile.rng
List 12.8.3.1.1[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" TEXT NOT NULL, "address_zip" VARCHAR(32) NOT NULL, "phone" TEXT )
The DDL is tuned for MySQL with regard to the following issues:
In contrast of the jdbc.profile
option,
quotations are not tuned.