mito
mito copied to clipboard
An ORM for Common Lisp with migrations, relationships and PostgreSQL support
I have a table schemas like the below: ```lisp (mito:deftable warehouses () ((location :col-type (:varchar 50)) (capacity :col-type (:integer)))) (mito:deftable boxes () ((contents :col-type (:varchar 10)) (value :col-type (:integer)) (warehouse...
Hi, When I call `find-dao 'my-model :my-slot (get-data)` but `(get-data)` is buggy and returns NIL instead of a value, I get a large stacktrace which goes down to SXQL: ```...
Sample ``` (deftable file () ((file-name :col-type (:varchar 260) :initarg :file-name :accessor file-name))) (deftable foo () ((file-dao :col-type file :initarg :file-dao :accessor file-dao))) (deftable foo-1 (foo) ()) (mapc #'ensure-table-exists (list...
```shell $ createdb mito-example ``` ```common-lisp (ql:quickload :mito) (mito:deftable parent () ()) (mito:deftable child () ((parent :col-type parent))) (mito:connect-toplevel :postgres :database-name "mito-example") (mapc #'mito:execute-sql (mapcan #'mito:table-definition '(parent child))) (mito:create-dao 'child...
```shell $ createdb mito-example ``` ```common-lisp (ql:quickload '(:mito :uuid)) (defclass uuid-pk-mixin () ((uuid :col-type (:varchar 36) :initform (uuid:make-v4-uuid) :accessor object-uuid :primary-key t)) (:metaclass mito:dao-table-mixin)) (mito:deftable hoge (uuid-pk-mixin) ()) (mito:connect-toplevel :postgres...
Here is the minimal example to reproduce this issue: ```lisp CL-USER> (length (mito.migration.sql-parse::parse-statements " CREATE TABLE test_dist (id INTEGER, quicklisp_version TEXT NOT NULL DEFAULT ''); CREATE TABLE any_other_table_o_more (id INTEGER);...
CL-USER> (mito:connect-toplevel :mysql :database-name "v****" :username "****" :password "********") # CL-USER> (mito:deftable user() ((name :col-type (:varchar 64)) (email :col-type (or (:varchar 128) :null)))) # CL-USER> (mito:table-definition 'user) (#) CL-USER> (mapc...
Reported by @masatoi in person. Need to reproduce with a minimum example. It could also happen with other RDBMS, but there's no information. ```common-lisp (defclass abc () ((token :col-type (:varchar...
During the investigation of this issue: roswell/roswell#404 I found that mito calling `(ql:quickload)` in the Lisp code. In my humble opinion it is not a good practice to do so,...
This error happens when you have a reference to another table in the class, having `metclass = dao-table-mixin`. Here is a full example to reproduce this problem: ``` (defpackage #:mito-test...