Jeff Zucker wrote:
I am preparing to add the ability to attach metadata to DBDs that subclass DBD::File. This will mean that DBI metadata methods such as primary_key() and column_info() will be available and also that other modules like DBIx::Class and Class::DBI will have access to the metadata.

I've outlined my proposed interface below and would appreciate comments. The short version is that if the user sets the "f_use_metadata" database handle attribute, SQL::Translator will be used to parse CREATE TABLE statements and the resulting object will be stored serialized as YAML. When DBI metadata methods are called (and only then), the YAML file will be queried.


<snip/>

Will there be a std. i/f to get at that info from within
SQL::Statement (and its subclasses) ? (One of these days)
I hope to finish up an extension that wants to get at column type
info for better type conversion and esp. datetime support.
And presumably PK/FK info might be exploited for improved JOIN
processing.

Which leads to the question: will there be any hooks to enforce
referential integrity if PK/FK support is provided ?

Can I assume the YAML files are persistent ? If so, is there
any mechanism to assure they get deleted when a table is dropped ?

Dean Arnold
Presicient Corp.

Reply via email to