Re: [postmodern-devel] :set arguments

2011-02-06 Thread Marijn Haverbeke
> How do I do it if I have multiple IFs like: > > (sql-compile `(:insert-into 'kupci :set ,@((if TEST (list 'ime "a") > (if TEST2 (list 'prezime "b") The first step would be understanding how quasiquoting works. This is not a Postmodern question, but a basic Common Lisp one. There are other ch

Re: [postmodern-devel] :set arguments

2011-02-06 Thread Haris
>> (sql (:insert-into 'kupci :set (:raw (if t (sql ('ime "a")) > > The :insert-into clause expects the arguments to :set to be a multiple > of two. You'll need to use sql-compile to do this. > >(sql-compile `(:insert-into 'kupci :set ,@(when t (list 'ime "a" How do I do it if I have mu

Re: [postmodern-devel] :set arguments

2011-02-05 Thread Marijn Haverbeke
> (sql (:insert-into 'kupci :set (:raw (if t (sql ('ime "a")) The :insert-into clause expects the arguments to :set to be a multiple of two. You'll need to use sql-compile to do this. (sql-compile `(:insert-into 'kupci :set ,@(when t (list 'ime "a" ___

Re: [postmodern-devel] :set arguments

2011-02-05 Thread Haris
I simplified the example: (sql (:insert-into 'kupci :set (:raw (if t (sql ('ime "a")) and still getting the same error message. Why I can't combine insert-into and :set with (:raw ...) ? ___ postmodern-devel mailing list postmodern-devel@common-l

[postmodern-devel] :set arguments

2011-02-05 Thread Haris
(sql (:insert-into 'kupci :set (:raw (if (/= (length (parameter "ime")) 0) (sql ('ime (parameter "ime"))) For this I get an error: Invalid amount of :set arguments passed to insert-into sql operator Why is that ? Thanks ___ post