Questions tagged [clsql]

A multi-platform SQL interface for Common Lisp.

A multi-platform SQL interface for Common Lisp.

CLSQL is a SQL database for Common Lisp interface maintained by Kevin M. Rosenberg. CLSQL uses the Universal Foreign Function Interface (UFFI) library for broad compatibility.

CLSQL is compatible with AllegroCL, Lispworks, SBCL, CMUCL, and OpenMCL. It has been tested with Microsoft Windows, Linux, Solaris, FreeBSD on a number of different CPU architectures.

Source: http://clsql.b9.com/

35 questions
13
votes
2 answers

CLSQL and MYSQL on OS X

I'm working on OS X 10.6.4. I've been using clbuild to install supporting libraries for SBCL (including clsql), and I do all my work through Aquamacs. I installed MySQL using the excellent instructions over at Hive Logic. But when I call (require…
Brendan Foote
  • 1,378
  • 2
  • 12
  • 22
5
votes
0 answers

CCL Lisp Error when selecting via clsql-sqlite3 records with special characters

On Windows10/64, I installed CCL Lisp 1.11, downloaded the sqlite3.dll, then installed quicklisp and cl-sql. I get an error in the context of (german) special characters. This is what I tried in the Emacs Slime Repl: (clsql:connect…
skglas
  • 51
  • 1
5
votes
1 answer

Subqueries with select function in CLSQL

I'm attempting to create a subquery with the clsql:select function: CL-USER> (select [books.bookid] :from [books] :where (sql-in [books.bookid] (select [bookid] :from [bookauthors] …
BnMcGn
  • 1,440
  • 8
  • 22
5
votes
3 answers

Install CLSQL on Mac OS X

I have SBCL installed (via macports/darwinports) on my Intel Core 2 Duo Macbook running 10.5.8. I've installed several libraries like this: (require 'asdf) (require 'asdf-install) (asdf-install:install 'cl-who) But when I tried to install CLSQL…
Ken
  • 2,886
  • 20
  • 11
4
votes
2 answers

Autogenerated primary key in postgresql with clsql

I'm trying to make a simple database with Common Lisp ORM. I use PostgreSQL and CLSQL. I could create classes and generate tables, but it doesn't work when I want to insert a value without primary key in order to get a generated value. It seems that…
andrei-n
  • 87
  • 2
  • 5
4
votes
2 answers

clsql connect oracle database

I am doing some practice with clsql. I want to connect my oracle server hence my connection function is; (connect '("192.168.2.3" "xe" "username" "password") :database-type :oracle) when i hit the return, the following error message shows…
haluk
  • 1,148
  • 2
  • 9
  • 19
4
votes
1 answer

Installing clsql sqlite3 using SBCL + quicklisp

I want to use the sqlite3 interface of clsql. I already install clsql using quicklisp. But when I try to run: (clsql:with-database (db '("database.db") :database-type :sqlite3) nil) I get OPERATION-ERROR while invoking…
Sim
  • 4,199
  • 4
  • 39
  • 77
4
votes
1 answer

CLSQL symbol exports

Does anyone know about how the clsql-sys methods get exported to the clsql-sys/cl-user package? The methods are defined individually for each database type. For example, suppose I define a method in db-mysql/mysql-sql.lisp in package…
Jieren
  • 1,952
  • 4
  • 18
  • 26
3
votes
1 answer

Error opening shared object: how do I embed shared object or specify a different pathname programmatically?

So, I am deploying lisp image to server for a webapp. It has been a nice experience so far, except for this particular case: I am generating the webapp using this: sbcl --dynamic-space-size 1024 \ --noinform \ --load…
digikar
  • 576
  • 5
  • 13
3
votes
2 answers

Macro with a list of macros as argument in Common Lisp

In Common Lisp, how to define a “meta-macro” which takes as argument a list of macros (and other arguments) and composes these macros to produce the desired code. The problem is equivalent to writing a “higher-order macro” which defines a macro out…
Michaël Le Barbier
  • 6,103
  • 5
  • 28
  • 57
3
votes
1 answer

quicklisp to install and use cl-dbi failed with error - Error opening shared object "libmysqlclient_r.so":

I want to use cl-dbi to connect mysql. After install cl-dbi on sbcl with quicklisp, try to connect to mysql but failed with following error: (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" …
Amitabha
  • 1,693
  • 2
  • 25
  • 42
3
votes
1 answer

How to insert multiple records at once using the clsql provided FDML

Is there a way of using the given FDML interface to insert multiple records at once? The given insert-record statement can only handle one value tuple at once and the idea of calling this function uncountable times, instead of once is bugging me…
Sim
  • 4,199
  • 4
  • 39
  • 77
2
votes
1 answer

clsql: Why are tables being added "magically"?

Suppose I have the following two tables (clsql:def-view-class class-a () ((field-one :type integer :db-kind :key :db-constraints :auto-increment) (field-two :type string :initarg :two …
digikar
  • 576
  • 5
  • 13
2
votes
0 answers

clsql-mysql on the Windows platform (Clozure CL)

I am attempting to use clsql-mysql on the Windows platform. I am using 32 bit Clozure CL with the 32 bit MySQL Connector library (from Oracle) to provide the external library. I added the path of the connector to %path% so that clsql could find the…
Andomonir
  • 193
  • 1
  • 9
2
votes
2 answers

clsql trouble in SBCL

I'm trying to get clsql working (used to use cl-mysql, but looking at alternatives). Just attempting to play around at this point, and I'm getting stopped at connect (connect '("localhost" "test" "user" "password") :database-type :mysql) gets…
Inaimathi
  • 13,853
  • 9
  • 49
  • 93
1
2 3