[postmodern-devel] Get keys out of dao-class

2009-02-26 Thread Phil Marneweck
Hi How would one find out what the keys are on a dao-class? I have scratched around in the code and found dao-column-fields, but the equavilant for keys seems to be dao-keys but I cant find a defun for it...I am not even sure it should have a defun. Regards Phil __

Re: [postmodern-devel] Get keys out of dao-class

2009-02-27 Thread Phil Marneweck
Thanx, I never thought about it being a method. I have not tried it yet, I was interested in seeing how it works, that is why I was scratching in the code.  - Original Message --  From:Marijn Haverbeke  Sent:Friday, February 27, 2009 09:37  To: postmodern-devel@common-lisp.net;  Subjec

Re: [postmodern-devel] Get keys out of dao-class

2009-02-27 Thread Phil Marneweck
Ok I figured it out, dao-keys "method" is a reader for effective-keys on dao-class. I am still learning clos... *sigh* On Fri, 2009-02-27 at 11:24 +0200, Phil Marneweck wrote: > Thanx, I never thought about it being a method. I don't know how I > missed it looking at the code

[postmodern-devel] Exlcuding slots dao-save

2009-10-25 Thread Phil Marneweck
Hi I am trying to figure out how to exclude certain slots when persisting the dao instance to the db short of making a new object with the limited range of slots. Any ideas or advise? Thanx ___ postmodern-devel mailing list postmodern-devel@common-l

Re: [postmodern-devel] Exlcuding slots dao-save

2009-10-25 Thread Phil Marneweck
lass for the smaller table, and create one that > inherits from that for the bigger table. Does that help? > > Best, > Marijn > > On Sun, Oct 25, 2009 at 4:45 PM, Phil Marneweck wrote: > > Hi > > > > I am trying to figure out how to exclude certain slots w

Re: [postmodern-devel] Exlcuding slots dao-save

2009-10-25 Thread Phil Marneweck
I could most propibly figure something out, I have been staring at table.lisp the whole afternoon. I need this for the postmodern-store I am writing for weblocks so if I did make the changes I would like to do it in such a way that the code can find its way into the main stream. There are a few

Re: [postmodern-devel] Exlcuding slots dao-save

2009-10-25 Thread Phil Marneweck
There is the serial type as well and I don't know if there are GUID types I dont see any in the type list. And I think you can update a serial or specify a value on insert... I had a quick look at the code and I don't see that the record is reselected for insert under at any time so i gues serial

Re: [postmodern-devel] Exlcuding slots dao-save

2009-10-25 Thread Phil Marneweck
I notice the returning just after sending the mail :( Well then its :read-only... will let you know when i got something working...hope fully in an hour or so On Sun, 2009-10-25 at 18:25 +0100, Marijn Haverbeke wrote: > > I had a quick look at the code and I don't see that the record is > > resel

Re: [postmodern-devel] Exlcuding slots dao-save

2009-10-25 Thread Phil Marneweck
Took a life time longer but it looks like i got it working without mangling the code to badly. I tested it with the postmodern-store I am writing looks like it works fine. On Sun, 2009-10-25 at 20:09 +0200, Phil Marneweck wrote: > I notice the returning just after sending the mail :( >

Re: [postmodern-devel] Exlcuding slots dao-save

2009-10-26 Thread Phil Marneweck
I have test cases but I need to clean them up and I want to just have one last look (most of it as done late last night and code looks different in the morening ;)) before I mail it to you. One issue I have is that if you make a new instance of a dao and the record alread exist in the db and you

Re: [postmodern-devel] Exlcuding slots dao-save

2009-10-27 Thread Phil Marneweck
Hi I will give it a try just now. This feauture might come in handier than expected. It can be used to build objects over "views". This way you can also persist the "main" table in the view from the dao. The "view objects" is going to be an issue for me in the weblocks store. I see that clsql h

Re: [postmodern-devel] Exlcuding slots dao-save

2009-10-27 Thread Phil Marneweck
It is the combination of weblocks and "views" (with views i mean just a query with joins, groupings etc) that is the problem. I suspect that weblocks thinks any object has a one to one relation to a table and thus treats it like that. However I could be wrong I still need to do some more testing to

[postmodern-devel] Date Problem

2009-11-04 Thread Phil Marneweck
I get different date formats back from a postmodern query at different times. I am using SBCL 1.0.31.32 and the latest (as of the weekend) from clbuild. The steps. 1. I delete all my .fasl files for a project 2. I do a require for the project to load and compile 3. I run a query/function and

Re: [postmodern-devel] Date Problem

2009-11-04 Thread Phil Marneweck
clbuild pulls from darcs. Ok thanx I got it to work now. Just as a note to anybody else that might find this one day, if you use the defsystem depends-on to load systems then remeber that it loads them in the reverse order of what you give. That took me a couple of tries to figure out lol. Tha

[postmodern-devel] Postmodern Store for Weblocks

2009-11-07 Thread Phil Marneweck
Hi I have completed the postmodern store I was working on and I am including the code in this mail. There are two "modes" that you can use the store in. The default is by supplying your own unique ids for all tables in the db so that weblocks can work. The second mode uses oid's to supply weblock

Re: [postmodern-devel] Postmodern Store for Weblocks

2009-11-07 Thread Phil Marneweck
I did not really want to create a separate project for it. I was just hoping for some feedback here on this list before I hand it of to the weblocks guys. If they are happy enough with it they can work it into their repositories. From there anybody that is interested can then hack away. I just wa

Re: [postmodern-devel] Postmodern Store for Weblocks

2009-11-07 Thread Phil Marneweck
"Expected Values are for foreign-keys is a list of foreign-key-id-slot-name foreign-key-boject-slot-name foreign-object-id-slot-name include-in-delete-p.")) Sorry every one. On Sat, 2009-11-07 at 20:36 +0200, Phil Marneweck wrote: > I did not really want to create a separate proj

Re: [postmodern-devel] Postmodern Store for Weblocks

2009-11-10 Thread Phil Marneweck
Just an update on the weblocks-postmodern store. It now has a home at http://bitbucket.org/harag/weblocks-dev/wiki/Home. This is a fork of the weblocks-dev repository while it is still under heavy development. If you clone this repository you will have what you need to run weblocks(not its depende

[postmodern-devel] sql injection

2010-06-25 Thread Phil Marneweck
Hi How susceptible is dao objects to sql injection and what measures would be suggested to prevent sql injection if it is possible with dao objects. Thank You ___ postmodern-devel mailing list postmodern

Re: [postmodern-devel] sql injection

2010-06-25 Thread Phil Marneweck
Thanx that is good news i dont use the :raw operator. On Fri, 2010-06-25 at 10:55 +0200, Marijn Haverbeke wrote: > Hi Phil, > > > How susceptible is dao objects to sql injection and what measures would > > be suggested to prevent sql injection if it is possible with dao objects. > > Unless I m

[postmodern-devel] Date format of alist(s)

2011-01-26 Thread Phil Marneweck
Hi Postmodern is returning dates like this (:DATE-OF-TERMINATION .255611203200) all of a sudden instead of simpledate objects or date string. What did I change to get this behavior or is it a setting in postgresql that has changed? Regards ___ pos

Re: [postmodern-devel] Date format of alist(s)

2011-01-26 Thread Phil Marneweck
Thank you that did the trick. On Wed, 2011-01-26 at 13:20 +0100, Marijn Haverbeke wrote: > Hi Phil, > > Simple-date, and the glue that integrates it in Postmodern, is no > longer loaded by default. Load the :simple-date-postgres-glue system > to get the old behaviour. > > I actually recommend p

Re: [postmodern-devel] setting default value for serial column in prepared insert statement execution

2011-09-05 Thread Phil Marneweck
Under certain circumstances (cant remember when it does not work, play around with col-type serial vs integer ) something like this in the class definition will work (id :initarg :id :initform nil :col-type serial :col-default (:nextval "reporting-period-id-seq")) or when you initialize