This is the submarine Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:37:53 2018 GMT+0.
• Systems: | The systems documentation | |
• Files: | The files documentation | |
• Packages: | The packages documentation | |
• Definitions: | The symbols documentation | |
• Indexes: | Concepts, functions, variables and data types |
The main system appears first, followed by any subsystem dependency.
• The submarine system: |
submarine.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files: |
Next: The submarine/package<dot>lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
submarine.asd
submarine (system)
Next: The submarine/conditions<dot>lisp file, Previous: The submarine<dot>asd file, Up: Lisp files [Contents][Index]
Next: The submarine/utilities<dot>lisp file, Previous: The submarine/package<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
submarine (system)
conditions.lisp
Next: The submarine/mop<dot>lisp file, Previous: The submarine/conditions<dot>lisp file, Up: Lisp files [Contents][Index]
conditions.lisp (file)
submarine (system)
utilities.lisp
Next: The submarine/db<dot>lisp file, Previous: The submarine/utilities<dot>lisp file, Up: Lisp files [Contents][Index]
utilities.lisp (file)
submarine (system)
mop.lisp
Next: The submarine/dao<dot>lisp file, Previous: The submarine/mop<dot>lisp file, Up: Lisp files [Contents][Index]
mop.lisp (file)
submarine (system)
db.lisp
Previous: The submarine/db<dot>lisp file, Up: Lisp files [Contents][Index]
db.lisp (file)
submarine (system)
dao.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The submarine-system package: | ||
• The submarine package: |
Next: The submarine package, Previous: Packages, Up: Packages [Contents][Index]
submarine.asd
Previous: The submarine-system package, Up: Packages [Contents][Index]
A very simple quasi-object persistency system built on top of Postmodern.
package.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions: | ||
• Internal definitions: |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros: | ||
• Exported functions: | ||
• Exported generic functions: | ||
• Exported conditions: | ||
• Exported classes: |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Defines a possibly named many-to-many mapping between two
persistent classes. There can be only one unnamed mapping between any
two classes, and any number of named mappings. CLASS*-NAME should be
an (unquoted) symbol with class name.
Defines additional mapping persistent class ‘NAME’ (if ‘NAME’ is
not provided, ‘CLASS1-NAME-CLASS2-NAME’ is used), and for each of
classes, a method that retrieves list of instances of second class
(named like that class or, if the relation is named,
CLASS-NAME-IN-NAME. Mapping class has three slots, ‘CLASS1-NAME’ and
‘CLASS2-NAME’ that hold instances of first and second class, and
‘WEIGHT’ that holds an integer representing the strength of the
relationship. The following functions are available:
* A predicate ‘RELATEDP’, taking a keyword argument ‘RELATION’, which
tells whether two objects are in a relation (if ‘RELATION’ is not
provided, the unnamed relation is assumed). It returns a ‘NAME’ or
‘CLASS1-NAME-CLASS2-NAME’ object. It has an accessor ‘WEIGHT’.
* A function ‘RELATE’ (‘RELATE-IN-NAME’) that establishes a relationship between its two arguments. It takes a key-argument, ‘WEIGHT’, by default 1. The order in which the object arguments are provided is irrelevant. ‘CONNECTION-SPEC’ specifies the connection to be used to create the link table.
Wrapper macro for defining a class inheriting from DAO and with the metaclass set to DB-CLASS.
Make a DAO and immediately save it. Takes the same arguments as (make-instance ((dao dao))).
Execute the given ‘QUERY’ (which can be either a string or a S-SQL expression, which won’t be evaluated) and return the result as daos of the given ‘TYPE’. The names of the fields returned by the query must match the slots of the dao.
Select daos of TYPE for the rows in its table for which the given TEST holds.
Run BODY in an environment with an always pooled connection to the database specified by the DB-CLASS-CONNECTION-SPEC of CLASS.
utilities.lisp (file)
Binds *database* to a new connection and runs body in that scope.
utilities.lisp (file)
Run BODY in an environment with a connection to the database specified by the DB-CLASS-CONNECTION-SPEC of the class of OBJECT.
utilities.lisp (file)
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
Get the dao corresponding to the given primary key, or return nil if it does not exist.
Create a DAO of the given ‘TYPE’ and initialize it according to the values of the alist ‘INITARGS’. ‘Initargs’ may contain additional values, not used in the initialization proccess.
Execute the given ‘QUERY’ (which can be either a string or a S-SQL expression, which will be evaluated) and return the result as daos of the given ‘TYPE’. The names of the fields returned by the query must match the slots of the dao. This is a functional interface for ‘QUERY-DAO’.
Make OBJECT1 and OBJECT2 enter into the many-to-many relation ‘RELATION’. If ‘RELATION’ is not provided, the unnamed relation is assumed.
Tell whether ‘OBJECT1’ and ‘OBJECT2’ are in the many-to-many relation ‘RELATION’ (or the unnamed relation if ‘RELATION’ is not provided).
Functional interface for SELECT-DAO.
SLOT-VALUE if SLOT in OBJECT is not foreign, the ID of the object in the slot otherwise. If the object is not saved, save it.
‘OBJECT1’ stops being with ‘OBJECT2’ in ‘RELATION’.
Next: Exported conditions, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Return a boolean indicating whether the given DAO exists in the database.
T if all the slot-values of ‘LEFT’ and ‘RIGHT’
are the same. If the compared values are not DAO’s, they are
compared using ‘TEST’ (which defaults to ‘EQL’). Otherwise,
they are ‘DAO=’ed, with the same ‘TEST’ argument as specified
in the topmost call of ‘DAO=’. If neither ‘LEFT’ nor ‘RIGHT’
are DAOs, ‘TEST’ is called.
Delete the given dao from the database.
automatically generated reader method
mop.lisp (file)
automatically generated writer method
mop.lisp (file)
Get all objects of TYPE that stand in a many-to-one relation with OBJECT.
Insert the given DAO into the database.
Save a dao: update it when it already exists, insert it otherwise.
Update the DAO’s representation in the database with the values in the given object and return it.
Next: Exported classes, Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
Base class for DAO related errors.
conditions.lisp (file)
simple-error (condition)
table-name (method)
:type
table-name (generic function)
Condition signaling the attempt to initialize a dao with a non-existant ID.
conditions.lisp (file)
dao-error (condition)
id (method)
:id
id (generic function)
Condition signaling that a class with a foreign-key reference to a non-defined class has been tried to be used.
conditions.lisp (file)
dao-error (condition)
Previous: Exported conditions, Up: Exported definitions [Contents][Index]
Base class for any PostgreSQL aware classes.
dao.lisp (file)
standard-object (class)
integer
:id
get-id (generic function)
(setf get-id) (generic function)
Metaclass for PostgreSQL aware classes. It takes
two additional arguments in DEFTABLE: :INDICES (which slots are used
as indices) and :CONNECTION-SPEC, which specifies how the class should
connect to the database (its format is the same as in
POSTMODERN:CONNECT-TOPLEVEL). If :CONNECTION-SPEC is not provided,
SUBMARINE assumes it is a class created just for the sake of
inheritance and does not create any tables for it.
mop.lisp (file)
standard-class (class)
:indices
db-class-indices (generic function)
:unique
db-class-unique (generic function)
:connection-spec
db-class-connection-spec (generic function)
A class allocated slot
containing classes for whom not all the constraints could be
applied.
:class
db-class-unfinished-classes (generic function)
(setf db-class-unfinished-classes) (generic function)
List of foreign-key slots.
db-class-foreign-keys (generic function)
(setf db-class-foreign-keys) (generic function)
List of slots whose value should be unique.
db-class-unique-keys (generic function)
(setf db-class-unique-keys) (generic function)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal functions: | ||
• Internal generic functions: | ||
• Internal conditions: | ||
• Internal classes: |
Next: Internal generic functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Return the list of non-transient, instance allocated slots of a class.
utilities.lisp (file)
List of non-transient, instance allocated slots of OBJECT
utilities.lisp (file)
Slot is transient or its allocation is :CLASS.
utilities.lisp (file)
Functional interface to the macro WITH-CLASS-CONNECTION. the connection will be pooled.
utilities.lisp (file)
Functional interface to the macro WITH-CONNECTION.
utilities.lisp (file)
Functional interface to the macro WITH-OBJECT-CONNECTION.
utilities.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
Add a constraint to this slot’s class’ table.
db.lisp (file)
Create a table whose columns match the fields of
CLASS in the connected database. If CLASS is a symbol, the class it
names is used.
Return nothing if TABLE in the connected-p database
meets its specification. Otherwise, throw an appropriate error. There
must exist a connection to the DATABASE in order to run this
function.
Closures adding constraints
that, for some reason, could not be executed. If there’s a slot with
this attribute not-NIL in a class definition, then there’s something
wrong with its SQL counterpart.
mop.lisp (file)
conditions.lisp (file)
Action to be performed for this slot
when the refering row in the database ceases to exist. Possible
values: :CASCADE, :RESTRICT, :SET-NULL, :SET-DEFAULT. If this slot is
not a foreign key, it does nothing.
mop.lisp (file)
Relate ‘OBJECT1’ with ‘OBJECT2’ in ‘RELATION’.
Tell if ‘OBJECT1’ is related to ‘OBJECT2’ in ‘RELATION’.
Remove classes that are already finished from UNFINISHED-CLASSES of CLASS.
db.lisp (file)
conditions.lisp (file)
If non-NIL, this slot should be treated as transient and ignored in all database related operations.
mop.lisp (file)
Try to call all the delayed constraints present.
‘OBJECT1’ stops being with ‘OBJECT2’ in ‘RELATION’.
Next: Internal classes, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
Condition signaling a missing column in an existing table.
db.lisp (file)
sql-error (condition)
:name
column-name (generic function)
:type
column-type (generic function)
An error symbolizing that there is a column of the right name in the table, but its type is wrong
db.lisp (file)
sql-error (condition)
:name
column-name (generic function)
:needed
needed-type (generic function)
:actual
actual-type (generic function)
Previous: Internal conditions, Up: Internal definitions [Contents][Index]
mop.lisp (file)
mop.lisp (file)
mop.lisp (file)
standard-object (class)
If non-NIL, this slot should be treated as transient and ignored in all database related operations.
:transient
transient-p (generic function)
(setf transient-p) (generic function)
If non-NIL, a NON NULL database constrained will be introduced.
:not-null
not-null-p (generic function)
(setf not-null-p) (generic function)
:foreign
foreign-type-p (generic function)
(setf foreign-type-p) (generic function)
:unique
unique (generic function)
(setf unique) (generic function)
Action to be performed for this slot
when the refering row in the database ceases to exist. Possible
values: :CASCADE, :RESTRICT, :SET-NULL, :SET-DEFAULT. If this slot is
not a foreign key, it does nothing.
:on-delete
:cascade
on-delete (generic function)
(setf on-delete) (generic function)
Closures adding constraints
that, for some reason, could not be executed. If there’s a slot with
this attribute not-NIL in a class definition, then there’s something
wrong with its SQL counterpart.
delayed-constraint (generic function)
(setf delayed-constraint) (generic function)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index: | ||
• Function index: | ||
• Variable index: | ||
• Data type index: |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L S |
---|
Jump to: | F L S |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
A C D F G I M N O Q R S T U W |
---|
Jump to: | (
A C D F G I M N O Q R S T U W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | A C D F I N O S T U |
---|
Jump to: | A C D F I N O S T U |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C D P S U |
---|
Jump to: | C D P S U |
---|