Hello dbi-users,

We've been talking on the POOP-group list about the need to programmatically
determine the default column values for a given table. This is essential for
creating database-mapped objects  without actually creating the row; you'd
want the new object to be populated according to database defaults. Packages
such as Class::DBI and Alzabo could make good use of this information.

Obviously, the methods for getting column defaults vary among databases - in
Oracle via ALL_TAB_COLUMNS, in mysql via "describe <table>", etc. If this
were a DBI method, e.g. $dbh->get_column_defaults($table_name), individual
DBD classes could implement or not implement the solution. I'd be happy to
write and submit the code for Oracle.

Any chance of introducing a new DBI method for this, or is there already a
similar proposal in progress? Could not find anything in the list archives,
although searching for 'default' gives admittedly noisy results. :)

Cheers
Jon


Reply via email to