I have a query like this:
(query (sql (:update 'kupci :set
'ime (parameter "ime")
'prezime (parameter "prezime")
'adresa (parameter "adresa")
and I want now for the next parameter to check if something is passed,
I tried
(:raw (if (/= (length (parameter "sob
What am I doing wrong here:
(query (sql-compile `(:update 'kupci :set
,@(list 'ime (parameter "ime"))
:where (:= 'id (parameter "id")
I get from hunchentoot log:
Database error 42883: function parameter(unknown) does not exist
No function matches the
>> (query (sql-compile `(:insert-into 'kupci :set
>> ,@(list 'vrijemeunosa (:now)
I put a quote before (:now) and it works now.
Thanks
___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listin
>> (query (sql-compile `(:insert-into 'kupci :set
>> ,@(list 'vrijemeunosa (:now)
> This does not work from the repl either. You forgot a quote.
It works in repl. What quote do you mean ?
___
postmodern-devel mailing list
postmodern-devel@common-li
I have a query like:
(query (sql-compile `(:insert-into 'kupci :set
,@(list 'vrijemeunosa (:now)
If I try to execute it from repl it works
but when called within function I get
Undefined function :NOW called with arguments () ?
___
postmodern-deve
Hi.
How to use :order-by (or :desc):
(:select '* :from 'table :order-by 'column)
doesn't work ?
Thanks
___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel
I found out that there is a timestamp type,
that's what I really need.
How do I do insert-into then with timestamp field:
(:insert-into 'table :set 'ts :now)
This doesn't work.
How do I insert current date/time then ?___
postmodern-devel mailing list
po
Hi.
I know this may not be the right place to ask such a question,
can you give me a link to some postgresql mailing list,
I found them many, I don't know which one to choose ?
How to enter date and time in a date field ?
Is there a default value for date field like current
date and time ?
Thanks
Hi.
Can you just give me an update example with :where statement ?
Thanks
___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel
>> (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
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
(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
I'm sorry for multiple threads.
This subject was total misunderstanding by me.
The thing that was confusing me was that if I don't
enter a search term into the search field then it would not return
that record even if some of the fields match.
The right way is a dynamic query like this:
(sql (:se
I got it. I have to :or it with :is-null, like this:
(sql (:select '* :from 'table :where
(:or (:like 'field "%something%") (:is-null 'field
___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailm
I know what are you talking about, I read the Practical Common Lisp, I'm
reading On lisp now
but I didn't read all the Postmodern docs.
(I know now what :raw does)
What I really want is when the field is null to return true.
(:is-null 'field) and what now ?
Is there an expression "true" in sql ?
I
I made query like this:
(sql (:select '* :from 'kupci :where (:and
(:raw (if 'ime (sql (:like 'ime (concat-string "%" (parameter "ime") "%")))
t))
(:raw (if 'prezime (sql (:like 'prezime (concat-string "%" (parameter
"prezime") %"))) t)
but it doesn't work.
For example, if (:like ...) for '
Hi.
I made a query like this:
(sql (:select '* :from 'kupci :where (:and
(:like 'ime
(concat-string "%" (parameter "ime") "%"))
(:like 'prezime
(concat-string "%" (parameter "prezim
git clone http://marijnhaverbeke.nl/git/postmodern
:plists works ok now.
Thanks
___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel
I tried git clone
https://github.com/marijnh/Postmodern/commit/1627b8a8f8d19181112ba9d6b9eb544153318a32
but it doesn't work. What exactly should I write to get this from git ?
___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://
Hi.
I tried (query "select * from table1;" :plists) but I get:
Error: Undefined operator NIL in form (NIL (CL-POSTGRES:EXEC-QUERY
*DATABASE* "select * from table1;" (QUOTE
POSTMODERN::SYMBOL-PLIST-ROW-READER)))
What does that mean ?
I'm using Lispworks/Windows.
I also tried (query "select * f
Hi.
I didn't quite understand the :plists argument.
I want for select to return me lists of plists.
I tried this:
(query "select * from table1;" :plists t)
but it doesn't work ?
P.S. What's with the Croatia example ? I'm from Croatia.
___
postmodern-de
Then I don't need primary key ?
If I choose my primary key to be an integer
then I have to keep track of numbers and automatically
insert number incremented by one ?
I worked long ago with Access and it automatically
inserts number incremented by one as id.
I guess than this is part of Access progr
Hi.
When I try to insert some data in table with
(query "insert into ...") it asks me also to enter 'id' field
which is a primary key.
Shouldn't primary key field be automatically filed ?
I made my table with pgadmin 3.
Thanks
___
postmodern-devel mai
23 matches
Mail list logo