Gih's Blog

只言片语

A nice ORM library in common lisp

2014-07-20 by gihnius, tagged as lisp

Crane project home page: http://eudoxia0.github.io/crane/

(filter 'user) ;; Returns everything

(filter 'user :name "Eudoxia")(filter 'user (:> :age 21))

;; Returns a single object
(single 'user :name "Eudoxia");;Throws an error ifthis returns more
;; than one object(single!'user (:< age 35))

;; t if a match exists, nil otherwise
(exists 'user :name "Eudoxia");;Ifthis record doesn't exist create it
(get-or-create 'user :name "Eudoxia":age 19)