The cl-batis Reference Manual

Table of Contents

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

The cl-batis Reference Manual

This is the cl-batis Reference Manual, version 0.1, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Jul 29 14:43:52 2019 GMT+0.


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

1 Introduction

Cl-Batis - SQL Mapping Framework for Common Lisp

Build Status

Usage

create session

;; with CL-DBI connection
(defparameter *conn-dbi* (dbi:connect :mysql
                                      :database-name "batis"
                                      :username "nobody"
                                      :password "nobody"))
(defparameter *session* (create-sql-session *conn-dbi*))


;; with CL-DBI-Connection-Pool
(defparameter *conn-pool* (dbi-cp:make-dbi-connection-pool :mysql
                                                           :database-name "batis"
                                                           :username "nobody"
                                                           :password "nobody"))
(defparameter *session* (create-sql-session *conn-pool*))

;; direct
(defparameter *session* (create-sql-session :mysql
                                            :database-name "batis"
                                            :username "nobody"
                                            :password "nobody"))

how to do DDL

Cl-Batis does not support DDL. If you want to use DDL, use do-sql.

(do-sql session "truncate table product")

Define SQL

There are two type of methods.

when use (cl-syntax:use-syntax :annot), @update and @select can be used.

update

@update ("insert into product (id, name, price) values (:id, :name, :price)")
(defsql register-product (id name price))

@update ("update
            product "
         (sql-set
          (sql-cond (not (null name))
                    " name = :name, ")
          (sql-cond (not (null price))
                    " price = :price "))
         (sql-where
          " id = :id "))
(defsql update-product (id name price))

select

@select ("select name, price from product where id = :id")
(defsql search-product (id))

@select ("select id, name, price from product"
         (sql-where
           (sql-cond (not (null name))
                     " and name = :name ")
           (sql-cond (not (null price_low))
                     " and price >= :price_low ")
           (sql-cond (not (null price_high))
                     " and price <= :price_high "))
         " order by id ")
(defsql filter-product (name price_low price_high))

where, set

@select
("select * from product where "
 (sql-cond (not (null price))
           " price = :price")
 (sql-cond (not (null valid_flag))
           " and valid_flag = :valid_flag"))
(defsql search-by-price (price valid_flag))

In dynamic condition, if sql-cond returns nothing, you would end up with SQL that looked like this:

select * from product where

This would fail. And, if only the second condition was met, you would end up with SQL that looked like this:

select * from product where
and valid_flag = '1'

This would also fail.

So, cl-batis provides SQL-WHERE function.

@select
("select * from product"
 (sql-where
   (sql-cond (not (null price))
    " price = :price")
   (sql-cond (not (null valid_flag))
    " and valid_flag = :valid_flag ")))
(defsql search-by-product (price valid_flag))

The SQL-WHERE knows to only insert WHERE if there is any condition. Furthermore, if that content begins with AND or OR, strip it off.

@update
("update product"
 (sql-set
  (sql-cond (not (null price))
            " price = :price, ")
  (sql-cond (not (null name))
            " name = :name "))
 (sql-where
  " id = :id "))
(defsql update-product-info (id price name))

There is a similar solution for dynamic update statements called SQL-SET. The SQL-SET knows to strip last comma off.

Execute

update

(update-one *session* register-product :id 1 :name "NES" :price 14800)

select

(select-one *session* search-product :id 1)
  -> (:|name| "NES" :|price| 14800))
(select-list *session* filter-product :price_low 20000)
  ->((:|id| 2 :|name| "SNES" :|price| 25000)
     (:|id| 3 :|name| "MEGA DRIVE" :|price| 21000)
     (:|id| 4 :|name| "PC Engine" :|price| 24800)))

transaction

(commit *session*)

(rollback *session*)

release session

(close-sql-session *session*)

Databases

Example

;;;
;;; create session
;;;
CL-USER> (defparameter session
           (create-sql-session :mysql
                               :database-name "scdata"
                               :username "root"
                               :password "password"))
SESSION

;;;
;;; create table
;;;
CL-USER> (do-sql session "create table product (id integer primary key, name varchar(20) not null, price integer not null)")
; No value

;;;
;;; define sql
;;;
CL-USER> (select (" select * from product where id = :id ")
                 (defsql select-product (id)))
SELECT-PRODUCT
CL-USER> (select (" select name, price from product "
                  (sql-where
                   (sql-cond (not (null name))
                             " and name = :name ")
                   (sql-cond (not (null price_low))
                             " and price >= :price_low ")
                   (sql-cond (not (null price_high))
                             " and price <= :price_high "))
                  " order by id ")
                 (defsql select-product-by-name-or-price (name price_low price_high)))
; in:
;      SELECT (" select name, price from product "
;          (SQL-WHERE (SQL-COND (NOT (NULL NAME)) " and name = :name ")
;                     (SQL-COND (NOT (NULL PRICE_LOW))
;                               " and price >= :price_low ")
;                     (SQL-COND (NOT (NULL PRICE_HIGH))
;                               " and price <= :price_high "))
;          " order by id ")
;     (NULL NAME)
; --> IF
; ==>
;   NAME
;
; caught STYLE-WARNING:
;   reading an ignored variable: NAME

;     (NULL PRICE_LOW)
; --> IF
; ==>
;   PRICE_LOW
;
; caught STYLE-WARNING:
;   reading an ignored variable: PRICE_LOW

;     (NULL PRICE_HIGH)
; --> IF
; ==>
;   PRICE_HIGH
;
; caught STYLE-WARNING:
;   reading an ignored variable: PRICE_HIGH
;
; compilation unit finished
;   caught 3 STYLE-WARNING conditions
SELECT-PRODUCT-BY-NAME-OR-PRICE
CL-USER> (update ("insert into product (id, name, price) values (:id, :name, :price)")
                 (defsql register-product (id name price)))
REGISTER-PRODUCT

;;;
;;; insert
;;;
CL-USER> (update-one session register-product :id 1 :name "NES" :price 14800)
(1)
CL-USER> (update-one session register-product :id 2 :name "SNES" :price 25000)
(1)
CL-USER> (update-one session register-product :id 3 :name "MEGA DRIVE" :price 21000)
(1)
CL-USER> (update-one session register-product :id 4 :name "PC Engine" :price 24800)
(1)

;;;
;;; select one record
;;;
CL-USER> (select-one session select-product :id 1)
(:|id| 1 :|name| "NES" :|price| 14800)

;;;
;;; select some records
;;;
CL-USER> (select-list session select-product-by-name-or-price)
((:|name| "NES" :|price| 14800) (:|name| "SNES" :|price| 25000)
 (:|name| "MEGA DRIVE" :|price| 21000) (:|name| "PC Engine" :|price| 24800))
CL-USER> (select-list session select-product-by-name-or-price :price_low 20000)
((:|name| "SNES" :|price| 25000) (:|name| "MEGA DRIVE" :|price| 21000)
 (:|name| "PC Engine" :|price| 24800))
CL-USER> (select-list session select-product-by-name-or-price :price_low 20000 :price_high 22000)
((:|name| "MEGA DRIVE" :|price| 21000))
CL-USER> (select-list session select-product-by-name-or-price :name "PC Engine")
((:|name| "PC Engine" :|price| 24800))

Installation

This library is available on Quicklisp.

(ql:quickload :cl-batis)

Author

Copyright

Copyright (c) 2017 tamura shingo (tamura.shingo@gmail.com)

License

Licensed under the MIT 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 cl-batis

Author

tamura shingo

License

MIT

Version

0.1

Dependency

batis (system)

Source

cl-batis.asd (file)


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

2.2 batis

Author

tamura shingo

License

MIT

Description

SQL Mapping Framework for Common Lisp

Long Description

# Cl-Batis - SQL Mapping Framework for Common Lisp

[![Build Status](https://travis-ci.org/tamurashingo/cl-batis.svg?branch=master)](https://travis-ci.org/tamurashingo/cl-batis)

## Usage

### create session

“‘common-lisp
;; with CL-DBI connection
(defparameter *conn-dbi* (dbi:connect :mysql
:database-name "batis"
:username "nobody"
:password "nobody"))
(defparameter *session* (create-sql-session *conn-dbi*))

;; with CL-DBI-Connection-Pool
(defparameter *conn-pool* (dbi-cp:make-dbi-connection-pool :mysql
:database-name "batis"
:username "nobody"
:password "nobody"))
(defparameter *session* (create-sql-session *conn-pool*))

;; direct
(defparameter *session* (create-sql-session :mysql
:database-name "batis"
:username "nobody"
:password "nobody"))

“‘

### how to do DDL

Cl-Batis does not support DDL.
If you want to use DDL, use ‘do-sql‘.

“‘common-lisp
(do-sql session "truncate table product")
“‘

### Define SQL

There are two type of methods.

- ‘update‘
- ‘select‘

when use ‘(cl-syntax:use-syntax :annot)‘, ‘@update‘ and ‘@select‘ can be used.

#### update

“‘common-lisp
@update ("insert into product (id, name, price) values (:id, :name, :price)")
(defsql register-product (id name price))

@update ("update
product "
(sql-set
(sql-cond (not (null name))
" name = :name, ")
(sql-cond (not (null price))
" price = :price "))
(sql-where
" id = :id "))
(defsql update-product (id name price))
“‘

#### select

“‘common-lisp
@select ("select name, price from product where id = :id")
(defsql search-product (id))

@select ("select id, name, price from product"
(sql-where
(sql-cond (not (null name))
" and name = :name ")
(sql-cond (not (null price_low))
" and price >= :price_low ")
(sql-cond (not (null price_high))
" and price <= :price_high "))
" order by id ")
(defsql filter-product (name price_low price_high))
“‘

#### where, set

“‘common-lisp
@select
("select * from product where "
(sql-cond (not (null price))
" price = :price")
(sql-cond (not (null valid_flag))
" and valid_flag = :valid_flag"))
(defsql search-by-price (price valid_flag))
“‘

In dynamic condition, if ‘sql-cond‘ returns nothing, you would end up with SQL that looked like this:

“‘SQL
select * from product where
“‘

This would fail.
And, if only the second condition was met, you would end up with SQL that looked like this:

“‘SQL
select * from product where
and valid_flag = ’1’
“‘

This would also fail.

So, ‘cl-batis‘ provides ‘SQL-WHERE‘ function.

“‘common-lisp
@select
("select * from product"
(sql-where
(sql-cond (not (null price))
" price = :price")
(sql-cond (not (null valid_flag))
" and valid_flag = :valid_flag ")))
(defsql search-by-product (price valid_flag))
“‘

The ‘SQL-WHERE‘ knows to only insert ‘WHERE‘ if there is any condition.
Furthermore, if that content begins with ‘AND‘ or ‘OR‘, strip it off.

“‘common-lisp
@update
("update product"
(sql-set
(sql-cond (not (null price))
" price = :price, ")
(sql-cond (not (null name))
" name = :name "))
(sql-where
" id = :id "))
(defsql update-product-info (id price name))
“‘

There is a similar solution for dynamic update statements called ‘SQL-SET‘.
The ‘SQL-SET‘ knows to strip last comma off.

### Execute

#### update

“‘common-lisp
(update-one *session* register-product :id 1 :name "NES" :price 14800)
“‘

#### select

“‘common-lisp
(select-one *session* search-product :id 1)
-> (:|name| "NES" :|price| 14800))
“‘

“‘common-lisp
(select-list *session* filter-product :price_low 20000)
->((:|id| 2 :|name| "SNES" :|price| 25000)
(:|id| 3 :|name| "MEGA DRIVE" :|price| 21000)
(:|id| 4 :|name| "PC Engine" :|price| 24800)))
“‘

### transaction

“‘common-lisp
(commit *session*)

(rollback *session*)
“‘

### release session

“‘common-lisp
(close-sql-session *session*)
“‘

## Databases

* SQLite3
* PostgreSQL
* MySQL

## Example

“‘common-lisp
;;;
;;; create session
;;;
CL-USER> (defparameter session
(create-sql-session :mysql
:database-name "scdata"
:username "root"
:password "password"))
SESSION

;;;
;;; create table
;;;
CL-USER> (do-sql session "create table product (id integer primary key, name varchar(20) not null, price integer not null)") ; No value

;;;
;;; define sql
;;;
CL-USER> (select (" select * from product where id = :id ")
(defsql select-product (id)))
SELECT-PRODUCT
CL-USER> (select (" select name, price from product "
(sql-where
(sql-cond (not (null name))
" and name = :name ")
(sql-cond (not (null price_low))
" and price >= :price_low ")
(sql-cond (not (null price_high))
" and price <= :price_high "))
" order by id ")
(defsql select-product-by-name-or-price (name price_low price_high)))
; in:
; SELECT (" select name, price from product "
; (SQL-WHERE (SQL-COND (NOT (NULL NAME)) " and name = :name ")
; (SQL-COND (NOT (NULL PRICE_LOW))
; " and price >= :price_low ")
; (SQL-COND (NOT (NULL PRICE_HIGH))
; " and price <= :price_high "))
; " order by id ")
; (NULL NAME)
; –> IF
; ==>
; NAME
;
; caught STYLE-WARNING:
; reading an ignored variable: NAME

; (NULL PRICE_LOW)
; –> IF
; ==>
; PRICE_LOW
;
; caught STYLE-WARNING:
; reading an ignored variable: PRICE_LOW

; (NULL PRICE_HIGH)
; –> IF
; ==>
; PRICE_HIGH
;
; caught STYLE-WARNING:
; reading an ignored variable: PRICE_HIGH
;
; compilation unit finished
; caught 3 STYLE-WARNING conditions
SELECT-PRODUCT-BY-NAME-OR-PRICE
CL-USER> (update ("insert into product (id, name, price) values (:id, :name, :price)")
(defsql register-product (id name price)))
REGISTER-PRODUCT

;;;
;;; insert
;;;
CL-USER> (update-one session register-product :id 1 :name "NES" :price 14800)
(1)
CL-USER> (update-one session register-product :id 2 :name "SNES" :price 25000)
(1)
CL-USER> (update-one session register-product :id 3 :name "MEGA DRIVE" :price 21000)
(1)
CL-USER> (update-one session register-product :id 4 :name "PC Engine" :price 24800)
(1)

;;;
;;; select one record
;;;
CL-USER> (select-one session select-product :id 1)
(:|id| 1 :|name| "NES" :|price| 14800)

;;;
;;; select some records
;;;
CL-USER> (select-list session select-product-by-name-or-price)
((:|name| "NES" :|price| 14800) (:|name| "SNES" :|price| 25000)
(:|name| "MEGA DRIVE" :|price| 21000) (:|name| "PC Engine" :|price| 24800))
CL-USER> (select-list session select-product-by-name-or-price :price_low 20000)
((:|name| "SNES" :|price| 25000) (:|name| "MEGA DRIVE" :|price| 21000)
(:|name| "PC Engine" :|price| 24800))
CL-USER> (select-list session select-product-by-name-or-price :price_low 20000 :price_high 22000)
((:|name| "MEGA DRIVE" :|price| 21000))
CL-USER> (select-list session select-product-by-name-or-price :name "PC Engine")
((:|name| "PC Engine" :|price| 24800))
“‘

## Installation

This library is available on Quicklisp.

“‘commonlisp
(ql:quickload :cl-batis)
“‘

## Author

* tamura shingo (tamura.shingo@gmail.com)

## Copyright

Copyright (c) 2017 tamura shingo (tamura.shingo@gmail.com)

## License

Licensed under the MIT License.

Version

0.1

Dependencies
Source

batis.asd (file)

Component

src (module)


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

3 Modules

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


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

3.1 batis/src

Parent

batis (system)

Location

src/

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 cl-batis.asd

Location

cl-batis.asd

Systems

cl-batis (system)

Packages

cl-batis-asd


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

4.1.2 batis.asd

Location

batis.asd

Systems

batis (system)

Packages

batis-asd


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

4.1.3 batis/src/batis.lisp

Dependencies
Parent

src (module)

Location

src/batis.lisp

Packages

batis


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

4.1.4 batis/src/macro.lisp

Dependency

sql.lisp (file)

Parent

src (module)

Location

src/macro.lisp

Packages

batis.macro

Exported Definitions
Internal Definitions

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

4.1.5 batis/src/sqlparser.lisp

Parent

src (module)

Location

src/sqlparser.lisp

Packages

batis.sqlparser

Exported Definitions

parse (function)

Internal Definitions

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

4.1.6 batis/src/dbi.lisp

Parent

src (module)

Location

src/dbi.lisp

Packages

batis.dbi

Exported Definitions

do-sql (method)


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

4.1.7 batis/src/sql.lisp

Dependencies
Parent

src (module)

Location

src/sql.lisp

Packages

batis.sql

Exported Definitions
Internal Definitions

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

4.1.8 batis/src/datasource.lisp

Parent

src (module)

Location

src/datasource.lisp

Packages

batis.datasource

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 cl-batis-asd

Source

cl-batis.asd

Use List

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

5.2 batis-asd

Source

batis.asd

Use List

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

5.3 batis

Source

batis.lisp (file)

Nickname

cl-batis

Use List

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

5.4 batis.macro

Source

macro.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.5 batis.sqlparser

Source

sqlparser.lisp (file)

Use List

common-lisp

Exported Definitions

parse (function)

Internal Definitions

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

5.6 batis.dbi

Source

dbi.lisp (file)

Use List

common-lisp

Exported Definitions

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

5.7 batis.sql

Source

sql.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.8 batis.datasource

Source

datasource.lisp (file)

Use 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 Macros

Macro: defsql SQL-NAME ARGS &key SQL-BODY SQL-TYPE &allow-other-keys

define sql name and its args

Package

batis.macro

Source

macro.lisp (file)

Macro: select SQL-FORM DEF-FORM

define SELECT SQL

Example:
@select ("select * from product where valid_flag = ’1’ " (sql-cond (not (null product_name))
" and product_name like :product_name ")) (defsql fetch-product (product_name))

Package

batis.macro

Source

macro.lisp (file)

Macro: sql-cond TEST-FORM SQL-BODY

apply sql-body when test-form is true

Example:
(sql-cond (not (null product_name))
" and product_name like :product_name ")

Package

batis.macro

Source

macro.lisp (file)

Macro: update SQL-FORM DEF-FORM

define UPDATE SQL

Example:
@select ("update product set product_price = :product_price where product_id = :product_id") (defsql update_price (product_price product_id))

Package

batis.macro

Source

macro.lisp (file)


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

6.1.2 Functions

Function: parse SQL

generate prepared-type SQL and parameters

Package

batis.sqlparser

Source

sqlparser.lisp (file)

Function: sql-set &rest COLUMNS

insert ‘SET‘.
Furthermore, if that content ends with ‘,‘, strip it off.

Package

batis.macro

Source

macro.lisp (file)

Function: sql-where &rest CONDITIONS

insert ‘WHERE‘ if there is any condition.
Furthermore, if that content begins with ‘AND‘ or ‘OR‘, strip it off.

Package

batis.macro

Source

macro.lisp (file)


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

6.1.3 Generic functions

Generic Function: close-sql-session SESSION
Package

batis.datasource

Methods
Method: close-sql-session (SESSION <sql-session-dbi-cp>)
Source

datasource.lisp (file)

Method: close-sql-session (SESSION <sql-session-dbi>)
Source

datasource.lisp (file)

Generic Function: commit SESSION
Package

batis.datasource

Methods
Method: commit (SESSION <sql-session-dbi-cp>)
Source

datasource.lisp (file)

Method: commit (SESSION <sql-session-dbi>)
Source

datasource.lisp (file)

Generic Function: create-sql-session CONN &key DATABASE-NAME &ALLO-OTHER-KEYS &allow-other-keys
Package

batis.datasource

Methods
Method: create-sql-session DRIVER-NAME &rest PARAMS &key DATABASE-NAME &allow-other-keys
Source

datasource.lisp (file)

Method: create-sql-session (CONNECTION-POOL <dbi-connection-pool>) &key &ALLO-OTHER-KEYS
Source

datasource.lisp (file)

Method: create-sql-session (CONN <dbi-connection>) &key &allow-other-keys
Source

datasource.lisp (file)

Generic Function: do-sql SESSION SQL &rest PARAMS
Package

batis.dbi

Methods
Method: do-sql (SESSION <sql-session>) SQL &rest PARAMS
Source

dbi.lisp (file)

Generic Function: rollback SESSION
Package

batis.datasource

Methods
Method: rollback (SESSION <sql-session-dbi-cp>)
Source

datasource.lisp (file)

Method: rollback (SESSION <sql-session-dbi>)
Source

datasource.lisp (file)

Generic Function: select-list SESSION SQL-NAME &rest PARAMS &key &allow-other-keys
Package

batis.sql

Methods
Method: select-list (SESSION <sql-session>) SQL-NAME &rest PARAMS &key &allow-other-keys
Source

sql.lisp (file)

Generic Function: select-one SESSION SQL-NAME &rest PARAMS &key &allow-other-keys
Package

batis.sql

Methods
Method: select-one (SESSION <sql-session>) SQL-NAME &rest PARAMS &key &allow-other-keys
Source

sql.lisp (file)

Generic Function: update-one SESSION SQL-NAME &rest PARAMS &key &allow-other-keys
Package

batis.sql

Methods
Method: update-one (SESSION <sql-session>) SQL-NAME &rest PARAMS &key &allow-other-keys
Source

sql.lisp (file)


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

6.2 Internal definitions


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

6.2.1 Functions

Function: create-params NAMED-PARAMS NAMED-VALUE

create params to use execute method.
named-params: array of parameter names
named-value: property list of argment values

(create-params ’(NAME PRICE PRICE) ’(:NAME "name" :PRICE 100)) -> ("name" 100 100)

Package

batis.sql

Source

sql.lisp (file)

Function: gen-sql-params SQL-NAME PARAMS

generate parameterized SQL and its parameters

Package

batis.sql

Source

sql.lisp (file)

Function: lex-colon SQL POS LEN PARAMS START
Package

batis.sqlparser

Source

sqlparser.lisp (file)

Function: lex-doublequote SQL POS LEN PARAMS
Package

batis.sqlparser

Source

sqlparser.lisp (file)

Function: lex-normal SQL POS LEN PARAMS
Package

batis.sqlparser

Source

sqlparser.lisp (file)

Function: lex-quote SQL POS LEN PARAMS
Package

batis.sqlparser

Source

sqlparser.lisp (file)

Function: trim-first-and-or CONDITION
Package

batis.macro

Source

macro.lisp (file)

Function: trim-last-comma COLUMN
Package

batis.macro

Source

macro.lisp (file)


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

6.2.2 Generic functions

Generic Function: connection OBJECT
Generic Function: (setf connection) NEW-VALUE OBJECT
Package

batis.datasource

Methods
Method: connection (<SQL-SESSION> <sql-session>)

automatically generated reader method

Source

datasource.lisp (file)

Method: (setf connection) NEW-VALUE (<SQL-SESSION> <sql-session>)

automatically generated writer method

Source

datasource.lisp (file)

Generic Function: proxy OBJECT
Generic Function: (setf proxy) NEW-VALUE OBJECT
Package

batis.datasource

Methods
Method: proxy (<SQL-SESSION-DBI-CP> <sql-session-dbi-cp>)

automatically generated reader method

Source

datasource.lisp (file)

Method: (setf proxy) NEW-VALUE (<SQL-SESSION-DBI-CP> <sql-session-dbi-cp>)

automatically generated writer method

Source

datasource.lisp (file)

Generic Function: sql-execute SESSION SQL PARAMS
Package

batis.sql

Methods
Method: sql-execute (SESSION <sql-session-dbi-cp>) SQL PARAMS
Source

sql.lisp (file)

Method: sql-execute (SESSION <sql-session-dbi>) SQL PARAMS
Source

sql.lisp (file)


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

6.2.3 Classes

Class: <sql-session-dbi-cp> ()
Package

batis.datasource

Source

datasource.lisp (file)

Direct superclasses

<sql-session> (class)

Direct methods
Direct slots
Slot: proxy
Type

dbi-cp.proxy:<dbi-connection-proxy>

Initargs

:proxy

Readers

proxy (generic function)

Writers

(setf proxy) (generic function)

Class: <sql-session-dbi> ()
Package

batis.datasource

Source

datasource.lisp (file)

Direct superclasses

<sql-session> (class)

Direct methods
Class: <sql-session> ()
Package

batis.datasource

Source

datasource.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: connection
Type

dbi.driver:<dbi-connection>

Initargs

:connection

Readers

connection (generic function)

Writers

(setf connection) (generic function)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   B   C   F   L   M  
Index Entry  Section

B
batis.asd: The batis<dot>asd file
batis/src: The batis/src module
batis/src/batis.lisp: The batis/src/batis<dot>lisp file
batis/src/datasource.lisp: The batis/src/datasource<dot>lisp file
batis/src/dbi.lisp: The batis/src/dbi<dot>lisp file
batis/src/macro.lisp: The batis/src/macro<dot>lisp file
batis/src/sql.lisp: The batis/src/sql<dot>lisp file
batis/src/sqlparser.lisp: The batis/src/sqlparser<dot>lisp file

C
cl-batis.asd: The cl-batis<dot>asd file

F
File, Lisp, batis.asd: The batis<dot>asd file
File, Lisp, batis/src/batis.lisp: The batis/src/batis<dot>lisp file
File, Lisp, batis/src/datasource.lisp: The batis/src/datasource<dot>lisp file
File, Lisp, batis/src/dbi.lisp: The batis/src/dbi<dot>lisp file
File, Lisp, batis/src/macro.lisp: The batis/src/macro<dot>lisp file
File, Lisp, batis/src/sql.lisp: The batis/src/sql<dot>lisp file
File, Lisp, batis/src/sqlparser.lisp: The batis/src/sqlparser<dot>lisp file
File, Lisp, cl-batis.asd: The cl-batis<dot>asd file

L
Lisp File, batis.asd: The batis<dot>asd file
Lisp File, batis/src/batis.lisp: The batis/src/batis<dot>lisp file
Lisp File, batis/src/datasource.lisp: The batis/src/datasource<dot>lisp file
Lisp File, batis/src/dbi.lisp: The batis/src/dbi<dot>lisp file
Lisp File, batis/src/macro.lisp: The batis/src/macro<dot>lisp file
Lisp File, batis/src/sql.lisp: The batis/src/sql<dot>lisp file
Lisp File, batis/src/sqlparser.lisp: The batis/src/sqlparser<dot>lisp file
Lisp File, cl-batis.asd: The cl-batis<dot>asd file

M
Module, batis/src: The batis/src module

Jump to:   B   C   F   L   M  

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

A.2 Functions

Jump to:   (  
C   D   F   G   L   M   P   R   S   T   U  
Index Entry  Section

(
(setf connection): Internal generic functions
(setf connection): Internal generic functions
(setf proxy): Internal generic functions
(setf proxy): Internal generic functions

C
close-sql-session: Exported generic functions
close-sql-session: Exported generic functions
close-sql-session: Exported generic functions
commit: Exported generic functions
commit: Exported generic functions
commit: Exported generic functions
connection: Internal generic functions
connection: Internal generic functions
create-params: Internal functions
create-sql-session: Exported generic functions
create-sql-session: Exported generic functions
create-sql-session: Exported generic functions
create-sql-session: Exported generic functions

D
defsql: Exported macros
do-sql: Exported generic functions
do-sql: Exported generic functions

F
Function, create-params: Internal functions
Function, gen-sql-params: Internal functions
Function, lex-colon: Internal functions
Function, lex-doublequote: Internal functions
Function, lex-normal: Internal functions
Function, lex-quote: Internal functions
Function, parse: Exported functions
Function, sql-set: Exported functions
Function, sql-where: Exported functions
Function, trim-first-and-or: Internal functions
Function, trim-last-comma: Internal functions

G
gen-sql-params: Internal functions
Generic Function, (setf connection): Internal generic functions
Generic Function, (setf proxy): Internal generic functions
Generic Function, close-sql-session: Exported generic functions
Generic Function, commit: Exported generic functions
Generic Function, connection: Internal generic functions
Generic Function, create-sql-session: Exported generic functions
Generic Function, do-sql: Exported generic functions
Generic Function, proxy: Internal generic functions
Generic Function, rollback: Exported generic functions
Generic Function, select-list: Exported generic functions
Generic Function, select-one: Exported generic functions
Generic Function, sql-execute: Internal generic functions
Generic Function, update-one: Exported generic functions

L
lex-colon: Internal functions
lex-doublequote: Internal functions
lex-normal: Internal functions
lex-quote: Internal functions

M
Macro, defsql: Exported macros
Macro, select: Exported macros
Macro, sql-cond: Exported macros
Macro, update: Exported macros
Method, (setf connection): Internal generic functions
Method, (setf proxy): Internal generic functions
Method, close-sql-session: Exported generic functions
Method, close-sql-session: Exported generic functions
Method, commit: Exported generic functions
Method, commit: Exported generic functions
Method, connection: Internal generic functions
Method, create-sql-session: Exported generic functions
Method, create-sql-session: Exported generic functions
Method, create-sql-session: Exported generic functions
Method, do-sql: Exported generic functions
Method, proxy: Internal generic functions
Method, rollback: Exported generic functions
Method, rollback: Exported generic functions
Method, select-list: Exported generic functions
Method, select-one: Exported generic functions
Method, sql-execute: Internal generic functions
Method, sql-execute: Internal generic functions
Method, update-one: Exported generic functions

P
parse: Exported functions
proxy: Internal generic functions
proxy: Internal generic functions

R
rollback: Exported generic functions
rollback: Exported generic functions
rollback: Exported generic functions

S
select: Exported macros
select-list: Exported generic functions
select-list: Exported generic functions
select-one: Exported generic functions
select-one: Exported generic functions
sql-cond: Exported macros
sql-execute: Internal generic functions
sql-execute: Internal generic functions
sql-execute: Internal generic functions
sql-set: Exported functions
sql-where: Exported functions

T
trim-first-and-or: Internal functions
trim-last-comma: Internal functions

U
update: Exported macros
update-one: Exported generic functions
update-one: Exported generic functions

Jump to:   (  
C   D   F   G   L   M   P   R   S   T   U  

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

A.3 Variables

Jump to:   C   P   S  
Index Entry  Section

C
connection: Internal classes

P
proxy: Internal classes

S
Slot, connection: Internal classes
Slot, proxy: Internal classes

Jump to:   C   P   S  

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

A.4 Data types

Jump to:   <  
B   C   P   S  
Index Entry  Section

<
<sql-session-dbi-cp>: Internal classes
<sql-session-dbi>: Internal classes
<sql-session>: Internal classes

B
batis: The batis system
batis: The batis package
batis-asd: The batis-asd package
batis.datasource: The batis<dot>datasource package
batis.dbi: The batis<dot>dbi package
batis.macro: The batis<dot>macro package
batis.sql: The batis<dot>sql package
batis.sqlparser: The batis<dot>sqlparser package

C
cl-batis: The cl-batis system
cl-batis-asd: The cl-batis-asd package
Class, <sql-session-dbi-cp>: Internal classes
Class, <sql-session-dbi>: Internal classes
Class, <sql-session>: Internal classes

P
Package, batis: The batis package
Package, batis-asd: The batis-asd package
Package, batis.datasource: The batis<dot>datasource package
Package, batis.dbi: The batis<dot>dbi package
Package, batis.macro: The batis<dot>macro package
Package, batis.sql: The batis<dot>sql package
Package, batis.sqlparser: The batis<dot>sqlparser package
Package, cl-batis-asd: The cl-batis-asd package

S
System, batis: The batis system
System, cl-batis: The cl-batis system

Jump to:   <  
B   C   P   S