[postmodern-devel] ~ infix operator
Marijn Haverbeke
marijnh at gmail.com
Mon Jan 22 08:00:53 UTC 2007
Hello,
For the time being, I just changed the bitwise NOT to :~~ and added
> the :~ to the def-infix-ops forms. Is this something you overlooked
> or is there another way to access regular expressions functionality?
Good question. I never really use the regexp functionality, so I didn't
really think about this. It looks like regular expression matching always
takes two arguments, while bitwise NOT only takes one, so I think a good
solution would be to make that operator behave like minus and allow both
binary infix and unary prefix application. I'll add the other regexp
operators (~*, !~, and !~*) too, while I'm at it.
Third, since I see you care about the documentation, I think you
> should point out in the documentation that the deftable form must
> define the table columns in the same order with its PostgreSQL
> counterpart, since you use the * abbreviation in the get-dao select
> statement. Otherwise, the get-dao does not work.
You have a point there. I assumed people would create their tables from the
lisp definition, in which case everything works fine. This will probably
also be an issue when you end up adding or dropping rows in tables -- the
best solution is probably to fix dao-loading so that it takes column names
into account. This might make it a bit slower, but right now it's just
confusing. I'll try to fix this this week.
Finally, is there a way to access the constraints of an SQL table from
> the Lisp side? I have not managed to find anything related yet.
No, though this is something that I definitely want to add. Unfortunately
I'm a bit tied up with other work at the moment, so it might take a while.
If you feel up to it, a patch would be welcome.
Regards,
Marijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20070122/429c0c81/attachment.html>
More information about the postmodern-devel
mailing list