SBCL & MySQL (clsql, cffi)

Discussion of Common Lisp
erazer
Posts: 7
Joined: Wed Dec 15, 2010 12:59 am
Location: Poltava, Ukraine
Contact:

Re: SBCL & MySQL (clsql, cffi)

Post by erazer » Wed Dec 15, 2010 1:29 pm

Ramarren wrote: The documentation on the very page you linked appears reasonably clear. What is it that you don't understand about it?
I'm just absolutely fool in Lisp. C++, c, php etc. - this is with I'm working. This is 2nd day I'm trying to be a friends with Lisp :)

What about I don't understand - I'm just need the simple clear example on how to make select query and print the result. As I'm very newby in Lisp, it is so hard to me to understand on how to do some things right way even if I have "reasonably clear" project's page :)

So, I would be very thankful if someone can help me a liitle with this question.

Thank you.
“To avoid criticism do nothing, say nothing, be nothing.”- Elbert Hubbard
personal blog - developer in Ukraine

ramarren
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland
Contact:

Re: SBCL & MySQL (clsql, cffi)

Post by ramarren » Wed Dec 15, 2010 1:39 pm

I would recommend not trying to use a database on the second day of using Lisp. Or at least not MySQL. SQlite is generally simpler.

Still, I don't really see what in "If :store is NIL query returns the allocated connection object. You should
use next-result-set and next-row to step through the results." is particularly Lisp specific. And if you change ":store nil" to ":store t" the results will be returned as a list directly.

vanekl
Posts: 12
Joined: Wed Dec 15, 2010 10:25 am

Re: SBCL & MySQL (clsql, cffi)

Post by vanekl » Wed Dec 15, 2010 4:13 pm

? (with-rows (row "select * from db ")(format t "record: ~s~%" row))
record: ("%" "test" NIL "Y" "Y" "Y" "Y" "Y" "Y" "N" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "N" "N")
record: ("%" "test\\_%" NIL "Y" "Y" "Y" "Y" "Y" "Y" "N" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "N" "N")
NIL
?

erazer
Posts: 7
Joined: Wed Dec 15, 2010 12:59 am
Location: Poltava, Ukraine
Contact:

Re: SBCL & MySQL (clsql, cffi)

Post by erazer » Thu Dec 16, 2010 2:42 am

hoooh!...

I'm just going crazy. It was a some strange problem with mysql server.

Everything is works fine now.

Thanks to everybody very much!
“To avoid criticism do nothing, say nothing, be nothing.”- Elbert Hubbard
personal blog - developer in Ukraine

Post Reply