Class Db-Class

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.

Part of:

package submarine

Slot

connection-specInitargs::connection-spec; Reader:db-class-connection-spec.
foreign-keys
List of foreign-key slots.
Accessors:db-class-foreign-keys.
indicesInitargs::indices; Reader:db-class-indices.
name
Initargs::name; Accessors:slot-definition-name.
slots
Reader:class-slots.
unfinished-classes
A class allocated slot containing classes for whom not all the constraints could be applied.
Accessors:db-class-unfinished-classes; Allocation:class.
uniqueInitargs::unique; Accessors:unique.
unique-keys
List of slots whose value should be unique.
Accessors:db-class-unique-keys.

Direct Method

apply-foreign-key-constraints
apply-unique-constraints
collect-constraints
create-tableCreate a table whose columns match the fields of
CLASS in the connected database. If CLASS is a s...
database-consistent-with-specificationReturn nothing if TABLE in the connected-p database
meets its specification. Otherwise, throw an ...
remove-finished-classesRemove classes that are already finished from UNFINISHED-CLASSES of CLASS.
try-delayed-constraintsTry to call all the delayed constraints present.

Other Method

slot-namesReturns a list of the names of the slots of a class ~
(including both direct and inherited slots)...