Supports the Derby / DB2 / SQL92 standard for defining Binary data fields with either CHAR(#) FOR BIT DATA or VARCHAR(#) FOR BIT DATA. This can be used in Platform implementors initialize() methods, by using lines like:
setSchemaDomainMapping(new SizedForBitDataDomain( SchemaType.BINARY, "CHAR", "1")); setSchemaDomainMapping(new SizedForBitDataDomain( SchemaType.VARBINARY, "VARCHAR"));
This will cause the Column.getSqlString() method to produce items similar to:
CHAR(#) FOR BIT DATA VARCHAR(#)FOR BIT DATA
Where: # is the size= schema attribute or a default size specified in the constructor.
Note that this is dependent on the platform implementation correctly defining BINARY and VARBINARY as having a size attribute in the "hasSize()" method.
@see org.apache.torque.templates.platform.Platform @see org.apache.torque.templates.transformer.sql.SQLTransformer#getSqlString() @author Greg Monroe
|
|