[postmodern-devel] patch: DAO constraints
Maciej Pasternacki
maciej at pasternacki.net
Sat Oct 11 10:18:31 UTC 2008
Hello,
Since it's not my first patch for Postmodern, and most probably not
the last one, I can as well subscribe to the list and send patches
properly instead of in a private e-mail.
I just made a small update to DAOs to use constraints (foreign keys,
checks, indices) for DAO slots and classes. Doesn't seem to break
anything, and makes it possible (or almost possible) to drop
separate .sql definition files and just use DAO-TABLE-DEFINITION.
What's missing for me is arbitrary SQL for e.g. defining needed
functions, enum types and so on before creating table -- but I'm not
sure what approach should I take: move it all to DAOs (as e.g. :BEFORE-
CREATE-TABLE and :AFTER-CREATE-TABLE class slots), or just make init
function for my package, which would call needed queries and use DAO-
TABLE-DEFINITION just to create the tables. Would there be any
advantage to :BEFORE-... and :AFTER-... slots, or is the init function
the preferred way to go?
Regards,
Maciej.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dao-constraints.cset
Type: application/octet-stream
Size: 26293 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20081011/7243e806/attachment.obj>
-------------- next part --------------
--
-><- Maciej Pasternacki -><- http://www.pasternacki.net/ -><-
More information about the postmodern-devel
mailing list