Hi Rafal,
Thanks for the patch. I don't have time to look at it right now but I'll get back to you in a week or so. Chances are, though, that I won't be including it as is. Did you ever use Postmodern before version 1.10? The deftable form I had was going in this same direction, but it became a mess, so I decided to separate the 'class definition' part form the 'table definition' part. A feature similar to your patch that I have been thinking about including is to add something specifically for adding extra indices, sequences, and constraints to a table -- I'm already using something like it in all my major postmodern-using projects. Note that most extra aspects of tables can be added with extra statements *after* the 'create table' command has been given, and thus can be completely separate from the dao-table-definition functionality.
Cheers, Marijn
On 6/8/08, Rafał Strzaliński nablaone@gmail.com wrote:
Hi,
I'm attaching a patch that allows to add table extra options ( :check :unique ..) to a DAO definition.
Sample:
(defclass account () ((id :col-type serial ) (login :col-type (varchar 255) :accessor login :initarg :login) (password :col-type (varchar 255) :accessor password :initarg :password) (created_at :col-type timestamp :accessor created-at :initform (now-timestamp))) (:unique name) (:metaclass dao-class) (:keys id) (:extra-options (:unique login)) (:table-name account.account))
-- Best regards, Rafal Strzalinski (nabla) http://nablaone.net
postmodern-devel mailing list postmodern-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel