Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/cxxxr/lisql
- Owner: cxxxr
- License: mit
- Created: 2024-03-02T05:53:23.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-10T09:37:26.000Z (10 months ago)
- Last Synced: 2024-12-18T00:37:28.914Z (6 days ago)
- Language: Common Lisp
- Homepage:
- Size: 6.84 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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"))
```