The cl-yesql Reference Manual

Table of Contents

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

The cl-yesql Reference Manual

This is the cl-yesql Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Dec 02 09:55:05 2019 GMT+0.


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

1 Introduction

CL-Yesql is a Common Lisp library for using SQL, based on Clojure’s Yesql. SQL statements live in their own files, in SQL syntax, and are imported into Lisp as functions. You are not limited to the features a DSL supports, and you can make use of SQL support in your preferred editor, or any other tools that works with SQL syntax.

CL-Yesql is built on top of Vernacular, a framework for embedding languages in Common Lisp. Different backends (Postgres, SQLite) are provided as different Vernacular languages. Before you can use CL-Yesql, you will need to load the system that provides the particular language you need. E.g. cl-yesql/postmodern for Postgres, or cl-yesql/sqlite SQLite.

Besides being useful in itself, this library also serves as a demonstration of writing languages for Vernacular.

Syntax

SQL files

SQL statements are defined in separate files.

Each SQL statements is defined in at least two lines:

  1. The name of the function.
  2. Optionally, a docstring.
  3. One or more lines representing the SQL statement itself.

Statements are separated by spaces.

-- name: uptime
-- Get the database uptime.
SELECT pg_postmaster_start_time()

-- name: live-dead-tuples
-- Return the number of live and dead tuples in each table.
SELECT relname, n_live_tup, n_dead_tup FROM pg_stat_user_tables

Importing

Importing from Yesql files is done in the usual way for Vernacular. That looks like this:

;; Import everything from a file.
(yesql:import my-queries
  :from "sql/queries.sql"
  :as :cl-yesql/postmodern
  :binding :all-functions)

;; Importing individual functions.
(yesql:import my-queries
  :from "sql/queries.sql"
  :as :cl-yesql/postmodern
  :binding (#'uptime #'live-dead-tuples))

To find your files, CL-Yesql looks for a system with the same name as the current package. If it cannot find your files, you may need to use overlord:set-package-base to tell it where to look.

Note that paths are relative to the base of the system, not the current file.

Note also that the :cl-yesql/postmodern system must be loaded before the above code is compiled.

Parameters

Parameters can be positional parameters or keyword parameters. You can use both positional and keyword parameters in the same statement.

Keyword parameters start with a colon.

-- name: users-by-country
-- Counts the users in a given country.
SELECT count(*) AS count
FROM user
WHERE country_code = :country_code

Positional parameters use ? as a placeholder.

-- name: young-users-by-country
SELECT *
FROM user
WHERE (
  country_code = ?
  OR
  country_code = ?
)
AND age < :max_age

While the exact signature of the generated Lisp functions depends on the language (Postmodern does not require passing in the database connection, for example, while SQLite does), you provide positional arguments and keyword arguments as you would to any Lisp function.

(users-by-country :country-code "USA")

(young-user-names-by-country "GB" "US" :max-age 18)

Affixes

For simple cases, CL-Yesql looks at the function name to understand what it does, based on its affixes: fn! returns nothing, fn<! returns the last ID, fn? returns a boolean, and count-fn returns a number.

-- name: hide-article!
-- Returns nothing.
INSERT INTO hidden_article (user_id, article_id) VALUES (?, ?)
    ON CONFLICT DO NOTHING

-- name: create-person<!
-- Returns the ID of the new record.
INSERT INTO person (name) VALUES (:name)

-- name: article-hidden?
-- Returns a single value.
SELECT EXISTS (
    SELECT 1 FROM hidden_article
    WHERE user_id = ?
        AND article_id = ?)

-- name: count-items-stored
-- Returns a single value.
SELECT reltuples FROM pg_class WHERE relname = 'item'

Annotations

Affixes, while useful, are a limited solution. CL-Yesql also lets you annotate a function definition with exactly what the function returns.

-- name: user-count @single
-- Counts all the users.
SELECT count(*) AS count
FROM user

-- name: young-user-names-by-country @column
SELECT name
FROM user
WHERE (
  country_code = ?
  OR
  country_code = ?
)
AND age < :max_age

The full list of annotations:

Annotation | Meaning ---------- | ------- @rows | default, a list of lists @row | one row, a list @values | one row as multiple values @column | one column, a list @single | a single value @execute | no return value (same as !) @last-id | ID of the last row inserted (same as <!) @setter | A setf function.

Setters

Yesql can be used to define setf functions using the @setter annotation:

-- name: user-age @single
SELECT age FROM user WHERE name = ?

-- name: user-age @setter
UPDATE user SET age = ? where name = ?

When you use :all-functions, setters sharing the same name as a function (like user-age above) are imported along with their namesakes.

Setters can be explicitly imported using a slightly different syntax:

(yesql:import user-queries
  :from "sql/users.sql"
  :as :cl-yesql/sqlite
  :binding (#'user-age #’(setf user-age))

(yesql:import user-queries
  :from "sql/users.sql"
  :binding :all-setters)

Using :all-setters imports all the setters, and only the setters. This can be useful if you define setters without equivalent readers. It can still be combined with :all-functions:

(yesql:import user-queries
  :from "sql/users.sql"
  :binding (:all-functions :all-setters))

A setter must have at least one positional argument. When using setters, be careful to make sure that the positional arguments are in the right order, so the value argument comes first. (This is the natural order when using UPDATE.)

Whitelists

Sometimes you want to define a query that is a trivial variation of another query.

-- name: user-names-asc
SELECT name FROM user_name ORDER BY name ASC

-- name: user-names-desc
SELECT name FROM user_name ORDER BY name DESC

Obviously it would be better if you could define these as one query with a parameter. No SQL database, however, lets you pass ASC and DESC as parameters. The same goes for column names, table names, etc.

Our solution to this problem is to allow specifying a parameter with a whitelist. The whitelist consists of a set of comma-separated options appearing directly after a parameter.

-- name: user-names
SELECT name FROM user_name ORDER BY name :order{ASC,DESC}

This gives you the flexibility to define multiple queries in a single function without opening the door to SQL injection.

Languages

The Postgres language

Support for Postgres is provided by the package :cl-yesql/postmodern, provided by the system of the same name. Obviously it builds on the Postmodern library.

The Postmodern language implicitly prepares (using postmodern:prepare) all queries when the Yesql file is loaded. It is not necessary to do anything else to prepare them.

The SQLite languages

Support for SQLite is provided through two languages, with different semantics.

Simple SQLite

For querying from an SQLite database, and for discrete inserts and updates, the right language to use is :cl-yesql/sqlite, provided by the system of the same name.

Note that (unlike for the Postmodern language) functions exported by the SQLite language expect a database handle as their first argument.

Prepared SQLite

The language :cl-yesql/sqlite-prepared is designed for efficient bulk inserts. The functions exported by the prepared SQLite language are not intended for direct use. Instead, they return templates for use with cl-yesql/sqlite-prepared:with-prepared-statement.

(yesql:import sqlite-prepared
  :from "sql/sqlite.sql"
  :as :cl-yesql/sqlite-prepared
  :values (#'record-kv))

(defun save-kv-data (db plist)
  (sqlite:with-transaction db
    (cl-yesql/sqlite-prepared:with-prepared-statement
        (record #'record-kv db)
      (doplist (k v data)
        (record :key (string k) :value v)))))

The language :cl-yesql/sqlite-prepared is provided by the system of the same name.

Other languages?

If you want to add another SQL backend to Yesql, I suggest you begin by looking over one of the existing implementations. The SQLite integration is the simplest. Essentially all you need to do is to define a package to serve as the language and, in that package, create an appropriate binding for defquery.


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-yesql

Author

Paul M. Rodriguez <pmr@ruricolist.com>

License

MIT

Description

Common Lisp library for using SQL.

Defsystem Dependency

asdf-package-system

Dependency

cl-yesql/cl-yesql (system)

Source

cl-yesql.asd (file)


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

2.2 cl-yesql/cl-yesql

Author

Paul M. Rodriguez <pmr@ruricolist.com>

License

MIT

Dependencies
Source

cl-yesql.asd (file)

Component

lisp.lisp (file)


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

2.3 cl-yesql/queryfile

Author

Paul M. Rodriguez <pmr@ruricolist.com>

License

MIT

Dependencies
Source

cl-yesql.asd (file)

Component

lisp.lisp (file)


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

2.4 cl-yesql/statement

Author

Paul M. Rodriguez <pmr@ruricolist.com>

License

MIT

Dependencies
Source

cl-yesql.asd (file)

Component

lisp.lisp (file)


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

2.5 cl-yesql/defrule

Author

Paul M. Rodriguez <pmr@ruricolist.com>

License

MIT

Dependency

esrap

Source

cl-yesql.asd (file)

Component

lisp.lisp (file)


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

3 Files

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


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

3.1 Lisp


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

3.1.1 cl-yesql.asd

Location

cl-yesql.asd

Systems

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

3.1.2 cl-yesql/cl-yesql/lisp.lisp

Parent

cl-yesql/cl-yesql (system)

Location

cl-yesql.lisp

Packages
Exported Definitions
Internal Definitions

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

3.1.3 cl-yesql/queryfile/lisp.lisp

Parent

cl-yesql/queryfile (system)

Location

queryfile.lisp

Packages

cl-yesql/queryfile

Exported Definitions
Internal Definitions

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

3.1.4 cl-yesql/statement/lisp.lisp

Parent

cl-yesql/statement (system)

Location

statement.lisp

Packages

cl-yesql/statement

Exported Definitions
Internal Definitions

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

3.1.5 cl-yesql/defrule/lisp.lisp

Parent

cl-yesql/defrule (system)

Location

defrule.lisp

Packages

cl-yesql/defrule

Exported Definitions

defrule (macro)


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

4 Packages

Packages are listed by definition order.


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

4.1 cl-yesql

Source

lisp.lisp (file)

Nickname

yesql

Use List
Exported Definitions
Internal Definitions

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

4.2 cl-yesql-user

Source

lisp.lisp (file)


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

4.3 cl-yesql/queryfile

Parser for query files.

Source

lisp.lisp (file)

Use List
Used By List

cl-yesql

Exported Definitions
Internal Definitions

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

4.4 cl-yesql/statement

Parser for statements.

Source

lisp.lisp (file)

Use List
Used By List

cl-yesql

Exported Definitions
Internal Definitions

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

4.5 cl-yesql/defrule

Source

lisp.lisp (file)

Use List

common-lisp

Exported Definitions

defrule (macro)


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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Symbol macros

Symbol Macro: annotations
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Expansion

cl-yesql/queryfile::+storage-for-deflex-var-annotations+


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

5.1.2 Macros

Macro: defrule SYMBOL EXPR &body OPTIONS

Don’t permit rules using inherited symbols.

Package

cl-yesql/defrule

Source

lisp.lisp (file)


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

5.1.3 Functions

Function: build-query-tree QUERY FUN

Call FUN on each concrete expansion of QUERY.

E.g., if QUERY has single parameter with a whitelist with three possible expansions, then FUN will be called on each of the three possible versions of QUERY. If there is a second parameter with two expansions, then FUN will be called on each of six (=2*3) possible expansions.

Package

cl-yesql

Source

lisp.lisp (file)

Function: copy-query QUERY1 &key NAME ANNOTATION DOCSTRING STATEMENT

Copy an instance of QUERY, optionally overriding some or all of its slots.

Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Function: lispify-sql-id ID &key PACKAGE
Package

cl-yesql/statement

Source

lisp.lisp (file)

Function: need ARG

Shorthand for alexandria:required-argument.

Package

cl-yesql

Source

lisp.lisp (file)

Function: parse-queries S
Package

cl-yesql

Source

lisp.lisp (file)

Function: query NAME ANNOTATION DOCSTRING STATEMENT
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Function: query-annotation INSTANCE
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Function: query-args Q
Package

cl-yesql

Source

lisp.lisp (file)

Function: query-docstring INSTANCE
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Function: query-id Q
Package

cl-yesql

Source

lisp.lisp (file)

Function: query-name INSTANCE
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Function: query-statement INSTANCE
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Function: query-vars QUERY
Package

cl-yesql

Source

lisp.lisp (file)

Function: read-module SOURCE STREAM
Package

cl-yesql

Source

lisp.lisp (file)

Function: var-offset Q PARAM
Package

cl-yesql

Source

lisp.lisp (file)

Function: yesql-reader PATH STREAM
Package

cl-yesql

Source

lisp.lisp (file)

Function: yesql-static-exports FILE
Package

cl-yesql

Source

lisp.lisp (file)


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

5.1.4 Generic functions

Generic Function: parameter-var OBJECT
Package

cl-yesql/statement

Methods
Method: parameter-var (NAMED-PARAMETER named-parameter)

automatically generated reader method

Source

lisp.lisp (file)

Generic Function: parameter-whitelist OBJECT
Package

cl-yesql/statement

Methods
Method: parameter-whitelist (PARAMETER parameter)

automatically generated reader method

Source

lisp.lisp (file)

Generic Function: parse-query S
Package

cl-yesql

Methods
Method: parse-query (P pathname)
Source

lisp.lisp (file)

Method: parse-query (S string)
Source

lisp.lisp (file)

Generic Function: positional? PARAM
Package

cl-yesql/statement

Source

lisp.lisp (file)

Methods
Method: positional? (PARAM parameter)
Method: positional? (PARAM placeholder-parameter)

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

5.1.5 Conditions

Condition: too-many-placeholders ()
Package

cl-yesql/statement

Source

lisp.lisp (file)

Direct superclasses

error (condition)

Direct slots
Slot: statement
Initargs

:statement


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

5.1.6 Structures

Structure: query ()
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Direct superclasses

%read-only-struct (structure)

Direct methods
  • constructor-values/generic (method)
  • %constructor= (method)
  • make-load-form (method)
  • read-only-struct-slot-names (method)
  • print-object (method)
Direct slots
Slot: name
Type

string

Initform

(alexandria.1.0.0:required-argument (quote cl-yesql/queryfile:name))

Readers

query-name (function)

Writers

(setf query-name) (function)

Slot: annotation
Type

cl-yesql/queryfile:annotation

Initform

(alexandria.1.0.0:required-argument (quote cl-yesql/queryfile:annotation))

Readers

query-annotation (function)

Writers

(setf query-annotation) (function)

Slot: docstring
Type

string

Initform

(alexandria.1.0.0:required-argument (quote cl-yesql/queryfile::docstring))

Readers

query-docstring (function)

Writers

(setf query-docstring) (function)

Slot: statement
Type

list

Initform

(alexandria.1.0.0:required-argument (quote cl-yesql/queryfile::statement))

Readers

query-statement (function)

Writers

(setf query-statement) (function)


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

5.1.7 Classes

Class: parameter ()
Package

cl-yesql/statement

Source

lisp.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: whitelist
Type

list

Initargs

:whitelist

Readers

parameter-whitelist (generic function)

Direct Default Initargs
InitargValue
:whitelistnil

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

5.1.8 Types

Type: annotation ()
Package

cl-yesql/queryfile

Source

lisp.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Constants

Constant: +storage-for-deflex-var-annotations+
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Constant: +storage-for-deflex-var-no-docs+
Package

cl-yesql

Source

lisp.lisp (file)

Constant: +storage-for-deflex-var-no-docs+
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Constant: +storage-for-deflex-var-positional-args+
Package

cl-yesql/statement

Source

lisp.lisp (file)


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

5.2.2 Symbol macros

Symbol Macro: no-docs
Package

cl-yesql

Source

lisp.lisp (file)

Expansion

cl-yesql::+storage-for-deflex-var-no-docs+

Symbol Macro: no-docs
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Expansion

cl-yesql/queryfile::+storage-for-deflex-var-no-docs+

Symbol Macro: positional-args
Package

cl-yesql/statement

Source

lisp.lisp (file)

Expansion

cl-yesql/statement::+storage-for-deflex-var-positional-args+


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

5.2.3 Functions

Function: check-query-expanded QUERY
Package

cl-yesql

Source

lisp.lisp (file)

Function: ensure-trailing-newline S
Package

cl-yesql

Source

lisp.lisp (file)

Function: handle-placeholders ORIG-STATEMENT
Package

cl-yesql/statement

Source

lisp.lisp (file)

Function: has-whitelist? PARAM
Package

cl-yesql

Source

lisp.lisp (file)

Function: invalid-string STRING WHITELIST
Package

cl-yesql

Source

lisp.lisp (file)

Function: name-affix NAME
Package

cl-yesql/queryfile

Source

lisp.lisp (file)

Function: print-sql X S
Package

cl-yesql

Source

lisp.lisp (file)

Function: query-keyword-vars QUERY
Package

cl-yesql

Source

lisp.lisp (file)

Function: query-positional-vars QUERY
Package

cl-yesql

Source

lisp.lisp (file)

Function: query-spec Q
Package

cl-yesql

Source

lisp.lisp (file)

Function: query-var-default QUERY VAR
Package

cl-yesql

Source

lisp.lisp (file)

Function: query-whitelist-parameters QUERY
Package

cl-yesql

Source

lisp.lisp (file)

Function: statement-keyword-vars STATEMENT
Package

cl-yesql

Source

lisp.lisp (file)

Function: statement-positional-vars STATEMENT
Package

cl-yesql

Source

lisp.lisp (file)

Function: statement-vars STATEMENT
Package

cl-yesql

Source

lisp.lisp (file)

Function: string->annotation STRING
Package

cl-yesql/queryfile

Source

lisp.lisp (file)


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

5.2.4 Conditions

Condition: string-not-in-whitelist ()
Package

cl-yesql

Source

lisp.lisp (file)

Direct superclasses

error (condition)

Direct slots
Slot: string
Initargs

:string

Slot: whitelist
Initargs

:whitelist


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

5.2.5 Classes

Class: anonymous-placeholder ()
Package

cl-yesql/statement

Source

lisp.lisp (file)

Direct superclasses

placeholder-parameter (class)

Class: keyword-parameter ()
Package

cl-yesql/statement

Source

lisp.lisp (file)

Direct superclasses

named-parameter (class)

Class: named-parameter ()
Package

cl-yesql/statement

Source

lisp.lisp (file)

Direct superclasses

parameter (class)

Direct subclasses
Direct methods
Direct slots
Slot: var
Type

symbol

Initargs

:var

Initform

(alexandria.1.0.0:required-argument :var)

Readers

parameter-var (generic function)

Class: named-placeholder ()
Package

cl-yesql/statement

Source

lisp.lisp (file)

Direct superclasses
Class: placeholder-parameter ()
Package

cl-yesql/statement

Source

lisp.lisp (file)

Direct superclasses

parameter (class)

Direct subclasses
Direct methods

positional? (method)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-yesql.asd: The cl-yesql․asd file
cl-yesql/cl-yesql/lisp.lisp: The cl-yesql/cl-yesql/lisp․lisp file
cl-yesql/defrule/lisp.lisp: The cl-yesql/defrule/lisp․lisp file
cl-yesql/queryfile/lisp.lisp: The cl-yesql/queryfile/lisp․lisp file
cl-yesql/statement/lisp.lisp: The cl-yesql/statement/lisp․lisp file

F
File, Lisp, cl-yesql.asd: The cl-yesql․asd file
File, Lisp, cl-yesql/cl-yesql/lisp.lisp: The cl-yesql/cl-yesql/lisp․lisp file
File, Lisp, cl-yesql/defrule/lisp.lisp: The cl-yesql/defrule/lisp․lisp file
File, Lisp, cl-yesql/queryfile/lisp.lisp: The cl-yesql/queryfile/lisp․lisp file
File, Lisp, cl-yesql/statement/lisp.lisp: The cl-yesql/statement/lisp․lisp file

L
Lisp File, cl-yesql.asd: The cl-yesql․asd file
Lisp File, cl-yesql/cl-yesql/lisp.lisp: The cl-yesql/cl-yesql/lisp․lisp file
Lisp File, cl-yesql/defrule/lisp.lisp: The cl-yesql/defrule/lisp․lisp file
Lisp File, cl-yesql/queryfile/lisp.lisp: The cl-yesql/queryfile/lisp․lisp file
Lisp File, cl-yesql/statement/lisp.lisp: The cl-yesql/statement/lisp․lisp file

Jump to:   C   F   L  

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

A.2 Functions

Jump to:   B   C   D   E   F   G   H   I   L   M   N   P   Q   R   S   V   Y  
Index Entry  Section

B
build-query-tree: Exported functions

C
check-query-expanded: Internal functions
copy-query: Exported functions

D
defrule: Exported macros

E
ensure-trailing-newline: Internal functions

F
Function, build-query-tree: Exported functions
Function, check-query-expanded: Internal functions
Function, copy-query: Exported functions
Function, ensure-trailing-newline: Internal functions
Function, handle-placeholders: Internal functions
Function, has-whitelist?: Internal functions
Function, invalid-string: Internal functions
Function, lispify-sql-id: Exported functions
Function, name-affix: Internal functions
Function, need: Exported functions
Function, parse-queries: Exported functions
Function, print-sql: Internal functions
Function, query: Exported functions
Function, query-annotation: Exported functions
Function, query-args: Exported functions
Function, query-docstring: Exported functions
Function, query-id: Exported functions
Function, query-keyword-vars: Internal functions
Function, query-name: Exported functions
Function, query-positional-vars: Internal functions
Function, query-spec: Internal functions
Function, query-statement: Exported functions
Function, query-var-default: Internal functions
Function, query-vars: Exported functions
Function, query-whitelist-parameters: Internal functions
Function, read-module: Exported functions
Function, statement-keyword-vars: Internal functions
Function, statement-positional-vars: Internal functions
Function, statement-vars: Internal functions
Function, string->annotation: Internal functions
Function, var-offset: Exported functions
Function, yesql-reader: Exported functions
Function, yesql-static-exports: Exported functions

G
Generic Function, parameter-var: Exported generic functions
Generic Function, parameter-whitelist: Exported generic functions
Generic Function, parse-query: Exported generic functions
Generic Function, positional?: Exported generic functions

H
handle-placeholders: Internal functions
has-whitelist?: Internal functions

I
invalid-string: Internal functions

L
lispify-sql-id: Exported functions

M
Macro, defrule: Exported macros
Method, parameter-var: Exported generic functions
Method, parameter-whitelist: Exported generic functions
Method, parse-query: Exported generic functions
Method, parse-query: Exported generic functions
Method, positional?: Exported generic functions
Method, positional?: Exported generic functions

N
name-affix: Internal functions
need: Exported functions

P
parameter-var: Exported generic functions
parameter-var: Exported generic functions
parameter-whitelist: Exported generic functions
parameter-whitelist: Exported generic functions
parse-queries: Exported functions
parse-query: Exported generic functions
parse-query: Exported generic functions
parse-query: Exported generic functions
positional?: Exported generic functions
positional?: Exported generic functions
positional?: Exported generic functions
print-sql: Internal functions

Q
query: Exported functions
query-annotation: Exported functions
query-args: Exported functions
query-docstring: Exported functions
query-id: Exported functions
query-keyword-vars: Internal functions
query-name: Exported functions
query-positional-vars: Internal functions
query-spec: Internal functions
query-statement: Exported functions
query-var-default: Internal functions
query-vars: Exported functions
query-whitelist-parameters: Internal functions

R
read-module: Exported functions

S
statement-keyword-vars: Internal functions
statement-positional-vars: Internal functions
statement-vars: Internal functions
string->annotation: Internal functions

V
var-offset: Exported functions

Y
yesql-reader: Exported functions
yesql-static-exports: Exported functions

Jump to:   B   C   D   E   F   G   H   I   L   M   N   P   Q   R   S   V   Y  

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

A.3 Variables

Jump to:   +  
A   C   D   N   P   S   V   W  
Index Entry  Section

+
+storage-for-deflex-var-annotations+: Internal constants
+storage-for-deflex-var-no-docs+: Internal constants
+storage-for-deflex-var-no-docs+: Internal constants
+storage-for-deflex-var-positional-args+: Internal constants

A
annotation: Exported structures
annotations: Exported symbol macros

C
Constant, +storage-for-deflex-var-annotations+: Internal constants
Constant, +storage-for-deflex-var-no-docs+: Internal constants
Constant, +storage-for-deflex-var-no-docs+: Internal constants
Constant, +storage-for-deflex-var-positional-args+: Internal constants

D
docstring: Exported structures

N
name: Exported structures
no-docs: Internal symbol macros
no-docs: Internal symbol macros

P
positional-args: Internal symbol macros

S
Slot, annotation: Exported structures
Slot, docstring: Exported structures
Slot, name: Exported structures
Slot, statement: Exported conditions
Slot, statement: Exported structures
Slot, string: Internal conditions
Slot, var: Internal classes
Slot, whitelist: Exported classes
Slot, whitelist: Internal conditions
statement: Exported conditions
statement: Exported structures
string: Internal conditions
Symbol Macro, annotations: Exported symbol macros
Symbol Macro, no-docs: Internal symbol macros
Symbol Macro, no-docs: Internal symbol macros
Symbol Macro, positional-args: Internal symbol macros

V
var: Internal classes

W
whitelist: Exported classes
whitelist: Internal conditions

Jump to:   +  
A   C   D   N   P   S   V   W  

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

A.4 Data types

Jump to:   A   C   K   N   P   Q   S   T  
Index Entry  Section

A
annotation: Exported types
anonymous-placeholder: Internal classes

C
cl-yesql: The cl-yesql system
cl-yesql: The cl-yesql package
cl-yesql-user: The cl-yesql-user package
cl-yesql/cl-yesql: The cl-yesql/cl-yesql system
cl-yesql/defrule: The cl-yesql/defrule system
cl-yesql/defrule: The cl-yesql/defrule package
cl-yesql/queryfile: The cl-yesql/queryfile system
cl-yesql/queryfile: The cl-yesql/queryfile package
cl-yesql/statement: The cl-yesql/statement system
cl-yesql/statement: The cl-yesql/statement package
Class, anonymous-placeholder: Internal classes
Class, keyword-parameter: Internal classes
Class, named-parameter: Internal classes
Class, named-placeholder: Internal classes
Class, parameter: Exported classes
Class, placeholder-parameter: Internal classes
Condition, string-not-in-whitelist: Internal conditions
Condition, too-many-placeholders: Exported conditions

K
keyword-parameter: Internal classes

N
named-parameter: Internal classes
named-placeholder: Internal classes

P
Package, cl-yesql: The cl-yesql package
Package, cl-yesql-user: The cl-yesql-user package
Package, cl-yesql/defrule: The cl-yesql/defrule package
Package, cl-yesql/queryfile: The cl-yesql/queryfile package
Package, cl-yesql/statement: The cl-yesql/statement package
parameter: Exported classes
placeholder-parameter: Internal classes

Q
query: Exported structures

S
string-not-in-whitelist: Internal conditions
Structure, query: Exported structures
System, cl-yesql: The cl-yesql system
System, cl-yesql/cl-yesql: The cl-yesql/cl-yesql system
System, cl-yesql/defrule: The cl-yesql/defrule system
System, cl-yesql/queryfile: The cl-yesql/queryfile system
System, cl-yesql/statement: The cl-yesql/statement system

T
too-many-placeholders: Exported conditions
Type, annotation: Exported types

Jump to:   A   C   K   N   P   Q   S   T