The mito Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The mito Reference Manual

This is the mito Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:19:22 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Mito

Build Status Coverage Status Quicklisp dist

Mito is yet another object relational mapper and it aims to be a successor of Integral.

Warning

This software is still ALPHA quality. The APIs will be likely to change.

Should work fine with MySQL, PostgreSQL and SQLite3 on SBCL/Clozure CL.

Usage

(mito:connect-toplevel :mysql :database-name "myapp" :username "fukamachi" :password "c0mon-1isp")
;=> #<DBD.MYSQL:<DBD-MYSQL-CONNECTION> {100691BFF3}>

(defclass user ()
  ((name :col-type (:varchar 64)
         :initarg :name
         :accessor user-name)
   (email :col-type (or (:varchar 128) :null)
          :initarg :email
          :accessor user-email))
  (:metaclass mito:dao-table-class))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>

(mito:table-definition 'user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128))>)

(defclass tweet ()
  ((status :col-type :text
           :initarg :status
           :accessor tweet-status)
   (user :col-type user
         :initarg :user
         :accessor tweet-user))
  (:metaclass mito:dao-table-class))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::TWEET>

(mito:table-definition 'tweet)
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, status TEXT NOT NULL, user_id BIGINT UNSIGNED NOT NULL, created_at TIMESTAMP, updated_at TIMESTAMP)>)

Connecting to DB

Mito provides a function connect-toplevel and disconnect-toplevel to establish a connection to RDBMS.

connect-toplevel takes the same arguments as dbi:connect, typically the driver-type, the database name to connect, user name and password.

(mito:connect-toplevel :mysql :database-name "myapp" :username "fukamachi" :password "c0mon-1isp")

connect-toplevel sets *connection* the new connection and returns it.

If you want to use a connection lexically, just bind it:

(let ((mito:*connection* (dbi:connect :sqlite3 :database-name #P"/tmp/myapp.db")))
  (unwind-protect (progn ...)
    ;; Ensure that the connection is closed.
    (dbi:disconnect mito:*connection*)))

Class Definitions

In Mito, you can define a class which corresponds to a database table by specifying (:metaclass mito:dao-table-class).

(defclass user ()
  ((name :col-type (:varchar 64)
         :initarg :name
         :accessor user-name)
   (email :col-type (or (:varchar 128) :null)
          :initarg :email
          :accessor user-email))
  (:metaclass mito:dao-table-class))

The above defines a Common Lisp normal class except that it allows additional options.

(defclass {class-name} ()
  ({column-definition}*)
  (:metaclass mito:dao-table-class)
  [[class-option]])

column-definition ::= (slot-name [[column-option]])
column-option ::= {:col-type col-type} |
                  {:primary-key boolean} |
                  {:inflate inflation-function} |
                  {:deflate deflation-function} |
                  {:references {class-name | (class-name slot-name)}} |
                  {:ghost boolean}
col-type ::= { keyword |
              (keyword . args) |
              (or keyword :null) |
              (or :null keyword) }
class-option ::= {:primary-key symbol*} |
                 {:unique-keys {symbol | (symbol*)}*} |
                 {:keys {symbol | (symbol*)}*} |
                 {:table-name table-name}
                 {:auto-pk boolean}
                 {:record-timestamps boolean}

Note the class automatically adds some slots -- a primary key named id if there's no primary keys, created_at and updated_at for recording timestamps. To disable these behaviors, specify :auto-pk nil or :record-timestamps nil to defclass forms.

(mito.class:table-column-slots (find-class 'user))
;=> (#<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::ID>
;    #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS COMMON-LISP-USER::NAME>
;    #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS COMMON-LISP-USER::EMAIL>
;    #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::CREATED-AT>
;    #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::UPDATED-AT>)

The class inherits mito:dao-class implicitly.

(find-class 'user)
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>

(c2mop:class-direct-superclasses *)
;=> (#<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS>)

This may be useful when you define methods which can be applied for all table classes.

Generating Table Definitions

(mito:table-definition 'user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128), created_at TIMESTAMP, updated_at TIMESTAMP)>)

(sxql:yield *)
;=> "CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128), created_at TIMESTAMP, updated_at TIMESTAMP)"
;   NIL

Creating DB tables

(mapc #'mito:execute-sql (mito:table-definition 'user))

(mito:ensure-table-exists 'user)

CRUD

(defvar me
  (make-instance 'user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com"))
;=> USER

(mito:insert-dao me)
;-> ;; INSERT INTO `user` (`name`, `email`, `created_at`, `updated_at`) VALUES (?, ?, ?, ?) ("Eitaro Fukamachi", "e.arrows@gmail.com", "2016-02-04T19:55:16.365543Z", "2016-02-04T19:55:16.365543Z") [0 rows] | MITO.DAO:INSERT-DAO
;=> #<USER {10053C4453}>

;; Same as above
(mito:create-dao 'user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com")

;; Getting the primary key value
(mito:object-id me)
;=> 1

;; Retrieving from the DB
(mito:find-dao 'user :id 1)
;-> ;; SELECT * FROM `user` WHERE (`id` = ?) LIMIT 1 (1) [1 row] | MITO.DB:RETRIEVE-BY-SQL
;=> #<USER {10077C6073}>

;; Updating
(setf (slot-value me 'name) "nitro_idiot")
;=> "nitro_idiot"

(mito:save-dao me)
;-> ;; UPDATE `user` SET `id` = ?, `name` = ?, `email` = ?, `created_at` = ?, `updated_at` = ? WHERE (`id` = ?) (2, "nitro_idiot", "e.arrows@gmail.com", "2016-02-04T19:56:11.408927Z", "2016-02-04T19:56:19.006020Z", 2) [0 rows] | MITO.DAO:UPDATE-DAO

;; Deleting
(mito:delete-dao me)
;-> ;; DELETE FROM `user` WHERE (`id` = ?) (1) [0 rows] | MITO.DAO:DELETE-DAO
(mito:delete-by-values 'user :id 1)
;-> ;; DELETE FROM `user` WHERE (`id` = ?) (1) [0 rows] | MITO.DAO:DELETE-DAO

Relationship

To define a relationship, use :references at the slot:

(defclass user ()
  ((name :col-type (:varchar 64)
         :initarg :name
         :accessor user-name)
   (email :col-type (or (:varchar 128) :null)
          :initarg :email
          :accessor user-email))
  (:metaclass mito:dao-table-class))

(defclass tweet ()
  ((status :col-type :text
           :initarg :status
           :accessor tweet-status)
   ;; This slot refers to USER class
   (user-id :references (user id)
            :initarg :user-id
            :accessor tweet-user-id))
  (:metaclass mito:dao-table-class))

;; The :col-type of USER-ID column is retrieved from the foreign class.
(table-definition (find-class 'tweet))
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (
;        id BIGSERIAL NOT NULL PRIMARY KEY,
;        status TEXT NOT NULL,
;        user_id BIGINT NOT NULL,
;        created_at TIMESTAMP,
;        updated_at TIMESTAMP
;    )>)

You can also specify another foreign class at :col-type for defining a relationship:

(defclass tweet ()
  ((status :col-type :text
           :initarg :status
           :accessor tweet-status)
   ;; This slot refers to USER class
   (user :col-type user
         :initarg :user
         :accessor tweet-user))
  (:metaclass mito:dao-table-class))

(table-definition (find-class 'tweet))
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (
;        id BIGSERIAL NOT NULL PRIMARY KEY,
;        status TEXT NOT NULL,
;        user_id BIGINT NOT NULL,
;        created_at TIMESTAMP,
;        updated_at TIMESTAMP
;    )>)

;; You can specify :USER arg, instead of :USER-ID.
(defvar *user* (mito:create-dao 'user :name "Eitaro Fukamachi"))
(mito:create-dao 'tweet :user *user*)

(mito:find-dao 'tweet :user *user*)

The later example allows you to create/retrieve TWEET by a USER object, not a USER-ID.

Mito doesn't add foreign key constraints for refering tables since I'm not sure it's still handful while using with ORMs.

Inflation/Deflation

Inflation/Deflation is a function to convert values between Mito and RDBMS.

(defclass user-report ()
  ((title :col-type (:varchar 100)
          :initarg :title
          :accessor report-title)
   (body :col-type :text
         :initarg :body
         :initform ""
         :accessor report-body)
   (reported-at :col-type :timestamp
                :initarg :reported-at
                :initform (local-time:now)
                :accessor report-reported-at
                :inflate #'local-time:universal-to-timestamp
                :deflate #'local-time:timestamp-to-universal))
  (:metaclass mito:dao-table-class))

Eager loading

One of the pains in the neck to use ORMs is "N+1 query" problem.

;; BAD EXAMPLE

(use-package '(:mito :sxql))

(defvar *tweets-contain-japan*
  (select-dao 'tweet
    (where (:like :status "%Japan%"))))

;; Getting names of tweeted users.
(mapcar (lambda (tweet)
          (user-name (tweet-user tweet)))
        *tweets-contain-japan*)

This example sends a query to retrieve a user like "SELECT * FROM user WHERE id = ?" for each iterations.

To prevent this performance issue, add includes to the above query which only sends a single WHERE IN query instead of N queries:

;; GOOD EXAMPLE with eager loading

(use-package '(:mito :sxql))

(defvar *tweets-contain-japan*
  (select-dao 'tweet
    (includes 'user)
    (where (:like :status "%Japan%"))))
;-> ;; SELECT * FROM `tweet` WHERE (`status` LIKE ?) ("%Japan%") [3 row] | MITO.DB:RETRIEVE-BY-SQL
;-> ;; SELECT * FROM `user` WHERE (`id` IN (?, ?, ?)) (1, 3, 12) [3 row] | MITO.DB:RETRIEVE-BY-SQL
;=> (#<TWEET {1003513EC3}> #<TWEET {1007BABEF3}> #<TWEET {1007BB9D63}>)

;; No additional SQLs will be executed.
(tweet-user (first *))
;=> #<USER {100361E813}>

Migrations

(ensure-table-exists 'user)
;-> ;; CREATE TABLE IF NOT EXISTS "user" (
;       "id" BIGSERIAL NOT NULL PRIMARY KEY,
;       "name" VARCHAR(64) NOT NULL,
;       "email" VARCHAR(128),
;       "created_at" TIMESTAMP,
;       "updated_at" TIMESTAMP
;   ) () [0 rows] | MITO.DAO:ENSURE-TABLE-EXISTS

;; No changes
(mito:migration-expressions 'user)
;=> NIL

(defclass user ()
  ((name :col-type (:varchar 64)
         :initarg :name
         :accessor user-name)
   (email :col-type (:varchar 128)
          :initarg :email
          :accessor user-email))
  (:metaclass mito:dao-table-class)
  (:unique-keys email))

(mito:migration-expressions 'user)
;=> (#<SXQL-STATEMENT: ALTER TABLE user ALTER COLUMN email TYPE character varying(128), ALTER COLUMN email SET NOT NULL>
;    #<SXQL-STATEMENT: CREATE UNIQUE INDEX unique_user_email ON user (email)>)

(mito:migrate-table 'user)
;-> ;; ALTER TABLE "user" ALTER COLUMN "email" TYPE character varying(128), ALTER COLUMN "email" SET NOT NULL () [0 rows] | MITO.MIGRATION.TABLE:MIGRATE-TABLE
;   ;; CREATE UNIQUE INDEX "unique_user_email" ON "user" ("email") () [0 rows] | MITO.MIGRATION.TABLE:MIGRATE-TABLE
;-> (#<SXQL-STATEMENT: ALTER TABLE user ALTER COLUMN email TYPE character varying(128), ALTER COLUMN email SET NOT NULL>
;    #<SXQL-STATEMENT: CREATE UNIQUE INDEX unique_user_email ON user (email)>)

Schema versioning

$ ros install mito
$ mito
Usage: mito command [option...]

Commands:
    generate-migrations
    migrate

Options:
    -t, --type DRIVER-TYPE          DBI driver type (one of "mysql", "postgres" or "sqlite3")
    -d, --database DATABASE-NAME    Database name to use
    -u, --username USERNAME         Username for RDBMS
    -p, --password PASSWORD         Password for RDBMS
    -s, --system SYSTEM             ASDF system to load (several -s's allowed)
    -D, --directory DIRECTORY       Directory path to keep migration SQL files (default: "/Users/nitro_idiot/Programs/lib/mito/db/")
    --dry-run                       List SQL expressions to migrate

Inheritance and Mixin

A subclass of DAO-CLASS is allowed to be inherited. This may be useful when you need classes which have similar columns:

(defclass user ()
  ((name :col-type (:varchar 64)
         :initarg :name
         :accessor user-name)
   (email :col-type (:varchar 128)
          :initarg :email
          :accessor user-email))
  (:metaclass mito:dao-table-class)
  (:unique-keys email))

(defclass temporary-user (user)
  ((registered-at :col-type :timestamp
                  :initarg :registered-at
                  :accessor temporary-user-registered-at))
  (:metaclass mito:dao-table-class))

(mito:table-definition 'temporary-user)
;=> (#<SXQL-STATEMENT: CREATE TABLE temporary_user (
;        id BIGSERIAL NOT NULL PRIMARY KEY,
;        name VARCHAR(64) NOT NULL,
;        email VARCHAR(128) NOT NULL,
;        registered_at TIMESTAMP NOT NULL,
;        created_at TIMESTAMP,
;        updated_at TIMESTAMP,
;        UNIQUE (email)
;    )>)

If you need a 'template' for tables which doesn't related to any database tables, you can use DAO-TABLE-MIXIN:

(defclass has-email ()
  ((email :col-type (:varchar 128)
          :initarg :email
          :accessor object-email))
  (:metaclass mito:dao-table-mixin)
  (:unique-keys email))
;=> #<MITO.DAO.MIXIN:DAO-TABLE-MIXIN COMMON-LISP-USER::HAS-EMAIL>

(defclass user (has-email)
  ((name :col-type (:varchar 64)
         :initarg :name
         :accessor user-name))
  (:metaclass mito:dao-table-class))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>

(mito:table-definition 'user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (
;       id BIGSERIAL NOT NULL PRIMARY KEY,
;       name VARCHAR(64) NOT NULL,
;       email VARCHAR(128) NOT NULL,
;       created_at TIMESTAMP,
;       updated_at TIMESTAMP,
;       UNIQUE (email)
;   )>)

Triggers

Since insert-dao, update-dao and delete-dao are defined as generic functions, you can define :before, :after or :around methods to those.

(defmethod mito:insert-dao :before ((object user))
  (format t "~&Adding ~S...~%" (user-name object)))

(mito:create-dao 'user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com")
;-> Adding "Eitaro Fukamachi"...
;   ;; INSERT INTO "user" ("name", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?) ("Eitaro Fukamachi", "e.arrows@gmail.com", "2016-02-16 21:13:47", "2016-02-16 21:13:47") [0 rows] | MITO.DAO:INSERT-DAO
;=> #<USER {100835FB33}>

Installation

$ mkdir -p ~/common-lisp
$ cd ~/common-lisp
$ git clone https://github.com/fukamachi/mito
$ ros -L ~/common-lisp/mito/mito.asd install mito
(ql:quickload :mito)

See Also

Author

Copyright

Copyright (c) 2015 Eitaro Fukamachi (e.arrows@gmail.com)

License

Licensed under the LLGPL License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Next: , Previous: , Up: Systems   [Contents][Index]

2.1 mito

Author

Eitaro Fukamachi

License

LLGPL

Description

Abstraction layer for DB schema

Long Description

# Mito

[![Build Status](https://travis-ci.org/fukamachi/mito.svg?branch=master)](https://travis-ci.org/fukamachi/mito)
[![Coverage Status](https://coveralls.io/repos/fukamachi/mito/badge.svg?branch=master&service=github)](https://coveralls.io/github/fukamachi/mito?branch=master)
[![Quicklisp dist](http://quickdocs.org/badge/mito.svg)](http://quickdocs.org/mito/)

Mito is yet another object relational mapper and it aims to be a successor of [Integral](https://github.com/fukamachi/integral).

* Supports MySQL, PostgreSQL and SQLite3
* Adds ‘id‘ (serial primary key), ‘created_at‘ and ‘updated_at‘ by default like Ruby’s ActiveRecord
* Migrations
* DB schema versioning

## Warning

This software is still ALPHA quality. The APIs will be likely to change.

Should work fine with MySQL, PostgreSQL and SQLite3 on SBCL/Clozure CL.

## Usage

“‘common-lisp
(mito:connect-toplevel :mysql :database-name "myapp" :username "fukamachi" :password "c0mon-1isp")
;=> #<DBD.MYSQL:<DBD-MYSQL-CONNECTION> {100691BFF3}>

(defclass user ()
((name :col-type (:varchar 64)
:initarg :name
:accessor user-name)
(email :col-type (or (:varchar 128) :null)
:initarg :email
:accessor user-email))
(:metaclass mito:dao-table-class))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>

(mito:table-definition ’user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128))>)

(defclass tweet ()
((status :col-type :text
:initarg :status
:accessor tweet-status)
(user :col-type user
:initarg :user
:accessor tweet-user))
(:metaclass mito:dao-table-class))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::TWEET>

(mito:table-definition ’tweet)
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, status TEXT NOT NULL, user_id BIGINT UNSIGNED NOT NULL, created_at TIMESTAMP, updated_at TIMESTAMP)>)
“‘

### Connecting to DB

Mito provides a function ‘connect-toplevel‘ and ‘disconnect-toplevel‘ to establish a connection to RDBMS.

‘connect-toplevel‘ takes the same arguments as ‘dbi:connect‘, typically the driver-type, the database name to connect, user name and password.

“‘common-lisp
(mito:connect-toplevel :mysql :database-name "myapp" :username "fukamachi" :password "c0mon-1isp")
“‘

‘connect-toplevel‘ sets ‘*connection*‘ the new connection and returns it.

If you want to use a connection lexically, just bind it:

“‘common-lisp
(let ((mito:*connection* (dbi:connect :sqlite3 :database-name #P"/tmp/myapp.db")))
(unwind-protect (progn ...)
;; Ensure that the connection is closed.
(dbi:disconnect mito:*connection*)))
“‘

### Class Definitions

In Mito, you can define a class which corresponds to a database table by specifying ‘(:metaclass mito:dao-table-class)‘.

“‘common-lisp
(defclass user ()
((name :col-type (:varchar 64)
:initarg :name
:accessor user-name)
(email :col-type (or (:varchar 128) :null)
:initarg :email
:accessor user-email))
(:metaclass mito:dao-table-class))
“‘

The above defines a Common Lisp normal class except that it allows additional options.

“‘
(defclass {class-name} ()
({column-definition}*)
(:metaclass mito:dao-table-class)
[[class-option]])

column-definition ::= (slot-name [[column-option]])
column-option ::= {:col-type col-type} |
{:primary-key boolean} |
{:inflate inflation-function} |
{:deflate deflation-function} |
{:references {class-name | (class-name slot-name)}} |
{:ghost boolean}
col-type ::= { keyword |
(keyword . args) |
(or keyword :null) |
(or :null keyword) }
class-option ::= {:primary-key symbol*} |
{:unique-keys {symbol | (symbol*)}*} |
{:keys {symbol | (symbol*)}*} |
{:table-name table-name}
{:auto-pk boolean}
{:record-timestamps boolean}
“‘

Note the class automatically adds some slots – a primary key named ‘id‘ if there’s no primary keys, ‘created_at‘ and ‘updated_at‘ for recording timestamps. To disable these behaviors, specify ‘:auto-pk nil‘ or ‘:record-timestamps nil‘ to defclass forms.

“‘common-lisp
(mito.class:table-column-slots (find-class ’user))
;=> (#<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::ID>
; #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS COMMON-LISP-USER::NAME>
; #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS COMMON-LISP-USER::EMAIL>
; #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::CREATED-AT>
; #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::UPDATED-AT>)
“‘

The class inherits ‘mito:dao-class‘ implicitly.

“‘common-lisp
(find-class ’user)
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>

(c2mop:class-direct-superclasses *)
;=> (#<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS>)
“‘

This may be useful when you define methods which can be applied for all table classes.

### Generating Table Definitions

“‘common-lisp
(mito:table-definition ’user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128), created_at TIMESTAMP, updated_at TIMESTAMP)>)

(sxql:yield *)
;=> "CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128), created_at TIMESTAMP, updated_at TIMESTAMP)"
; NIL
“‘

### Creating DB tables

“‘common-lisp
(mapc #’mito:execute-sql (mito:table-definition ’user))

(mito:ensure-table-exists ’user)
“‘

### CRUD

“‘common-lisp
(defvar me
(make-instance ’user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com"))
;=> USER

(mito:insert-dao me)
;-> ;; INSERT INTO ‘user‘ (‘name‘, ‘email‘, ‘created_at‘, ‘updated_at‘) VALUES (?, ?, ?, ?) ("Eitaro Fukamachi", "e.arrows@gmail.com", "2016-02-04T19:55:16.365543Z", "2016-02-04T19:55:16.365543Z") [0 rows] | MITO.DAO:INSERT-DAO
;=> #<USER {10053C4453}>

;; Same as above
(mito:create-dao ’user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com")

;; Getting the primary key value
(mito:object-id me)
;=> 1

;; Retrieving from the DB
(mito:find-dao ’user :id 1)
;-> ;; SELECT * FROM ‘user‘ WHERE (‘id‘ = ?) LIMIT 1 (1) [1 row] | MITO.DB:RETRIEVE-BY-SQL
;=> #<USER {10077C6073}>

;; Updating
(setf (slot-value me ’name) "nitro_idiot")
;=> "nitro_idiot"

(mito:save-dao me)
;-> ;; UPDATE ‘user‘ SET ‘id‘ = ?, ‘name‘ = ?, ‘email‘ = ?, ‘created_at‘ = ?, ‘updated_at‘ = ? WHERE (‘id‘ = ?) (2, "nitro_idiot", "e.arrows@gmail.com", "2016-02-04T19:56:11.408927Z", "2016-02-04T19:56:19.006020Z", 2) [0 rows] | MITO.DAO:UPDATE-DAO

;; Deleting
(mito:delete-dao me)
;-> ;; DELETE FROM ‘user‘ WHERE (‘id‘ = ?) (1) [0 rows] | MITO.DAO:DELETE-DAO
(mito:delete-by-values ’user :id 1)
;-> ;; DELETE FROM ‘user‘ WHERE (‘id‘ = ?) (1) [0 rows] | MITO.DAO:DELETE-DAO
“‘

### Relationship

To define a relationship, use ‘:references‘ at the slot:

“‘common-lisp
(defclass user ()
((name :col-type (:varchar 64)
:initarg :name
:accessor user-name)
(email :col-type (or (:varchar 128) :null)
:initarg :email
:accessor user-email))
(:metaclass mito:dao-table-class))

(defclass tweet ()
((status :col-type :text
:initarg :status
:accessor tweet-status)
;; This slot refers to USER class
(user-id :references (user id)
:initarg :user-id
:accessor tweet-user-id))
(:metaclass mito:dao-table-class))

;; The :col-type of USER-ID column is retrieved from the foreign class.
(table-definition (find-class ’tweet))
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (
; id BIGSERIAL NOT NULL PRIMARY KEY,
; status TEXT NOT NULL,
; user_id BIGINT NOT NULL,
; created_at TIMESTAMP,
; updated_at TIMESTAMP
; )>)
“‘

You can also specify another foreign class at ‘:col-type‘ for defining a relationship:

“‘common-lisp
(defclass tweet ()
((status :col-type :text
:initarg :status
:accessor tweet-status)
;; This slot refers to USER class
(user :col-type user
:initarg :user
:accessor tweet-user))
(:metaclass mito:dao-table-class))

(table-definition (find-class ’tweet))
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (
; id BIGSERIAL NOT NULL PRIMARY KEY,
; status TEXT NOT NULL,
; user_id BIGINT NOT NULL,
; created_at TIMESTAMP,
; updated_at TIMESTAMP
; )>)

;; You can specify :USER arg, instead of :USER-ID.
(defvar *user* (mito:create-dao ’user :name "Eitaro Fukamachi"))
(mito:create-dao ’tweet :user *user*)

(mito:find-dao ’tweet :user *user*)
“‘

The later example allows you to create/retrieve ‘TWEET‘ by a ‘USER‘ object, not a ‘USER-ID‘.

Mito doesn’t add foreign key constraints for refering tables since I’m not sure it’s still handful while using with ORMs.

### Inflation/Deflation

Inflation/Deflation is a function to convert values between Mito and RDBMS.

“‘common-lisp
(defclass user-report ()
((title :col-type (:varchar 100)
:initarg :title
:accessor report-title)
(body :col-type :text
:initarg :body
:initform ""
:accessor report-body)
(reported-at :col-type :timestamp
:initarg :reported-at
:initform (local-time:now)
:accessor report-reported-at
:inflate #’local-time:universal-to-timestamp
:deflate #’local-time:timestamp-to-universal))
(:metaclass mito:dao-table-class))
“‘

### Eager loading

One of the pains in the neck to use ORMs is "N+1 query" problem.

“‘common-lisp
;; BAD EXAMPLE

(use-package ’(:mito :sxql))

(defvar *tweets-contain-japan*
(select-dao ’tweet
(where (:like :status "%Japan%"))))

;; Getting names of tweeted users.
(mapcar (lambda (tweet)
(user-name (tweet-user tweet)))
*tweets-contain-japan*)
“‘

This example sends a query to retrieve a user like "SELECT * FROM user WHERE id = ?" for each iterations.

To prevent this performance issue, add ‘includes‘ to the above query which only sends a single WHERE IN query instead of N queries:

“‘common-lisp
;; GOOD EXAMPLE with eager loading

(use-package ’(:mito :sxql))

(defvar *tweets-contain-japan*
(select-dao ’tweet
(includes ’user)
(where (:like :status "%Japan%"))))
;-> ;; SELECT * FROM ‘tweet‘ WHERE (‘status‘ LIKE ?) ("%Japan%") [3 row] | MITO.DB:RETRIEVE-BY-SQL
;-> ;; SELECT * FROM ‘user‘ WHERE (‘id‘ IN (?, ?, ?)) (1, 3, 12) [3 row] | MITO.DB:RETRIEVE-BY-SQL
;=> (#<TWEET {1003513EC3}> #<TWEET {1007BABEF3}> #<TWEET {1007BB9D63}>)

;; No additional SQLs will be executed.
(tweet-user (first *))
;=> #<USER {100361E813}>
“‘

### Migrations

“‘common-lisp
(ensure-table-exists ’user)
;-> ;; CREATE TABLE IF NOT EXISTS "user" (
; "id" BIGSERIAL NOT NULL PRIMARY KEY,
; "name" VARCHAR(64) NOT NULL,
; "email" VARCHAR(128),
; "created_at" TIMESTAMP,
; "updated_at" TIMESTAMP
; ) () [0 rows] | MITO.DAO:ENSURE-TABLE-EXISTS

;; No changes
(mito:migration-expressions ’user)
;=> NIL

(defclass user ()
((name :col-type (:varchar 64)
:initarg :name
:accessor user-name)
(email :col-type (:varchar 128)
:initarg :email
:accessor user-email))
(:metaclass mito:dao-table-class)
(:unique-keys email))

(mito:migration-expressions ’user)
;=> (#<SXQL-STATEMENT: ALTER TABLE user ALTER COLUMN email TYPE character varying(128), ALTER COLUMN email SET NOT NULL>
; #<SXQL-STATEMENT: CREATE UNIQUE INDEX unique_user_email ON user (email)>)

(mito:migrate-table ’user)
;-> ;; ALTER TABLE "user" ALTER COLUMN "email" TYPE character varying(128), ALTER COLUMN "email" SET NOT NULL () [0 rows] | MITO.MIGRATION.TABLE:MIGRATE-TABLE
; ;; CREATE UNIQUE INDEX "unique_user_email" ON "user" ("email") () [0 rows] | MITO.MIGRATION.TABLE:MIGRATE-TABLE
;-> (#<SXQL-STATEMENT: ALTER TABLE user ALTER COLUMN email TYPE character varying(128), ALTER COLUMN email SET NOT NULL>
; #<SXQL-STATEMENT: CREATE UNIQUE INDEX unique_user_email ON user (email)>)
“‘

### Schema versioning

“‘
$ ros install mito
$ mito
Usage: mito command [option...]

Commands:
generate-migrations
migrate

Options:
-t, –type DRIVER-TYPE DBI driver type (one of "mysql", "postgres" or "sqlite3")
-d, –database DATABASE-NAME Database name to use
-u, –username USERNAME Username for RDBMS
-p, –password PASSWORD Password for RDBMS
-s, –system SYSTEM ASDF system to load (several -s’s allowed)
-D, –directory DIRECTORY Directory path to keep migration SQL files (default: "/Users/nitro_idiot/Programs/lib/mito/db/")
–dry-run List SQL expressions to migrate
“‘

### Inheritance and Mixin

A subclass of DAO-CLASS is allowed to be inherited. This may be useful when you need classes which have similar columns:

“‘common-lisp
(defclass user ()
((name :col-type (:varchar 64)
:initarg :name
:accessor user-name)
(email :col-type (:varchar 128)
:initarg :email
:accessor user-email))
(:metaclass mito:dao-table-class)
(:unique-keys email))

(defclass temporary-user (user)
((registered-at :col-type :timestamp
:initarg :registered-at
:accessor temporary-user-registered-at))
(:metaclass mito:dao-table-class))

(mito:table-definition ’temporary-user)
;=> (#<SXQL-STATEMENT: CREATE TABLE temporary_user (
; id BIGSERIAL NOT NULL PRIMARY KEY,
; name VARCHAR(64) NOT NULL,
; email VARCHAR(128) NOT NULL,
; registered_at TIMESTAMP NOT NULL,
; created_at TIMESTAMP,
; updated_at TIMESTAMP,
; UNIQUE (email)
; )>)
“‘

If you need a ’template’ for tables which doesn’t related to any database tables, you can use ‘DAO-TABLE-MIXIN‘:

“‘common-lisp
(defclass has-email ()
((email :col-type (:varchar 128)
:initarg :email
:accessor object-email))
(:metaclass mito:dao-table-mixin)
(:unique-keys email))
;=> #<MITO.DAO.MIXIN:DAO-TABLE-MIXIN COMMON-LISP-USER::HAS-EMAIL>

(defclass user (has-email)
((name :col-type (:varchar 64)
:initarg :name
:accessor user-name))
(:metaclass mito:dao-table-class))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>

(mito:table-definition ’user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (
; id BIGSERIAL NOT NULL PRIMARY KEY,
; name VARCHAR(64) NOT NULL,
; email VARCHAR(128) NOT NULL,
; created_at TIMESTAMP,
; updated_at TIMESTAMP,
; UNIQUE (email)
; )>)
“‘

* [mito-attachment](https://github.com/fukamachi/mito-attachment)
* [mito-auth](https://github.com/fukamachi/mito-auth)

### Triggers

Since ‘insert-dao‘, ‘update-dao‘ and ‘delete-dao‘ are defined as generic functions, you can define ‘:before‘, ‘:after‘ or ‘:around‘ methods to those.

“‘common-lisp
(defmethod mito:insert-dao :before ((object user))
(format t "~&Adding ~S...~%" (user-name object)))

(mito:create-dao ’user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com")
;-> Adding "Eitaro Fukamachi"...
; ;; INSERT INTO "user" ("name", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?) ("Eitaro Fukamachi", "e.arrows@gmail.com", "2016-02-16 21:13:47", "2016-02-16 21:13:47") [0 rows] | MITO.DAO:INSERT-DAO
;=> #<USER {100835FB33}>
“‘

## Installation

“‘
$ mkdir -p ~/common-lisp
$ cd ~/common-lisp
$ git clone https://github.com/fukamachi/mito
$ ros -L ~/common-lisp/mito/mito.asd install mito
“‘

“‘common-lisp
(ql:quickload :mito)
“‘

## See Also

* [CL-DBI](https://github.com/fukamachi/cl-dbi)
* [SxQL](https://github.com/fukamachi/sxql)

## Author

* Eitaro Fukamachi (e.arrows@gmail.com)

## Copyright

Copyright (c) 2015 Eitaro Fukamachi (e.arrows@gmail.com)

## License

Licensed under the LLGPL License.

Version

0.1

Dependencies
Source

mito.asd (file)

Component

src/mito.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.2 mito-migration

Author

Eitaro Fukamachi

License

LLGPL

Version

0.1

Dependencies
Source

mito-migration.asd (file)

Components

Previous: , Up: Systems   [Contents][Index]

2.3 mito-core

Author

Eitaro Fukamachi

License

LLGPL

Version

0.1

Dependencies
Source

mito-core.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Next: , Previous: , Up: Modules   [Contents][Index]

3.1 mito-migration/migration-components

Parent

mito-migration (system)

Location

src/migration/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

3.2 mito-core/core-components

Parent

mito-core (system)

Location

src/core/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

3.3 mito-core/core-components/dao-components

Dependencies
Parent

core-components (module)

Location

src/core/dao/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

3.4 mito-core/core-components/class-components

Dependencies
Parent

core-components (module)

Location

src/core/class/

Components

Previous: , Up: Modules   [Contents][Index]

3.5 mito-core/core-components/db-drivers

Dependencies
Parent

core-components (module)

Location

src/core/db/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 mito.asd

Location

mito.asd

Systems

mito (system)

Packages

mito-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 mito-migration.asd

Location

mito-migration.asd

Systems

mito-migration (system)

Packages

mito-migration-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 mito-core.asd

Location

mito-core.asd

Systems

mito-core (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 mito/src/mito.lisp

Parent

mito (system)

Location

src/mito.lisp

Packages

mito


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 mito-migration/src/migration.lisp

Dependency

migration-components (module)

Parent

mito-migration (system)

Location

src/migration.lisp

Packages

mito.migration


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 mito-migration/migration-components/table.lisp

Dependency

sxql.lisp (file)

Parent

migration-components (module)

Location

src/migration/table.lisp

Packages

mito.migration.table

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 mito-migration/migration-components/versions.lisp

Dependency

table.lisp (file)

Parent

migration-components (module)

Location

src/migration/versions.lisp

Packages

mito.migration.versions

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.8 mito-migration/migration-components/sxql.lisp

Parent

migration-components (module)

Location

src/migration/sxql.lisp

Packages

mito.migration.sxql

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.9 mito-core/src/core.lisp

Dependency

core-components (module)

Parent

mito-core (system)

Location

src/core.lisp

Packages

mito.core


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.10 mito-core/core-components/dao.lisp

Dependency

dao-components (module)

Parent

core-components (module)

Location

src/core/dao.lisp

Packages

mito.dao

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.11 mito-core/core-components/dao-components/table.lisp

Dependencies
Parent

dao-components (module)

Location

src/core/dao/table.lisp

Packages

mito.dao.table

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.12 mito-core/core-components/dao-components/mixin.lisp

Dependency

column.lisp (file)

Parent

dao-components (module)

Location

src/core/dao/mixin.lisp

Packages

mito.dao.mixin

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.13 mito-core/core-components/dao-components/column.lisp

Parent

dao-components (module)

Location

src/core/dao/column.lisp

Packages

mito.dao.column

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.14 mito-core/core-components/class.lisp

Dependency

class-components (module)

Parent

core-components (module)

Location

src/core/class.lisp

Packages

mito.class

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.15 mito-core/core-components/class-components/table.lisp

Dependency

column.lisp (file)

Parent

class-components (module)

Location

src/core/class/table.lisp

Packages

mito.class.table

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.16 mito-core/core-components/class-components/column.lisp

Parent

class-components (module)

Location

src/core/class/column.lisp

Packages

mito.class.column

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.17 mito-core/core-components/connection.lisp

Dependency

error.lisp (file)

Parent

core-components (module)

Location

src/core/connection.lisp

Packages

mito.connection

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.18 mito-core/core-components/type.lisp

Dependency

db.lisp (file)

Parent

core-components (module)

Location

src/core/type.lisp

Packages

mito.type

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.19 mito-core/core-components/db.lisp

Dependencies
Parent

core-components (module)

Location

src/core/db.lisp

Packages

mito.db

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.20 mito-core/core-components/db-drivers/mysql.lisp

Parent

db-drivers (module)

Location

src/core/db/mysql.lisp

Packages

mito.db.mysql

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.21 mito-core/core-components/db-drivers/postgres.lisp

Parent

db-drivers (module)

Location

src/core/db/postgres.lisp

Packages

mito.db.postgres

Exported Definitions
Internal Definitions

get-serial-keys (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.22 mito-core/core-components/db-drivers/sqlite3.lisp

Parent

db-drivers (module)

Location

src/core/db/sqlite3.lisp

Packages

mito.db.sqlite3

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.23 mito-core/core-components/logger.lisp

Parent

core-components (module)

Location

src/core/logger.lisp

Packages

mito.logger

Exported Definitions
Internal Definitions

get-prev-stack (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.24 mito-core/core-components/error.lisp

Parent

core-components (module)

Location

src/core/error.lisp

Packages

mito.error

Exported Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.25 mito-core/core-components/util.lisp

Parent

core-components (module)

Location

src/core/util.lisp

Packages

mito.util

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 mito-asd

Source

mito.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 mito

Source

src/mito.lisp (file)

Use List

common-lisp


Next: , Previous: , Up: Packages   [Contents][Index]

5.3 mito-migration-asd

Source

mito-migration.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.4 mito.migration

Source

src/migration.lisp (file)

Use List

common-lisp


Next: , Previous: , Up: Packages   [Contents][Index]

5.5 mito.migration.table

Source

table.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.6 mito.migration.versions

Source

versions.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.7 mito.migration.sxql

Extansions of SxQL for Mito.Migration

Source

sxql.lisp (file)

Use List

common-lisp

Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.8 mito.core

Source

src/core.lisp (file)

Use List

common-lisp


Next: , Previous: , Up: Packages   [Contents][Index]

5.9 mito.dao

Source

dao.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.10 mito.dao.table

Source

table.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.11 mito.dao.mixin

Source

mixin.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.12 mito.dao.column

Source

column.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.13 mito.class

Source

class.lisp (file)

Use List
Used By List

mito.dao

Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.14 mito.class.table

Source

table.lisp (file)

Use List
Used By List

mito.class

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.15 mito.class.column

Source

column.lisp (file)

Use List
Used By List

mito.class

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.16 mito.connection

Source

connection.lisp (file)

Use List
Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.17 mito.type

Source

type.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.18 mito.db

Source

db.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.19 mito.db.mysql

Source

mysql.lisp (file)

Use List
Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.20 mito.db.postgres

Source

postgres.lisp (file)

Use List
Exported Definitions
Internal Definitions

get-serial-keys (function)


Next: , Previous: , Up: Packages   [Contents][Index]

5.21 mito.db.sqlite3

Source

sqlite3.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.22 mito.logger

Source

logger.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

get-prev-stack (function)


Next: , Previous: , Up: Packages   [Contents][Index]

5.23 mito.error

Source

error.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions

Previous: , Up: Packages   [Contents][Index]

5.24 mito.util

Source

util.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *auto-migration-mode*
Package

mito.migration.table

Source

table.lisp (file)

Special Variable: *connection*
Package

mito.connection

Source

connection.lisp (file)

Special Variable: *mito-logger-stream*
Package

mito.logger

Source

logger.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Macros

Macro: select-dao CLASS &body CLAUSES
Package

mito.dao

Source

dao.lisp (file)

Macro: with-quote-char &body BODY
Package

mito.connection

Source

connection.lisp (file)

Macro: with-sql-logging &body BODY
Package

mito.logger

Source

logger.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Functions

Function: all-migration-expressions ()
Package

mito.migration.versions

Source

versions.lisp (file)

Function: check-connected ()
Package

mito.connection

Source

connection.lisp (file)

Function: column-definitions CONN TABLE-NAME
Package

mito.db

Source

db.lisp (file)

Function: column-definitions CONN TABLE-NAME
Package

mito.db.mysql

Source

mysql.lisp (file)

Function: column-definitions CONN TABLE-NAME
Package

mito.db.postgres

Source

postgres.lisp (file)

Function: column-definitions CONN TABLE-NAME
Package

mito.db.sqlite3

Source

sqlite3.lisp (file)

Function: connect-toplevel DRIVER-NAME &rest ARGS &key DATABASE-NAME &allow-other-keys
Package

mito.connection

Source

connection.lisp (file)

Function: connected-p ()
Package

mito.connection

Source

connection.lisp (file)

Function: connection-quote-character CONN
Package

mito.connection

Source

connection.lisp (file)

Function: contains-class-or-subclasses CLASS TARGET-CLASSES
Package

mito.util

Source

util.lisp (file)

Function: count-dao CLASS &rest FIELDS-AND-VALUES
Package

mito.dao

Source

dao.lisp (file)

Function: current-migration-version ()
Package

mito.migration.versions

Source

versions.lisp (file)

Function: depending-table-classes CLASS
Package

mito.dao.table

Source

table.lisp (file)

Function: disconnect-toplevel ()
Package

mito.connection

Source

connection.lisp (file)

Function: driver-type &optional CONN
Package

mito.connection

Source

connection.lisp (file)

Function: ensure-class CLASS-OR-CLASS-NAME
Package

mito.util

Source

util.lisp (file)

Function: ensure-table-exists CLASS
Package

mito.dao

Source

dao.lisp (file)

Function: find-child-columns TABLE SLOT
Package

mito.class.table

Source

table.lisp (file)

Function: find-dao CLASS &rest FIELDS-AND-VALUES
Package

mito.dao

Source

dao.lisp (file)

Function: find-parent-column TABLE SLOT
Package

mito.class.table

Source

table.lisp (file)

Function: find-slot-by-name CLASS SLOT-NAME &key TEST
Package

mito.class.table

Source

table.lisp (file)

Function: generate-migrations DIRECTORY
Package

mito.migration.versions

Source

versions.lisp (file)

Function: get-column-real-type CONN NAME
Package

mito.type

Source

type.lisp (file)

Function: group-by-plist PLISTS &key KEY TEST
Package

mito.util

Source

util.lisp (file)

Function: include-foreign-objects FOREIGN-CLASS RECORDS
Package

mito.dao

Source

dao.lisp (file)

Function: last-insert-id CONN TABLE-NAME SERIAL-KEY-NAME
Package

mito.db

Source

db.lisp (file)

Function: last-insert-id CONN TABLE-NAME SERIAL-KEY-NAME
Package

mito.db.mysql

Source

mysql.lisp (file)

Function: last-insert-id CONN TABLE-NAME SERIAL-KEY-NAME
Package

mito.db.postgres

Source

postgres.lisp (file)

Function: last-insert-id CONN TABLE-NAME
Package

mito.db.sqlite3

Source

sqlite3.lisp (file)

Function: lispify OBJECT
Package

mito.util

Source

util.lisp (file)

Function: list-diff A B &key SORT-KEY SORT-KEY-A SORT-KEY-B SORT-FN KEY TEST

Compute differences two lists.
Note this can be applied for a list of string-designators.

Package

mito.util

Source

util.lisp (file)

Function: make-dao-instance CLASS &rest INITARGS
Package

mito.dao.table

Source

table.lisp (file)

Function: migrate DIRECTORY &key DRY-RUN
Package

mito.migration.versions

Source

versions.lisp (file)

Function: migration-expressions CLASS &optional DRIVER-TYPE
Package

mito.migration.table

Source

table.lisp (file)

Function: (setf object-id) ID OBJECT
Package

mito.dao.mixin

Source

mixin.lisp (file)

Reader

object-id (generic function)

Function: parse-dbtype DBTYPE
Package

mito.type

Source

type.lisp (file)

Function: recreate-table CLASS
Package

mito.dao

Source

dao.lisp (file)

Function: retrieve-dao CLASS &rest FIELDS-AND-VALUES
Package

mito.dao

Source

dao.lisp (file)

Function: symbol-name-literally SYMBOL
Package

mito.util

Source

util.lisp (file)

Function: table-column-slots CLASS
Package

mito.class.table

Source

table.lisp (file)

Function: table-definition CLASS &key IF-NOT-EXISTS
Package

mito.dao.table

Source

table.lisp (file)

Function: table-direct-column-slots CLASS
Package

mito.class.table

Source

table.lisp (file)

Function: table-exists-p CONN TABLE-NAME
Package

mito.db

Source

db.lisp (file)

Function: table-indices CONN TABLE-NAME
Package

mito.db

Source

db.lisp (file)

Function: table-indices CONN TABLE-NAME
Package

mito.db.mysql

Source

mysql.lisp (file)

Function: table-indices CONN TABLE-NAME
Package

mito.db.postgres

Source

postgres.lisp (file)

Function: table-indices CONN TABLE-NAME
Package

mito.db.sqlite3

Source

sqlite3.lisp (file)

Function: trace-sql SQL PARAMS &optional RESULTS
Package

mito.logger

Source

logger.lisp (file)

Function: unlispify OBJECT
Package

mito.util

Source

util.lisp (file)

Function: update-migration-version VERSION
Package

mito.migration.versions

Source

versions.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Generic functions

Generic Function: create-dao CLASS &rest INITARGS
Package

mito.dao

Source

dao.lisp (file)

Methods
Method: create-dao (CLASS-NAME symbol) &rest INITARGS
Method: create-dao (CLASS dao-table-class) &rest INITARGS
Generic Function: create-table-sxql CLASS DRIVER-TYPE &key IF-NOT-EXISTS
Package

mito.class

Source

class.lisp (file)

Methods
Method: create-table-sxql CLASS DRIVER-TYPE &key IF-NOT-EXISTS
Generic Function: dao-synced OBJECT
Generic Function: (setf dao-synced) NEW-VALUE OBJECT
Package

mito.dao.table

Methods
Method: dao-synced (DAO-CLASS dao-class)

automatically generated reader method

Source

table.lisp (file)

Method: (setf dao-synced) NEW-VALUE (DAO-CLASS dao-class)

automatically generated writer method

Source

table.lisp (file)

Generic Function: dao-table-column-deflate COLUMN VALUE
Package

mito.dao.column

Source

column.lisp (file)

Methods
Method: dao-table-column-deflate (COLUMN dao-table-column-class) VALUE
Generic Function: dao-table-column-inflate COLUMN VALUE
Package

mito.dao.column

Source

column.lisp (file)

Methods
Method: dao-table-column-inflate (COLUMN dao-table-column-class) VALUE
Generic Function: database-column-slots CLASS
Package

mito.class.table

Source

table.lisp (file)

Methods
Method: database-column-slots (CLASS table-class)
Generic Function: deflate-for-col-type COL-TYPE VALUE
Package

mito.dao.column

Source

column.lisp (file)

Methods
Method: deflate-for-col-type COL-TYPE VALUE
Method: deflate-for-col-type (COL-TYPE cons) VALUE
Method: deflate-for-col-type (COL-TYPE (eql datetime)) VALUE
Method: deflate-for-col-type (COL-TYPE (eql date)) VALUE
Method: deflate-for-col-type (COL-TYPE (eql timestamp)) VALUE
Method: deflate-for-col-type (COL-TYPE (eql timestamptz)) VALUE
Method: deflate-for-col-type (COL-TYPE (eql boolean)) VALUE
Generic Function: delete-by-values CLASS &rest FIELDS-AND-VALUES
Package

mito.dao

Source

dao.lisp (file)

Methods
Method: delete-by-values (CLASS symbol) &rest FIELDS-AND-VALUES
Method: delete-by-values (CLASS dao-table-class) &rest FIELDS-AND-VALUES
Generic Function: delete-dao OBJ
Package

mito.dao

Source

dao.lisp (file)

Methods
Method: delete-dao (OBJ dao-class)
Generic Function: execute-sql SQL &optional BINDS
Package

mito.db

Source

db.lisp (file)

Methods
Method: execute-sql SQL &optional BINDS before
Method: execute-sql (SQL string) &optional BINDS
Method: execute-sql (SQL sql-statement) &optional BINDS
Generic Function: ghost-slot-p OBJECT
Generic Function: (setf ghost-slot-p) NEW-VALUE OBJECT
Package

mito.class.column

Methods
Method: ghost-slot-p (TABLE-COLUMN-CLASS table-column-class)
Method: (setf ghost-slot-p) NEW-VALUE (TABLE-COLUMN-CLASS table-column-class)

Option to specify slots as ghost slots. Ghost slots do not depend on a database.

Source

column.lisp (file)

Generic Function: inflate-for-col-type COL-TYPE VALUE
Package

mito.dao.column

Source

column.lisp (file)

Methods
Method: inflate-for-col-type COL-TYPE VALUE
Method: inflate-for-col-type (COL-TYPE cons) VALUE
Method: inflate-for-col-type (COL-TYPE (eql datetime)) VALUE
Method: inflate-for-col-type (COL-TYPE (eql date)) VALUE
Method: inflate-for-col-type (COL-TYPE (eql timestamp)) VALUE
Method: inflate-for-col-type (COL-TYPE (eql timestamptz)) VALUE
Method: inflate-for-col-type (COL-TYPE (eql time)) VALUE
Method: inflate-for-col-type (COL-TYPE (eql boolean)) VALUE
Generic Function: insert-dao OBJ
Package

mito.dao

Source

dao.lisp (file)

Methods
Method: insert-dao (OBJ dao-class)
Method: insert-dao (OBJ record-timestamps-mixin) before
Generic Function: migrate-table CLASS
Package

mito.migration.table

Source

table.lisp (file)

Methods
Method: migrate-table (CLASS symbol)
Method: migrate-table (CLASS dao-table-class)
Generic Function: object-created-at OBJECT
Generic Function: (setf object-created-at) NEW-VALUE OBJECT
Package

mito.dao.mixin

Methods
Method: object-created-at (RECORD-TIMESTAMPS-MIXIN record-timestamps-mixin)

automatically generated reader method

Source

mixin.lisp (file)

Method: (setf object-created-at) NEW-VALUE (RECORD-TIMESTAMPS-MIXIN record-timestamps-mixin)

automatically generated writer method

Source

mixin.lisp (file)

Generic Function: object-id OBJECT
Package

mito.dao.mixin

Source

mixin.lisp (file)

Writer

(setf object-id) (function)

Methods
Method: object-id (OBJECT auto-pk-mixin)
Generic Function: object-updated-at OBJECT
Generic Function: (setf object-updated-at) NEW-VALUE OBJECT
Package

mito.dao.mixin

Methods
Method: object-updated-at (RECORD-TIMESTAMPS-MIXIN record-timestamps-mixin)

automatically generated reader method

Source

mixin.lisp (file)

Method: (setf object-updated-at) NEW-VALUE (RECORD-TIMESTAMPS-MIXIN record-timestamps-mixin)

automatically generated writer method

Source

mixin.lisp (file)

Generic Function: object= OBJECT1 OBJECT2
Package

mito.dao.mixin

Source

mixin.lisp (file)

Methods
Method: object= (OBJECT1 auto-pk-mixin) (OBJECT2 auto-pk-mixin)
Generic Function: primary-key-p OBJECT
Generic Function: (setf primary-key-p) NEW-VALUE OBJECT
Package

mito.class.column

Methods
Method: primary-key-p (TABLE-COLUMN-CLASS table-column-class)

automatically generated reader method

Source

column.lisp (file)

Method: (setf primary-key-p) NEW-VALUE (TABLE-COLUMN-CLASS table-column-class)

automatically generated writer method

Source

column.lisp (file)

Generic Function: retrieve-by-sql SQL &key BINDS
Package

mito.db

Source

db.lisp (file)

Methods
Method: retrieve-by-sql SQL &key BINDS before
Method: retrieve-by-sql (SQL string) &key BINDS
Method: retrieve-by-sql (SQL sql-statement) &key BINDS
Generic Function: save-dao OBJ
Package

mito.dao

Source

dao.lisp (file)

Methods
Method: save-dao (OBJ dao-class)
Generic Function: table-column-info COLUMN DRIVER-TYPE
Package

mito.class.column

Source

column.lisp (file)

Methods
Method: table-column-info COLUMN (DRIVER-TYPE (eql sqlite3))
Method: table-column-info COLUMN (DRIVER-TYPE (eql mysql))
Method: table-column-info COLUMN (DRIVER-TYPE (eql postgres))
Method: table-column-info COLUMN DRIVER-TYPE around
Generic Function: table-column-info-for-create-table COLUMN DRIVER-TYPE

Similar to table-column-info except the return value is for sxql:make-create-table.

Package

mito.class.column

Source

column.lisp (file)

Methods
Method: table-column-info-for-create-table COLUMN DRIVER-TYPE
Method: table-column-info-for-create-table COLUMN DRIVER-TYPE around
Method: table-column-info-for-create-table COLUMN (DRIVER-TYPE (eql mysql))
Method: table-column-info-for-create-table COLUMN (DRIVER-TYPE (eql sqlite3))
Method: table-column-info-for-create-table COLUMN (DRIVER-TYPE (eql postgres))
Generic Function: table-column-name COLUMN
Package

mito.class.column

Source

column.lisp (file)

Methods
Method: table-column-name (COLUMN table-column-class)
Generic Function: table-column-not-null-p COLUMN
Package

mito.class.column

Source

column.lisp (file)

Methods
Method: table-column-not-null-p (COLUMN table-column-class)
Generic Function: table-column-references OBJECT
Package

mito.class.column

Methods
Method: table-column-references (TABLE-COLUMN-CLASS table-column-class)

automatically generated reader method

Source

column.lisp (file)

Generic Function: table-column-references-column COLUMN
Package

mito.class.column

Source

column.lisp (file)

Methods
Method: table-column-references-column (COLUMN table-column-class)
Source

class.lisp (file)

Generic Function: table-column-type COLUMN
Package

mito.class.column

Source

column.lisp (file)

Methods
Method: table-column-type (COLUMN table-column-class)
Generic Function: table-indices-info CLASS DRIVER-TYPE
Package

mito.class.table

Source

table.lisp (file)

Methods
Method: table-indices-info CLASS DRIVER-TYPE
Generic Function: table-name CLASS
Package

mito.class.table

Source

table.lisp (file)

Methods
Method: table-name (CLASS table-class)
Generic Function: table-primary-key CLASS
Package

mito.class.table

Source

table.lisp (file)

Methods
Method: table-primary-key (CLASS table-class)
Generic Function: table-serial-key CLASS
Package

mito.class.table

Source

table.lisp (file)

Methods
Method: table-serial-key (CLASS table-class)
Generic Function: update-dao OBJ
Package

mito.dao

Source

dao.lisp (file)

Methods
Method: update-dao (OBJ dao-class)
Method: update-dao (OBJ record-timestamps-mixin) before

Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.5 Conditions

Condition: col-type-required ()
Package

mito.error

Source

error.lisp (file)

Direct superclasses

invalid-definition (condition)

Direct slots
Slot: slot
Initargs

:slot

Condition: connection-not-established ()
Package

mito.error

Source

error.lisp (file)

Direct superclasses

mito-error (condition)

Condition: invalid-definition ()
Package

mito.error

Source

error.lisp (file)

Direct superclasses

mito-error (condition)

Direct subclasses

col-type-required (condition)

Condition: mito-error ()
Package

mito.error

Source

error.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Condition: no-primary-keys ()
Package

mito.error

Source

error.lisp (file)

Direct superclasses

mito-error (condition)

Direct slots
Slot: table
Initargs

:table


Previous: , Up: Exported definitions   [Contents][Index]

6.1.6 Classes

Class: auto-pk-mixin ()
Package

mito.dao.mixin

Source

mixin.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: id
Initargs

:id

Readers

%object-id (generic function)

Writers

(setf %object-id) (generic function)

Class: dao-class ()
Package

mito.dao.table

Source

table.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: synced
Type

boolean

Readers

dao-synced (generic function)

Writers

(setf dao-synced) (generic function)

Class: dao-table-class ()
Package

mito.dao.table

Source

table.lisp (file)

Direct superclasses

table-class (class)

Direct methods
  • reinitialize-instance (method)
  • initialize-instance (method)
  • migrate-table (method)
  • delete-by-values (method)
  • create-dao (method)
  • ensure-class-using-class (method)
  • reinitialize-instance (method)
  • initialize-instance (method)
  • direct-slot-definition-class (method)
Direct slots
Slot: auto-pk
Initargs

:auto-pk

Initform

(quote (t))

Slot: record-timestamps
Initargs

:record-timestamps

Initform

(quote (t))

Class: dao-table-column-class ()
Package

mito.dao.column

Source

column.lisp (file)

Direct superclasses

table-column-class (class)

Direct methods
Direct slots
Slot: inflate
Type

(or function null)

Initargs

:inflate

Slot: deflate
Type

(or function null)

Initargs

:deflate

Class: dao-table-mixin ()
Package

mito.dao.mixin

Source

mixin.lisp (file)

Direct superclasses

table-class (class)

Direct methods

direct-slot-definition-class (method)

Class: record-timestamps-mixin ()
Package

mito.dao.mixin

Source

mixin.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: created-at
Initargs

:created-at

Readers

object-created-at (generic function)

Writers

(setf object-created-at) (generic function)

Slot: updated-at
Initargs

:updated-at

Readers

object-updated-at (generic function)

Writers

(setf object-updated-at) (generic function)

Class: table-class ()
Package

mito.class.table

Source

table.lisp (file)

Direct superclasses

standard-class (class)

Direct subclasses
Direct methods
Direct slots
Slot: primary-key
Initargs

:primary-key

Slot: unique-keys
Initargs

:unique-keys

Slot: keys
Initargs

:keys

Slot: table-name
Initargs

:table-name

Slot: parent-column-map
Class: table-column-class ()
Package

mito.class.column

Source

column.lisp (file)

Direct superclasses

standard-direct-slot-definition (class)

Direct subclasses

dao-table-column-class (class)

Direct methods
Direct slots
Slot: col-type
Type

(or symbol cons null)

Initargs

:col-type

Readers

%table-column-type (generic function)

Writers

(setf %table-column-type) (generic function)

Slot: references
Type

mito.class.column::references

Initargs

:references

Readers

table-column-references (generic function)

Slot: primary-key
Type

boolean

Initargs

:primary-key

Readers

primary-key-p (generic function)

Writers

(setf primary-key-p) (generic function)

Slot: ghost

Option to specify slots as ghost slots. Ghost slots do not depend on a database.

Type

boolean

Initargs

:ghost

Readers

ghost-slot-p (generic function)

Writers

(setf ghost-slot-p) (generic function)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *db-date-format*
Package

mito.dao.column

Source

column.lisp (file)

Special Variable: *db-datetime-format*
Package

mito.dao.column

Source

column.lisp (file)

Special Variable: *real-type-cache*
Package

mito.type

Source

type.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: %list-diff A B &key KEY TEST
Package

mito.util

Source

util.lisp (file)

Function: add-referencing-slots INITARGS
Package

mito.class.table

Source

table.lisp (file)

Function: add-relational-readers CLASS INITARGS
Package

mito.dao.table

Source

table.lisp (file)

Function: all-dao-classes ()
Package

mito.migration.versions

Source

versions.lisp (file)

Function: array-convert-nulls-to-nils RESULTS-ARRAY
Package

mito.db

Source

db.lisp (file)

Function: check-col-type COL-TYPE
Package

mito.dao.table

Source

table.lisp (file)

Function: child-columns COLUMN CLASS
Package

mito.dao

Source

dao.lisp (file)

Function: copy-create-sequence INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: copy-drop-sequence INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: copy-set-default INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: create-sequence-name INSTANCE
Function: (setf create-sequence-name) VALUE INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: create-sequence-p OBJECT
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: create-sequence-sequence-name INSTANCE
Function: (setf create-sequence-sequence-name) VALUE INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: drop-sequence-if-exists INSTANCE
Function: (setf drop-sequence-if-exists) VALUE INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: drop-sequence-name INSTANCE
Function: (setf drop-sequence-name) VALUE INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: drop-sequence-p OBJECT
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: drop-sequence-sequence-name INSTANCE
Function: (setf drop-sequence-sequence-name) VALUE INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: escaped-symbol-p SYMBOL
Package

mito.util

Source

util.lisp (file)

Function: expand-op OBJECT CLASS

Expand relational columns if the operator is :=, :!= , :in or :not-in.

Package

mito.dao

Source

dao.lisp (file)

Function: expand-relational-keys CLASS SLOT-NAME
Package

mito.class.table

Source

table.lisp (file)

Function: foreign-value OBJ SLOT
Package

mito.dao

Source

dao.lisp (file)

Function: generate-version ()
Package

mito.migration.versions

Source

versions.lisp (file)

Function: get-prev-stack ()
Package

mito.logger

Source

logger.lisp (file)

Function: get-serial-keys CONN TABLE-NAME
Package

mito.db.postgres

Source

postgres.lisp (file)

Function: initargs-contains-primary-key INITARGS
Package

mito.dao.table

Source

table.lisp (file)

Function: initargs-enables-auto-pk INITARGS
Package

mito.dao.table

Source

table.lisp (file)

Function: initargs-enables-record-timestamps INITARGS
Package

mito.dao.table

Source

table.lisp (file)

Function: initialize-migrations-table ()
Package

mito.migration.versions

Source

versions.lisp (file)

Function: list-convert-nulls-to-nils RESULTS-LIST
Package

mito.db

Source

db.lisp (file)

Function: make-create-sequence SEQUENCE-NAME
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: make-drop-sequence SEQUENCE-NAME &key IF-EXISTS
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: make-relational-reader-method FUNC-NAME CLASS SLOT-NAME REL-CLASS
Package

mito.dao.table

Source

table.lisp (file)

Function: make-set-clause OBJ
Package

mito.dao

Source

dao.lisp (file)

Function: make-set-default EXPRESSION
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: map-all-superclasses FN CLASS &key KEY
Package

mito.class.table

Source

table.lisp (file)

Function: migration-expressions-for-others CLASS DRIVER-TYPE
Package

mito.migration.table

Source

table.lisp (file)

Function: migration-expressions-for-sqlite3 CLASS
Package

mito.migration.table

Source

table.lisp (file)

Function: migration-file-version FILE
Package

mito.migration.versions

Source

versions.lisp (file)

Function: parse-col-type COL-TYPE
Package

mito.class.column

Source

column.lisp (file)

Function: parse-type-vars VARS
Package

mito.type

Source

type.lisp (file)

Function: read-one-sql STREAM
Package

mito.migration.versions

Source

versions.lisp (file)

Function: rel-column-name NAME PK-NAME
Package

mito.class.table

Source

table.lisp (file)

Function: schema-migrations-table-definition ()
Package

mito.migration.versions

Source

versions.lisp (file)

Function: select-by-sql CLASS SQL
Package

mito.dao

Source

dao.lisp (file)

Function: set-default-expression INSTANCE
Function: (setf set-default-expression) VALUE INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: set-default-name INSTANCE
Function: (setf set-default-name) VALUE INSTANCE
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: set-default-p OBJECT
Package

mito.migration.sxql

Source

sxql.lisp (file)

Function: slot-foreign-value OBJECT CLASS SLOT-NAME
Package

mito.dao

Source

dao.lisp (file)

Function: table-info CONN TABLE-NAME
Package

mito.db.sqlite3

Source

sqlite3.lisp (file)

Function: table-primary-keys CONN TABLE-NAME
Package

mito.db.sqlite3

Source

sqlite3.lisp (file)

Function: where-and FIELDS-AND-VALUES CLASS
Package

mito.dao

Source

dao.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Generic functions

Generic Function: %object-id OBJECT
Generic Function: (setf %object-id) NEW-VALUE OBJECT
Package

mito.dao.mixin

Methods
Method: %object-id (AUTO-PK-MIXIN auto-pk-mixin)

automatically generated reader method

Source

mixin.lisp (file)

Method: (setf %object-id) NEW-VALUE (AUTO-PK-MIXIN auto-pk-mixin)

automatically generated writer method

Source

mixin.lisp (file)

Generic Function: %table-column-type OBJECT
Generic Function: (setf %table-column-type) NEW-VALUE OBJECT
Package

mito.class.column

Methods
Method: %table-column-type (TABLE-COLUMN-CLASS table-column-class)

automatically generated reader method

Source

column.lisp (file)

Method: (setf %table-column-type) NEW-VALUE (TABLE-COLUMN-CLASS table-column-class)

automatically generated writer method

Source

column.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Structures

Structure: create-sequence ()
Package

mito.migration.sxql

Source

sxql.lisp (file)

Direct superclasses

sql-statement (structure)

Direct methods

yield (method)

Direct slots
Slot: name
Type

string

Initform

"create sequence"

Readers

create-sequence-name (function)

Writers

(setf create-sequence-name) (function)

Slot: sequence-name
Readers

create-sequence-sequence-name (function)

Writers

(setf create-sequence-sequence-name) (function)

Structure: drop-sequence ()
Package

mito.migration.sxql

Source

sxql.lisp (file)

Direct superclasses

sql-statement (structure)

Direct methods

yield (method)

Direct slots
Slot: name
Type

string

Initform

"drop sequence"

Readers

drop-sequence-name (function)

Writers

(setf drop-sequence-name) (function)

Slot: sequence-name
Readers

drop-sequence-sequence-name (function)

Writers

(setf drop-sequence-sequence-name) (function)

Slot: if-exists
Readers

drop-sequence-if-exists (function)

Writers

(setf drop-sequence-if-exists) (function)

Structure: set-default ()
Package

mito.migration.sxql

Source

sxql.lisp (file)

Direct superclasses

expression-clause (structure)

Direct slots
Slot: name
Type

string

Initform

"set default"

Readers

set-default-name (function)

Writers

(setf set-default-name) (function)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Types

Type: references ()
Package

mito.class.column

Source

column.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M  
Index Entry  Section

F
File, Lisp, mito-core.asd: The mito-core<dot>asd file
File, Lisp, mito-core/core-components/class-components/column.lisp: The mito-core/core-components/class-components/column<dot>lisp file
File, Lisp, mito-core/core-components/class-components/table.lisp: The mito-core/core-components/class-components/table<dot>lisp file
File, Lisp, mito-core/core-components/class.lisp: The mito-core/core-components/class<dot>lisp file
File, Lisp, mito-core/core-components/connection.lisp: The mito-core/core-components/connection<dot>lisp file
File, Lisp, mito-core/core-components/dao-components/column.lisp: The mito-core/core-components/dao-components/column<dot>lisp file
File, Lisp, mito-core/core-components/dao-components/mixin.lisp: The mito-core/core-components/dao-components/mixin<dot>lisp file
File, Lisp, mito-core/core-components/dao-components/table.lisp: The mito-core/core-components/dao-components/table<dot>lisp file
File, Lisp, mito-core/core-components/dao.lisp: The mito-core/core-components/dao<dot>lisp file
File, Lisp, mito-core/core-components/db-drivers/mysql.lisp: The mito-core/core-components/db-drivers/mysql<dot>lisp file
File, Lisp, mito-core/core-components/db-drivers/postgres.lisp: The mito-core/core-components/db-drivers/postgres<dot>lisp file
File, Lisp, mito-core/core-components/db-drivers/sqlite3.lisp: The mito-core/core-components/db-drivers/sqlite3<dot>lisp file
File, Lisp, mito-core/core-components/db.lisp: The mito-core/core-components/db<dot>lisp file
File, Lisp, mito-core/core-components/error.lisp: The mito-core/core-components/error<dot>lisp file
File, Lisp, mito-core/core-components/logger.lisp: The mito-core/core-components/logger<dot>lisp file
File, Lisp, mito-core/core-components/type.lisp: The mito-core/core-components/type<dot>lisp file
File, Lisp, mito-core/core-components/util.lisp: The mito-core/core-components/util<dot>lisp file
File, Lisp, mito-core/src/core.lisp: The mito-core/src/core<dot>lisp file
File, Lisp, mito-migration.asd: The mito-migration<dot>asd file
File, Lisp, mito-migration/migration-components/sxql.lisp: The mito-migration/migration-components/sxql<dot>lisp file
File, Lisp, mito-migration/migration-components/table.lisp: The mito-migration/migration-components/table<dot>lisp file
File, Lisp, mito-migration/migration-components/versions.lisp: The mito-migration/migration-components/versions<dot>lisp file
File, Lisp, mito-migration/src/migration.lisp: The mito-migration/src/migration<dot>lisp file
File, Lisp, mito.asd: The mito<dot>asd file
File, Lisp, mito/src/mito.lisp: The mito/src/mito<dot>lisp file

L
Lisp File, mito-core.asd: The mito-core<dot>asd file
Lisp File, mito-core/core-components/class-components/column.lisp: The mito-core/core-components/class-components/column<dot>lisp file
Lisp File, mito-core/core-components/class-components/table.lisp: The mito-core/core-components/class-components/table<dot>lisp file
Lisp File, mito-core/core-components/class.lisp: The mito-core/core-components/class<dot>lisp file
Lisp File, mito-core/core-components/connection.lisp: The mito-core/core-components/connection<dot>lisp file
Lisp File, mito-core/core-components/dao-components/column.lisp: The mito-core/core-components/dao-components/column<dot>lisp file
Lisp File, mito-core/core-components/dao-components/mixin.lisp: The mito-core/core-components/dao-components/mixin<dot>lisp file
Lisp File, mito-core/core-components/dao-components/table.lisp: The mito-core/core-components/dao-components/table<dot>lisp file
Lisp File, mito-core/core-components/dao.lisp: The mito-core/core-components/dao<dot>lisp file
Lisp File, mito-core/core-components/db-drivers/mysql.lisp: The mito-core/core-components/db-drivers/mysql<dot>lisp file
Lisp File, mito-core/core-components/db-drivers/postgres.lisp: The mito-core/core-components/db-drivers/postgres<dot>lisp file
Lisp File, mito-core/core-components/db-drivers/sqlite3.lisp: The mito-core/core-components/db-drivers/sqlite3<dot>lisp file
Lisp File, mito-core/core-components/db.lisp: The mito-core/core-components/db<dot>lisp file
Lisp File, mito-core/core-components/error.lisp: The mito-core/core-components/error<dot>lisp file
Lisp File, mito-core/core-components/logger.lisp: The mito-core/core-components/logger<dot>lisp file
Lisp File, mito-core/core-components/type.lisp: The mito-core/core-components/type<dot>lisp file
Lisp File, mito-core/core-components/util.lisp: The mito-core/core-components/util<dot>lisp file
Lisp File, mito-core/src/core.lisp: The mito-core/src/core<dot>lisp file
Lisp File, mito-migration.asd: The mito-migration<dot>asd file
Lisp File, mito-migration/migration-components/sxql.lisp: The mito-migration/migration-components/sxql<dot>lisp file
Lisp File, mito-migration/migration-components/table.lisp: The mito-migration/migration-components/table<dot>lisp file
Lisp File, mito-migration/migration-components/versions.lisp: The mito-migration/migration-components/versions<dot>lisp file
Lisp File, mito-migration/src/migration.lisp: The mito-migration/src/migration<dot>lisp file
Lisp File, mito.asd: The mito<dot>asd file
Lisp File, mito/src/mito.lisp: The mito/src/mito<dot>lisp file

M
mito-core.asd: The mito-core<dot>asd file
mito-core/core-components: The mito-core/core-components module
mito-core/core-components/class-components: The mito-core/core-components/class-components module
mito-core/core-components/class-components/column.lisp: The mito-core/core-components/class-components/column<dot>lisp file
mito-core/core-components/class-components/table.lisp: The mito-core/core-components/class-components/table<dot>lisp file
mito-core/core-components/class.lisp: The mito-core/core-components/class<dot>lisp file
mito-core/core-components/connection.lisp: The mito-core/core-components/connection<dot>lisp file
mito-core/core-components/dao-components: The mito-core/core-components/dao-components module
mito-core/core-components/dao-components/column.lisp: The mito-core/core-components/dao-components/column<dot>lisp file
mito-core/core-components/dao-components/mixin.lisp: The mito-core/core-components/dao-components/mixin<dot>lisp file
mito-core/core-components/dao-components/table.lisp: The mito-core/core-components/dao-components/table<dot>lisp file
mito-core/core-components/dao.lisp: The mito-core/core-components/dao<dot>lisp file
mito-core/core-components/db-drivers: The mito-core/core-components/db-drivers module
mito-core/core-components/db-drivers/mysql.lisp: The mito-core/core-components/db-drivers/mysql<dot>lisp file
mito-core/core-components/db-drivers/postgres.lisp: The mito-core/core-components/db-drivers/postgres<dot>lisp file
mito-core/core-components/db-drivers/sqlite3.lisp: The mito-core/core-components/db-drivers/sqlite3<dot>lisp file
mito-core/core-components/db.lisp: The mito-core/core-components/db<dot>lisp file
mito-core/core-components/error.lisp: The mito-core/core-components/error<dot>lisp file
mito-core/core-components/logger.lisp: The mito-core/core-components/logger<dot>lisp file
mito-core/core-components/type.lisp: The mito-core/core-components/type<dot>lisp file
mito-core/core-components/util.lisp: The mito-core/core-components/util<dot>lisp file
mito-core/src/core.lisp: The mito-core/src/core<dot>lisp file
mito-migration.asd: The mito-migration<dot>asd file
mito-migration/migration-components: The mito-migration/migration-components module
mito-migration/migration-components/sxql.lisp: The mito-migration/migration-components/sxql<dot>lisp file
mito-migration/migration-components/table.lisp: The mito-migration/migration-components/table<dot>lisp file
mito-migration/migration-components/versions.lisp: The mito-migration/migration-components/versions<dot>lisp file
mito-migration/src/migration.lisp: The mito-migration/src/migration<dot>lisp file
mito.asd: The mito<dot>asd file
mito/src/mito.lisp: The mito/src/mito<dot>lisp file
Module, mito-core/core-components: The mito-core/core-components module
Module, mito-core/core-components/class-components: The mito-core/core-components/class-components module
Module, mito-core/core-components/dao-components: The mito-core/core-components/dao-components module
Module, mito-core/core-components/db-drivers: The mito-core/core-components/db-drivers module
Module, mito-migration/migration-components: The mito-migration/migration-components module

Jump to:   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
A   C   D   E   F   G   I   L   M   O   P   R   S   T   U   W  
Index Entry  Section

%
%list-diff: Internal functions
%object-id: Internal generic functions
%object-id: Internal generic functions
%table-column-type: Internal generic functions
%table-column-type: Internal generic functions

(
(setf %object-id): Internal generic functions
(setf %object-id): Internal generic functions
(setf %table-column-type): Internal generic functions
(setf %table-column-type): Internal generic functions
(setf create-sequence-name): Internal functions
(setf create-sequence-sequence-name): Internal functions
(setf dao-synced): Exported generic functions
(setf dao-synced): Exported generic functions
(setf drop-sequence-if-exists): Internal functions
(setf drop-sequence-name): Internal functions
(setf drop-sequence-sequence-name): Internal functions
(setf ghost-slot-p): Exported generic functions
(setf ghost-slot-p): Exported generic functions
(setf object-created-at): Exported generic functions
(setf object-created-at): Exported generic functions
(setf object-id): Exported functions
(setf object-updated-at): Exported generic functions
(setf object-updated-at): Exported generic functions
(setf primary-key-p): Exported generic functions
(setf primary-key-p): Exported generic functions
(setf set-default-expression): Internal functions
(setf set-default-name): Internal functions

A
add-referencing-slots: Internal functions
add-relational-readers: Internal functions
all-dao-classes: Internal functions
all-migration-expressions: Exported functions
array-convert-nulls-to-nils: Internal functions

C
check-col-type: Internal functions
check-connected: Exported functions
child-columns: Internal functions
column-definitions: Exported functions
column-definitions: Exported functions
column-definitions: Exported functions
column-definitions: Exported functions
connect-toplevel: Exported functions
connected-p: Exported functions
connection-quote-character: Exported functions
contains-class-or-subclasses: Exported functions
copy-create-sequence: Internal functions
copy-drop-sequence: Internal functions
copy-set-default: Internal functions
count-dao: Exported functions
create-dao: Exported generic functions
create-dao: Exported generic functions
create-dao: Exported generic functions
create-sequence-name: Internal functions
create-sequence-p: Internal functions
create-sequence-sequence-name: Internal functions
create-table-sxql: Exported generic functions
create-table-sxql: Exported generic functions
current-migration-version: Exported functions

D
dao-synced: Exported generic functions
dao-synced: Exported generic functions
dao-table-column-deflate: Exported generic functions
dao-table-column-deflate: Exported generic functions
dao-table-column-inflate: Exported generic functions
dao-table-column-inflate: Exported generic functions
database-column-slots: Exported generic functions
database-column-slots: Exported generic functions
deflate-for-col-type: Exported generic functions
deflate-for-col-type: Exported generic functions
deflate-for-col-type: Exported generic functions
deflate-for-col-type: Exported generic functions
deflate-for-col-type: Exported generic functions
deflate-for-col-type: Exported generic functions
deflate-for-col-type: Exported generic functions
deflate-for-col-type: Exported generic functions
delete-by-values: Exported generic functions
delete-by-values: Exported generic functions
delete-by-values: Exported generic functions
delete-dao: Exported generic functions
delete-dao: Exported generic functions
depending-table-classes: Exported functions
disconnect-toplevel: Exported functions
driver-type: Exported functions
drop-sequence-if-exists: Internal functions
drop-sequence-name: Internal functions
drop-sequence-p: Internal functions
drop-sequence-sequence-name: Internal functions

E
ensure-class: Exported functions
ensure-table-exists: Exported functions
escaped-symbol-p: Internal functions
execute-sql: Exported generic functions
execute-sql: Exported generic functions
execute-sql: Exported generic functions
execute-sql: Exported generic functions
expand-op: Internal functions
expand-relational-keys: Internal functions

F
find-child-columns: Exported functions
find-dao: Exported functions
find-parent-column: Exported functions
find-slot-by-name: Exported functions
foreign-value: Internal functions
Function, %list-diff: Internal functions
Function, (setf create-sequence-name): Internal functions
Function, (setf create-sequence-sequence-name): Internal functions
Function, (setf drop-sequence-if-exists): Internal functions
Function, (setf drop-sequence-name): Internal functions
Function, (setf drop-sequence-sequence-name): Internal functions
Function, (setf object-id): Exported functions
Function, (setf set-default-expression): Internal functions
Function, (setf set-default-name): Internal functions
Function, add-referencing-slots: Internal functions
Function, add-relational-readers: Internal functions
Function, all-dao-classes: Internal functions
Function, all-migration-expressions: Exported functions
Function, array-convert-nulls-to-nils: Internal functions
Function, check-col-type: Internal functions
Function, check-connected: Exported functions
Function, child-columns: Internal functions
Function, column-definitions: Exported functions
Function, column-definitions: Exported functions
Function, column-definitions: Exported functions
Function, column-definitions: Exported functions
Function, connect-toplevel: Exported functions
Function, connected-p: Exported functions
Function, connection-quote-character: Exported functions
Function, contains-class-or-subclasses: Exported functions
Function, copy-create-sequence: Internal functions
Function, copy-drop-sequence: Internal functions
Function, copy-set-default: Internal functions
Function, count-dao: Exported functions
Function, create-sequence-name: Internal functions
Function, create-sequence-p: Internal functions
Function, create-sequence-sequence-name: Internal functions
Function, current-migration-version: Exported functions
Function, depending-table-classes: Exported functions
Function, disconnect-toplevel: Exported functions
Function, driver-type: Exported functions
Function, drop-sequence-if-exists: Internal functions
Function, drop-sequence-name: Internal functions
Function, drop-sequence-p: Internal functions
Function, drop-sequence-sequence-name: Internal functions
Function, ensure-class: Exported functions
Function, ensure-table-exists: Exported functions
Function, escaped-symbol-p: Internal functions
Function, expand-op: Internal functions
Function, expand-relational-keys: Internal functions
Function, find-child-columns: Exported functions
Function, find-dao: Exported functions
Function, find-parent-column: Exported functions
Function, find-slot-by-name: Exported functions
Function, foreign-value: Internal functions
Function, generate-migrations: Exported functions
Function, generate-version: Internal functions
Function, get-column-real-type: Exported functions
Function, get-prev-stack: Internal functions
Function, get-serial-keys: Internal functions
Function, group-by-plist: Exported functions
Function, include-foreign-objects: Exported functions
Function, initargs-contains-primary-key: Internal functions
Function, initargs-enables-auto-pk: Internal functions
Function, initargs-enables-record-timestamps: Internal functions
Function, initialize-migrations-table: Internal functions
Function, last-insert-id: Exported functions
Function, last-insert-id: Exported functions
Function, last-insert-id: Exported functions
Function, last-insert-id: Exported functions
Function, lispify: Exported functions
Function, list-convert-nulls-to-nils: Internal functions
Function, list-diff: Exported functions
Function, make-create-sequence: Internal functions
Function, make-dao-instance: Exported functions
Function, make-drop-sequence: Internal functions
Function, make-relational-reader-method: Internal functions
Function, make-set-clause: Internal functions
Function, make-set-default: Internal functions
Function, map-all-superclasses: Internal functions
Function, migrate: Exported functions
Function, migration-expressions: Exported functions
Function, migration-expressions-for-others: Internal functions
Function, migration-expressions-for-sqlite3: Internal functions
Function, migration-file-version: Internal functions
Function, parse-col-type: Internal functions
Function, parse-dbtype: Exported functions
Function, parse-type-vars: Internal functions
Function, read-one-sql: Internal functions
Function, recreate-table: Exported functions
Function, rel-column-name: Internal functions
Function, retrieve-dao: Exported functions
Function, schema-migrations-table-definition: Internal functions
Function, select-by-sql: Internal functions
Function, set-default-expression: Internal functions
Function, set-default-name: Internal functions
Function, set-default-p: Internal functions
Function, slot-foreign-value: Internal functions
Function, symbol-name-literally: Exported functions
Function, table-column-slots: Exported functions
Function, table-definition: Exported functions
Function, table-direct-column-slots: Exported functions
Function, table-exists-p: Exported functions
Function, table-indices: Exported functions
Function, table-indices: Exported functions
Function, table-indices: Exported functions
Function, table-indices: Exported functions
Function, table-info: Internal functions
Function, table-primary-keys: Internal functions
Function, trace-sql: Exported functions
Function, unlispify: Exported functions
Function, update-migration-version: Exported functions
Function, where-and: Internal functions

G
generate-migrations: Exported functions
generate-version: Internal functions
Generic Function, %object-id: Internal generic functions
Generic Function, %table-column-type: Internal generic functions
Generic Function, (setf %object-id): Internal generic functions
Generic Function, (setf %table-column-type): Internal generic functions
Generic Function, (setf dao-synced): Exported generic functions
Generic Function, (setf ghost-slot-p): Exported generic functions
Generic Function, (setf object-created-at): Exported generic functions
Generic Function, (setf object-updated-at): Exported generic functions
Generic Function, (setf primary-key-p): Exported generic functions
Generic Function, create-dao: Exported generic functions
Generic Function, create-table-sxql: Exported generic functions
Generic Function, dao-synced: Exported generic functions
Generic Function, dao-table-column-deflate: Exported generic functions
Generic Function, dao-table-column-inflate: Exported generic functions
Generic Function, database-column-slots: Exported generic functions
Generic Function, deflate-for-col-type: Exported generic functions
Generic Function, delete-by-values: Exported generic functions
Generic Function, delete-dao: Exported generic functions
Generic Function, execute-sql: Exported generic functions
Generic Function, ghost-slot-p: Exported generic functions
Generic Function, inflate-for-col-type: Exported generic functions
Generic Function, insert-dao: Exported generic functions
Generic Function, migrate-table: Exported generic functions
Generic Function, object-created-at: Exported generic functions
Generic Function, object-id: Exported generic functions
Generic Function, object-updated-at: Exported generic functions
Generic Function, object=: Exported generic functions
Generic Function, primary-key-p: Exported generic functions
Generic Function, retrieve-by-sql: Exported generic functions
Generic Function, save-dao: Exported generic functions
Generic Function, table-column-info: Exported generic functions
Generic Function, table-column-info-for-create-table: Exported generic functions
Generic Function, table-column-name: Exported generic functions
Generic Function, table-column-not-null-p: Exported generic functions
Generic Function, table-column-references: Exported generic functions
Generic Function, table-column-references-column: Exported generic functions
Generic Function, table-column-type: Exported generic functions
Generic Function, table-indices-info: Exported generic functions
Generic Function, table-name: Exported generic functions
Generic Function, table-primary-key: Exported generic functions
Generic Function, table-serial-key: Exported generic functions
Generic Function, update-dao: Exported generic functions
get-column-real-type: Exported functions
get-prev-stack: Internal functions
get-serial-keys: Internal functions
ghost-slot-p: Exported generic functions
ghost-slot-p: Exported generic functions
group-by-plist: Exported functions

I
include-foreign-objects: Exported functions
inflate-for-col-type: Exported generic functions
inflate-for-col-type: Exported generic functions
inflate-for-col-type: Exported generic functions
inflate-for-col-type: Exported generic functions
inflate-for-col-type: Exported generic functions
inflate-for-col-type: Exported generic functions
inflate-for-col-type: Exported generic functions
inflate-for-col-type: Exported generic functions
inflate-for-col-type: Exported generic functions
initargs-contains-primary-key: Internal functions
initargs-enables-auto-pk: Internal functions
initargs-enables-record-timestamps: Internal functions
initialize-migrations-table: Internal functions
insert-dao: Exported generic functions
insert-dao: Exported generic functions
insert-dao: Exported generic functions

L
last-insert-id: Exported functions
last-insert-id: Exported functions
last-insert-id: Exported functions
last-insert-id: Exported functions
lispify: Exported functions
list-convert-nulls-to-nils: Internal functions
list-diff: Exported functions

M
Macro, select-dao: Exported macros
Macro, with-quote-char: Exported macros
Macro, with-sql-logging: Exported macros
make-create-sequence: Internal functions
make-dao-instance: Exported functions
make-drop-sequence: Internal functions
make-relational-reader-method: Internal functions
make-set-clause: Internal functions
make-set-default: Internal functions
map-all-superclasses: Internal functions
Method, %object-id: Internal generic functions
Method, %table-column-type: Internal generic functions
Method, (setf %object-id): Internal generic functions
Method, (setf %table-column-type): Internal generic functions
Method, (setf dao-synced): Exported generic functions
Method, (setf ghost-slot-p): Exported generic functions
Method, (setf object-created-at): Exported generic functions
Method, (setf object-updated-at): Exported generic functions
Method, (setf primary-key-p): Exported generic functions
Method, create-dao: Exported generic functions
Method, create-dao: Exported generic functions
Method, create-table-sxql: Exported generic functions
Method, dao-synced: Exported generic functions
Method, dao-table-column-deflate: Exported generic functions
Method, dao-table-column-inflate: Exported generic functions
Method, database-column-slots: Exported generic functions
Method, deflate-for-col-type: Exported generic functions
Method, deflate-for-col-type: Exported generic functions
Method, deflate-for-col-type: Exported generic functions
Method, deflate-for-col-type: Exported generic functions
Method, deflate-for-col-type: Exported generic functions
Method, deflate-for-col-type: Exported generic functions
Method, deflate-for-col-type: Exported generic functions
Method, delete-by-values: Exported generic functions
Method, delete-by-values: Exported generic functions
Method, delete-dao: Exported generic functions
Method, execute-sql: Exported generic functions
Method, execute-sql: Exported generic functions
Method, execute-sql: Exported generic functions
Method, ghost-slot-p: Exported generic functions
Method, inflate-for-col-type: Exported generic functions
Method, inflate-for-col-type: Exported generic functions
Method, inflate-for-col-type: Exported generic functions
Method, inflate-for-col-type: Exported generic functions
Method, inflate-for-col-type: Exported generic functions
Method, inflate-for-col-type: Exported generic functions
Method, inflate-for-col-type: Exported generic functions
Method, inflate-for-col-type: Exported generic functions
Method, insert-dao: Exported generic functions
Method, insert-dao: Exported generic functions
Method, migrate-table: Exported generic functions
Method, migrate-table: Exported generic functions
Method, object-created-at: Exported generic functions
Method, object-id: Exported generic functions
Method, object-updated-at: Exported generic functions
Method, object=: Exported generic functions
Method, primary-key-p: Exported generic functions
Method, retrieve-by-sql: Exported generic functions
Method, retrieve-by-sql: Exported generic functions
Method, retrieve-by-sql: Exported generic functions
Method, save-dao: Exported generic functions
Method, table-column-info: Exported generic functions
Method, table-column-info: Exported generic functions
Method, table-column-info: Exported generic functions
Method, table-column-info: Exported generic functions
Method, table-column-info-for-create-table: Exported generic functions
Method, table-column-info-for-create-table: Exported generic functions
Method, table-column-info-for-create-table: Exported generic functions
Method, table-column-info-for-create-table: Exported generic functions
Method, table-column-info-for-create-table: Exported generic functions
Method, table-column-name: Exported generic functions
Method, table-column-not-null-p: Exported generic functions
Method, table-column-references: Exported generic functions
Method, table-column-references-column: Exported generic functions
Method, table-column-type: Exported generic functions
Method, table-indices-info: Exported generic functions
Method, table-name: Exported generic functions
Method, table-primary-key: Exported generic functions
Method, table-serial-key: Exported generic functions
Method, update-dao: Exported generic functions
Method, update-dao: Exported generic functions
migrate: Exported functions
migrate-table: Exported generic functions
migrate-table: Exported generic functions
migrate-table: Exported generic functions
migration-expressions: Exported functions
migration-expressions-for-others: Internal functions
migration-expressions-for-sqlite3: Internal functions
migration-file-version: Internal functions

O
object-created-at: Exported generic functions
object-created-at: Exported generic functions
object-id: Exported generic functions
object-id: Exported generic functions
object-updated-at: Exported generic functions
object-updated-at: Exported generic functions
object=: Exported generic functions
object=: Exported generic functions

P
parse-col-type: Internal functions
parse-dbtype: Exported functions
parse-type-vars: Internal functions
primary-key-p: Exported generic functions
primary-key-p: Exported generic functions

R
read-one-sql: Internal functions
recreate-table: Exported functions
rel-column-name: Internal functions
retrieve-by-sql: Exported generic functions
retrieve-by-sql: Exported generic functions
retrieve-by-sql: Exported generic functions
retrieve-by-sql: Exported generic functions
retrieve-dao: Exported functions

S
save-dao: Exported generic functions
save-dao: Exported generic functions
schema-migrations-table-definition: Internal functions
select-by-sql: Internal functions
select-dao: Exported macros
set-default-expression: Internal functions
set-default-name: Internal functions
set-default-p: Internal functions
slot-foreign-value: Internal functions
symbol-name-literally: Exported functions

T
table-column-info: Exported generic functions
table-column-info: Exported generic functions
table-column-info: Exported generic functions
table-column-info: Exported generic functions
table-column-info: Exported generic functions
table-column-info-for-create-table: Exported generic functions
table-column-info-for-create-table: Exported generic functions
table-column-info-for-create-table: Exported generic functions
table-column-info-for-create-table: Exported generic functions
table-column-info-for-create-table: Exported generic functions
table-column-info-for-create-table: Exported generic functions
table-column-name: Exported generic functions
table-column-name: Exported generic functions
table-column-not-null-p: Exported generic functions
table-column-not-null-p: Exported generic functions
table-column-references: Exported generic functions
table-column-references: Exported generic functions
table-column-references-column: Exported generic functions
table-column-references-column: Exported generic functions
table-column-slots: Exported functions
table-column-type: Exported generic functions
table-column-type: Exported generic functions
table-definition: Exported functions
table-direct-column-slots: Exported functions
table-exists-p: Exported functions
table-indices: Exported functions
table-indices: Exported functions
table-indices: Exported functions
table-indices: Exported functions
table-indices-info: Exported generic functions
table-indices-info: Exported generic functions
table-info: Internal functions
table-name: Exported generic functions
table-name: Exported generic functions
table-primary-key: Exported generic functions
table-primary-key: Exported generic functions
table-primary-keys: Internal functions
table-serial-key: Exported generic functions
table-serial-key: Exported generic functions
trace-sql: Exported functions

U
unlispify: Exported functions
update-dao: Exported generic functions
update-dao: Exported generic functions
update-dao: Exported generic functions
update-migration-version: Exported functions

W
where-and: Internal functions
with-quote-char: Exported macros
with-sql-logging: Exported macros

Jump to:   %   (  
A   C   D   E   F   G   I   L   M   O   P   R   S   T   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   C   D   G   I   K   N   P   R   S   T   U  
Index Entry  Section

*
*auto-migration-mode*: Exported special variables
*connection*: Exported special variables
*db-date-format*: Internal special variables
*db-datetime-format*: Internal special variables
*mito-logger-stream*: Exported special variables
*real-type-cache*: Internal special variables

A
auto-pk: Exported classes

C
col-type: Exported classes
created-at: Exported classes

D
deflate: Exported classes

G
ghost: Exported classes

I
id: Exported classes
if-exists: Internal structures
inflate: Exported classes

K
keys: Exported classes

N
name: Internal structures
name: Internal structures
name: Internal structures

P
parent-column-map: Exported classes
primary-key: Exported classes
primary-key: Exported classes

R
record-timestamps: Exported classes
references: Exported classes

S
sequence-name: Internal structures
sequence-name: Internal structures
slot: Exported conditions
Slot, auto-pk: Exported classes
Slot, col-type: Exported classes
Slot, created-at: Exported classes
Slot, deflate: Exported classes
Slot, ghost: Exported classes
Slot, id: Exported classes
Slot, if-exists: Internal structures
Slot, inflate: Exported classes
Slot, keys: Exported classes
Slot, name: Internal structures
Slot, name: Internal structures
Slot, name: Internal structures
Slot, parent-column-map: Exported classes
Slot, primary-key: Exported classes
Slot, primary-key: Exported classes
Slot, record-timestamps: Exported classes
Slot, references: Exported classes
Slot, sequence-name: Internal structures
Slot, sequence-name: Internal structures
Slot, slot: Exported conditions
Slot, synced: Exported classes
Slot, table: Exported conditions
Slot, table-name: Exported classes
Slot, unique-keys: Exported classes
Slot, updated-at: Exported classes
Special Variable, *auto-migration-mode*: Exported special variables
Special Variable, *connection*: Exported special variables
Special Variable, *db-date-format*: Internal special variables
Special Variable, *db-datetime-format*: Internal special variables
Special Variable, *mito-logger-stream*: Exported special variables
Special Variable, *real-type-cache*: Internal special variables
synced: Exported classes

T
table: Exported conditions
table-name: Exported classes

U
unique-keys: Exported classes
updated-at: Exported classes

Jump to:   *  
A   C   D   G   I   K   N   P   R   S   T   U  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   C   D   I   M   N   P   R   S   T  
Index Entry  Section

A
auto-pk-mixin: Exported classes

C
Class, auto-pk-mixin: Exported classes
Class, dao-class: Exported classes
Class, dao-table-class: Exported classes
Class, dao-table-column-class: Exported classes
Class, dao-table-mixin: Exported classes
Class, record-timestamps-mixin: Exported classes
Class, table-class: Exported classes
Class, table-column-class: Exported classes
col-type-required: Exported conditions
Condition, col-type-required: Exported conditions
Condition, connection-not-established: Exported conditions
Condition, invalid-definition: Exported conditions
Condition, mito-error: Exported conditions
Condition, no-primary-keys: Exported conditions
connection-not-established: Exported conditions
create-sequence: Internal structures

D
dao-class: Exported classes
dao-table-class: Exported classes
dao-table-column-class: Exported classes
dao-table-mixin: Exported classes
drop-sequence: Internal structures

I
invalid-definition: Exported conditions

M
mito: The mito system
mito: The mito package
mito-asd: The mito-asd package
mito-core: The mito-core system
mito-error: Exported conditions
mito-migration: The mito-migration system
mito-migration-asd: The mito-migration-asd package
mito.class: The mito<dot>class package
mito.class.column: The mito<dot>class<dot>column package
mito.class.table: The mito<dot>class<dot>table package
mito.connection: The mito<dot>connection package
mito.core: The mito<dot>core package
mito.dao: The mito<dot>dao package
mito.dao.column: The mito<dot>dao<dot>column package
mito.dao.mixin: The mito<dot>dao<dot>mixin package
mito.dao.table: The mito<dot>dao<dot>table package
mito.db: The mito<dot>db package
mito.db.mysql: The mito<dot>db<dot>mysql package
mito.db.postgres: The mito<dot>db<dot>postgres package
mito.db.sqlite3: The mito<dot>db<dot>sqlite3 package
mito.error: The mito<dot>error package
mito.logger: The mito<dot>logger package
mito.migration: The mito<dot>migration package
mito.migration.sxql: The mito<dot>migration<dot>sxql package
mito.migration.table: The mito<dot>migration<dot>table package
mito.migration.versions: The mito<dot>migration<dot>versions package
mito.type: The mito<dot>type package
mito.util: The mito<dot>util package

N
no-primary-keys: Exported conditions

P
Package, mito: The mito package
Package, mito-asd: The mito-asd package
Package, mito-migration-asd: The mito-migration-asd package
Package, mito.class: The mito<dot>class package
Package, mito.class.column: The mito<dot>class<dot>column package
Package, mito.class.table: The mito<dot>class<dot>table package
Package, mito.connection: The mito<dot>connection package
Package, mito.core: The mito<dot>core package
Package, mito.dao: The mito<dot>dao package
Package, mito.dao.column: The mito<dot>dao<dot>column package
Package, mito.dao.mixin: The mito<dot>dao<dot>mixin package
Package, mito.dao.table: The mito<dot>dao<dot>table package
Package, mito.db: The mito<dot>db package
Package, mito.db.mysql: The mito<dot>db<dot>mysql package
Package, mito.db.postgres: The mito<dot>db<dot>postgres package
Package, mito.db.sqlite3: The mito<dot>db<dot>sqlite3 package
Package, mito.error: The mito<dot>error package
Package, mito.logger: The mito<dot>logger package
Package, mito.migration: The mito<dot>migration package
Package, mito.migration.sxql: The mito<dot>migration<dot>sxql package
Package, mito.migration.table: The mito<dot>migration<dot>table package
Package, mito.migration.versions: The mito<dot>migration<dot>versions package
Package, mito.type: The mito<dot>type package
Package, mito.util: The mito<dot>util package

R
record-timestamps-mixin: Exported classes
references: Internal types

S
set-default: Internal structures
Structure, create-sequence: Internal structures
Structure, drop-sequence: Internal structures
Structure, set-default: Internal structures
System, mito: The mito system
System, mito-core: The mito-core system
System, mito-migration: The mito-migration system

T
table-class: Exported classes
table-column-class: Exported classes
Type, references: Internal types

Jump to:   A   C   D   I   M   N   P   R   S   T