The cl-yesql Reference Manual

This is the cl-yesql Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sat Dec 03 20:54:43 2022 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-yesql

Common Lisp library for using SQL.

Author

Paul M. Rodriguez <>

License

MIT

Defsystem Dependency

asdf-package-system (system).

Dependency

cl-yesql/cl-yesql (system).

Source

cl-yesql.asd.


2.2 cl-yesql/cl-yesql

Author

Paul M. Rodriguez <>

License

MIT

Dependencies
Source

cl-yesql.asd.


2.3 cl-yesql/queryfile

Author

Paul M. Rodriguez <>

License

MIT

Dependencies
Source

cl-yesql.asd.


2.4 cl-yesql/defrule

Author

Paul M. Rodriguez <>

License

MIT

Dependency

esrap (system).

Source

cl-yesql.asd.


2.5 cl-yesql/statement

Author

Paul M. Rodriguez <>

License

MIT

Dependencies
  • alexandria (system).
  • serapeum (system).
  • esrap (system).
  • cl-yesql/defrule (system).
  • trivia (system).
Source

cl-yesql.asd.


3 Files

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


3.1 Lisp


3.1.1 cl-yesql/cl-yesql.asd

Source

cl-yesql.asd.

Parent Component

cl-yesql (system).

ASDF Systems

3.1.2 cl-yesql/cl-yesql/file-type.lisp

Source

cl-yesql.asd.

Parent Component

cl-yesql/cl-yesql (system).

Packages
Public Interface
Internals

3.1.3 cl-yesql/queryfile/file-type.lisp

Source

cl-yesql.asd.

Parent Component

cl-yesql/queryfile (system).

Packages

cl-yesql/queryfile.

Public Interface
Internals

3.1.4 cl-yesql/defrule/file-type.lisp

Source

cl-yesql.asd.

Parent Component

cl-yesql/defrule (system).

Packages

cl-yesql/defrule.

Public Interface

defrule (macro).


3.1.5 cl-yesql/statement/file-type.lisp

Source

cl-yesql.asd.

Parent Component

cl-yesql/statement (system).

Packages

cl-yesql/statement.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-yesql/queryfile

Parser for query files.

Source

file-type.lisp.

Use List
  • alexandria.
  • common-lisp.
  • esrap.
  • serapeum.
Used By List

cl-yesql.

Public Interface
Internals

4.2 cl-yesql-user

Source

file-type.lisp.


4.3 cl-yesql

Source

file-type.lisp.

Nickname

yesql

Use List
Public Interface
Internals

4.4 cl-yesql/defrule

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

defrule (macro).


4.5 cl-yesql/statement

Parser for statements.

Source

file-type.lisp.

Use List
  • alexandria.
  • common-lisp.
  • esrap.
  • serapeum.
Used By List

cl-yesql.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Symbol macros

Symbol Macro: annotations
Package

cl-yesql/queryfile.

Source

file-type.lisp.


5.1.2 Macros

Macro: defrule (symbol expr &body options)

Don’t permit rules using inherited symbols.

Package

cl-yesql/defrule.

Source

file-type.lisp.


5.1.3 Ordinary 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

file-type.lisp.

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

file-type.lisp.

Function: lispify-sql-id (id &key package)
Package

cl-yesql/statement.

Source

file-type.lisp.

Function: need (arg)

Shorthand for alexandria:required-argument.

Package

cl-yesql.

Source

file-type.lisp.

Function: parse-queries (s)
Package

cl-yesql.

Source

file-type.lisp.

Function: query (name annotation docstring statement)
Package

cl-yesql/queryfile.

Source

file-type.lisp.

Reader: query-annotation (instance)
Package

cl-yesql/queryfile.

Source

file-type.lisp.

Target Slot

annotation.

Function: query-args (q)
Package

cl-yesql.

Source

file-type.lisp.

Reader: query-docstring (instance)
Package

cl-yesql/queryfile.

Source

file-type.lisp.

Target Slot

docstring.

Function: query-id (q)
Package

cl-yesql.

Source

file-type.lisp.

Reader: query-name (instance)
Package

cl-yesql/queryfile.

Source

file-type.lisp.

Target Slot

name.

Reader: query-statement (instance)
Package

cl-yesql/queryfile.

Source

file-type.lisp.

Target Slot

statement.

Function: query-vars (query)
Package

cl-yesql.

Source

file-type.lisp.

Function: read-module (source stream)
Package

cl-yesql.

Source

file-type.lisp.

Function: var-offset (q param)
Package

cl-yesql.

Source

file-type.lisp.

Function: yesql-reader (path stream)
Package

cl-yesql.

Source

file-type.lisp.

Function: yesql-static-exports (file)
Package

cl-yesql.

Source

file-type.lisp.


5.1.4 Generic functions

Generic Reader: parameter-var (object)
Package

cl-yesql/statement.

Methods
Reader Method: parameter-var ((named-parameter named-parameter))

automatically generated reader method

Source

file-type.lisp.

Target Slot

var.

Generic Reader: parameter-whitelist (object)
Package

cl-yesql/statement.

Methods
Reader Method: parameter-whitelist ((parameter parameter))

automatically generated reader method

Source

file-type.lisp.

Target Slot

whitelist.

Generic Function: parse-query (s)
Package

cl-yesql.

Methods
Method: parse-query ((p pathname))
Source

file-type.lisp.

Method: parse-query ((s string))
Source

file-type.lisp.

Generic Function: positional? (param)
Package

cl-yesql/statement.

Source

file-type.lisp.

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

5.1.5 Standalone methods

Method: make-load-form ((self query) &optional env)
Source

file-type.lisp.

Method: print-object ((object query) stream)
Source

file-type.lisp.

Method: print-object ((self named-parameter) stream)
Source

file-type.lisp.


5.1.6 Conditions

Condition: too-many-placeholders
Package

cl-yesql/statement.

Source

file-type.lisp.

Direct superclasses

error.

Direct slots
Slot: statement
Initargs

:statement


5.1.7 Structures

Structure: query
Package

cl-yesql/queryfile.

Source

file-type.lisp.

Direct superclasses

%read-only-struct.

Direct methods
Direct slots
Slot: name
Type

string

Initform

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

Readers

query-name.

Writers

This slot is read-only.

Slot: annotation
Type

cl-yesql/queryfile:annotation

Initform

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

Readers

query-annotation.

Writers

This slot is read-only.

Slot: docstring
Type

string

Initform

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

Readers

query-docstring.

Writers

This slot is read-only.

Slot: statement
Type

list

Initform

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

Readers

query-statement.

Writers

This slot is read-only.


5.1.8 Classes

Class: parameter
Package

cl-yesql/statement.

Source

file-type.lisp.

Direct subclasses
Direct methods
Direct Default Initargs
InitargValue
:whitelistnil
Direct slots
Slot: whitelist
Type

list

Initargs

:whitelist

Readers

parameter-whitelist.

Writers

This slot is read-only.


5.1.9 Types

Type: annotation ()
Package

cl-yesql/queryfile.

Source

file-type.lisp.


5.2 Internals


5.2.1 Constants

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

cl-yesql/queryfile.

Source

file-type.lisp.

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

cl-yesql/queryfile.

Source

file-type.lisp.

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

cl-yesql.

Source

file-type.lisp.

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

cl-yesql/statement.

Source

file-type.lisp.


5.2.2 Symbol macros

Symbol Macro: no-docs
Package

cl-yesql/queryfile.

Source

file-type.lisp.

Symbol Macro: no-docs
Package

cl-yesql.

Source

file-type.lisp.

Symbol Macro: positional-args
Package

cl-yesql/statement.

Source

file-type.lisp.


5.2.3 Ordinary functions

Function: check-query-expanded (query)
Package

cl-yesql.

Source

file-type.lisp.

Function: ensure-trailing-newline (s)
Package

cl-yesql.

Source

file-type.lisp.

Function: handle-placeholders (orig-statement)
Package

cl-yesql/statement.

Source

file-type.lisp.

Function: has-whitelist? (param)
Package

cl-yesql.

Source

file-type.lisp.

Function: invalid-string (string whitelist)
Package

cl-yesql.

Source

file-type.lisp.

Function: name-affix (name)
Package

cl-yesql/queryfile.

Source

file-type.lisp.

Function: print-sql (x s)
Package

cl-yesql.

Source

file-type.lisp.

Function: query-keyword-vars (query)
Package

cl-yesql.

Source

file-type.lisp.

Function: query-positional-vars (query)
Package

cl-yesql.

Source

file-type.lisp.

Function: query-spec (q)
Package

cl-yesql.

Source

file-type.lisp.

Function: query-var-default (query var)
Package

cl-yesql.

Source

file-type.lisp.

Function: query-whitelist-parameters (query)
Package

cl-yesql.

Source

file-type.lisp.

Function: statement-keyword-vars (statement)
Package

cl-yesql.

Source

file-type.lisp.

Function: statement-positional-vars (statement)
Package

cl-yesql.

Source

file-type.lisp.

Function: statement-vars (statement)
Package

cl-yesql.

Source

file-type.lisp.

Function: string->annotation (string)
Package

cl-yesql/queryfile.

Source

file-type.lisp.


5.2.4 Standalone methods

Method: %constructor= ((o1 query) (o2 query))
Package

serapeum.

Source

file-type.lisp.

Method: constructor-values/generic ((x query))
Package

serapeum.

Source

file-type.lisp.

Method: read-only-struct-slot-names append ((self query))
Package

serapeum.

Source

file-type.lisp.


5.2.5 Conditions

Condition: string-not-in-whitelist
Package

cl-yesql.

Source

file-type.lisp.

Direct superclasses

error.

Direct slots
Slot: string
Package

common-lisp.

Initargs

:string

Slot: whitelist
Initargs

:whitelist


5.2.6 Classes

Class: anonymous-placeholder
Package

cl-yesql/statement.

Source

file-type.lisp.

Direct superclasses

placeholder-parameter.

Class: keyword-parameter
Package

cl-yesql/statement.

Source

file-type.lisp.

Direct superclasses

named-parameter.

Class: named-parameter
Package

cl-yesql/statement.

Source

file-type.lisp.

Direct superclasses

parameter.

Direct subclasses
Direct methods
Direct slots
Slot: var
Type

symbol

Initform

(alexandria:required-argument :var)

Initargs

:var

Readers

parameter-var.

Writers

This slot is read-only.

Class: named-placeholder
Package

cl-yesql/statement.

Source

file-type.lisp.

Direct superclasses
Class: placeholder-parameter
Package

cl-yesql/statement.

Source

file-type.lisp.

Direct superclasses

parameter.

Direct subclasses
Direct methods

positional?.


Appendix A Indexes


A.1 Concepts


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

%
%constructor=: Private standalone methods

B
build-query-tree: Public ordinary functions

C
check-query-expanded: Private ordinary functions
constructor-values/generic: Private standalone methods
copy-query: Public ordinary functions

D
defrule: Public macros

E
ensure-trailing-newline: Private ordinary functions

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

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

H
handle-placeholders: Private ordinary functions
has-whitelist?: Private ordinary functions

I
invalid-string: Private ordinary functions

L
lispify-sql-id: Public ordinary functions

M
Macro, defrule: Public macros
make-load-form: Public standalone methods
Method, %constructor=: Private standalone methods
Method, constructor-values/generic: Private standalone methods
Method, make-load-form: Public standalone methods
Method, parameter-var: Public generic functions
Method, parameter-whitelist: Public generic functions
Method, parse-query: Public generic functions
Method, parse-query: Public generic functions
Method, positional?: Public generic functions
Method, positional?: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, read-only-struct-slot-names: Private standalone methods

N
name-affix: Private ordinary functions
need: Public ordinary functions

P
parameter-var: Public generic functions
parameter-var: Public generic functions
parameter-whitelist: Public generic functions
parameter-whitelist: Public generic functions
parse-queries: Public ordinary functions
parse-query: Public generic functions
parse-query: Public generic functions
parse-query: Public generic functions
positional?: Public generic functions
positional?: Public generic functions
positional?: Public generic functions
print-object: Public standalone methods
print-object: Public standalone methods
print-sql: Private ordinary functions

Q
query: Public ordinary functions
query-annotation: Public ordinary functions
query-args: Public ordinary functions
query-docstring: Public ordinary functions
query-id: Public ordinary functions
query-keyword-vars: Private ordinary functions
query-name: Public ordinary functions
query-positional-vars: Private ordinary functions
query-spec: Private ordinary functions
query-statement: Public ordinary functions
query-var-default: Private ordinary functions
query-vars: Public ordinary functions
query-whitelist-parameters: Private ordinary functions

R
read-module: Public ordinary functions
read-only-struct-slot-names: Private standalone methods

S
statement-keyword-vars: Private ordinary functions
statement-positional-vars: Private ordinary functions
statement-vars: Private ordinary functions
string->annotation: Private ordinary functions

V
var-offset: Public ordinary functions

Y
yesql-reader: Public ordinary functions
yesql-static-exports: Public ordinary functions


A.3 Variables

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

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

A
annotation: Public structures
annotations: Public symbol macros

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

D
docstring: Public structures

N
name: Public structures
no-docs: Private symbol macros
no-docs: Private symbol macros

P
positional-args: Private symbol macros

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

V
var: Private classes

W
whitelist: Public classes
whitelist: Private conditions


A.4 Data types

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

A
annotation: Public types
anonymous-placeholder: Private classes

C
cl-yesql: The cl-yesql system
cl-yesql: The cl-yesql package
cl-yesql-user: The cl-yesql-user package
cl-yesql.asd: The cl-yesql/cl-yesql․asd file
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: Private classes
Class, keyword-parameter: Private classes
Class, named-parameter: Private classes
Class, named-placeholder: Private classes
Class, parameter: Public classes
Class, placeholder-parameter: Private classes
Condition, string-not-in-whitelist: Private conditions
Condition, too-many-placeholders: Public conditions

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

K
keyword-parameter: Private classes

N
named-parameter: Private classes
named-placeholder: Private 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: Public classes
placeholder-parameter: Private classes

Q
query: Public structures

S
string-not-in-whitelist: Private conditions
Structure, query: Public 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: Public conditions
Type, annotation: Public types