clsql-pg-introspect is a package for introspecting PostgreSQL SQL databases from clsql. Great for quickly defining your own classes based on existing tables.

License: LLGPL


Author: Alan Shields

Usage summary:

(clsql-pg-introspect:gen-view-class boxes)

This would make a CLSQL class based on the table boxes - including its not-null, unique, primary key, and foreign key attributes. With joins defined, even.

Or, more often:

(clsql-pg-introspect:gen-view-classes-for-database(("" "database" "username" "password") :postgresql) boxes tubes flyers planes postage-stamps)

This would make CLSQL classes for the tables boxes, tubes, flyers, planes, and postage_stamps.

There are more things you can do - the package and functions are documented, and README has a few things to say.