Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cxxxr/lisql

Write SQL directly in Commno Lisp, without using ORM.
https://github.com/cxxxr/lisql

Last synced: 4 days ago
JSON representation

Write SQL directly in Commno Lisp, without using ORM.

Awesome Lists containing this project

README

        

## LiSQL

### Usage
```common-lisp
(ql:quickload :lisql)
(use-package :lisql)

(select * from account where id = "c49a8035-e59e-49ab-ad80-f51e2cd91001")
"SELECT * FROM ACCOUNT WHERE ID = 'c49a8035-e59e-49ab-ad80-f51e2cd91001'"

(insert into account (name) values ("cxxxr"))
"INSERT INTO ACCOUNT (NAME) VALUES ('cxxxr')"
```

### with CL-DBI
https://github.com/fukamachi/cl-dbi

```common-lisp
(defparameter *connection* (dbi:connect :sqlite3 :database-name "/foo/bar/test.sqlite3"))
(dbi:execute
(dbi:prepare *connection*
(lisql:SELECT * FROM somewhere WHERE id = ?)) ; <===
(list "c49a8035-e59e-49ab-ad80-f51e2cd91001"))
```