Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/rudolfochrist/jasql

Simple SQL in Common Lisp
https://github.com/rudolfochrist/jasql

common-lisp lisp postgresql sqlite

Last synced: 18 days ago
JSON representation

Simple SQL in Common Lisp

Awesome Lists containing this project

README

        

# -*- mode: org; -*-
#+MACRO: version (eval (with-temp-buffer (insert-file-contents-literally "../version" nil) (buffer-substring-no-properties (point-min) (point-max))))
#+STARTUP: showall
#+OPTIONS: toc:nil author:nil
* NAME

jasql --- Simple SQL in Common Lisp. A direct port of Python's anosql.

* SYNOPSIS

On the SQL side:
#+begin_src sql
-- name: get-all-articles
-- Retreive all articles.
SELECT * FROM articles;

-- name: add-new-article!
-- Adds a new articles.
INSERT INTO articles
(title, author)
VALUES
(:title, :author);
#+end_src

On the Lisp side:
#+begin_src lisp
(jasql:load-sql "sql/articles.sql" :system "blog")

(add-new-article *db* :title "On lisp" :author "paulg")
(get-all-articles *db*)
#+end_src

* DESCRIPTION

=jasql= is a direct port of [[https://github.com/honza/anosql][anosql]] from Python to Common Lisp. A [[https://github.com/krisajenkins/yesql/][Yesql]]-style SQL library.

For more documentation read the Info file.

** INSTALLATION

=jasql= is not in Quicklisp. Either put it into QL's local projects or to any other place where
QL/ASDF can find it.

You can run ~make install~ to install it to =/usr/local/lisp/jasql= or any other =prefix= ASDF knows about.

* AUTHOR

Sebastian Christ ([[mailto:[email protected]]])

* LICENSE

Released under the MPL-2.0 license.

* SEE ALSO

- [[https://github.com/honza/anosql]]
- [[https://github.com/ruricolist/cl-yesql]]