[CDBI] How to retrieve meta information from database: not null, default, ...?

Randal L. Schwartz merlyn at stonehenge.com
Mon Sep 12 15:53:51 BST 2005


>>>>> "Alex" == Alex Aminoff <alex at basespace.net> writes:

Alex> Is there some sort of plugin that does this?

Call $dbh->column_info("","",$table,$column)->fetchall_arrayref({})
and dump the resulting data structure.  Perhaps the IS_NULLABLE and
COLUMN_DEF info will give you what you want.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!




More information about the ClassDBI mailing list