Class Persistent-Class-T

A temporal slot value is cached in the underlying slot. A time dependent slot value is cached as a values-having-validity object.

Part of:

package cl-perec, class persistent-class

Direct Superclass

persistent-classPersistent class is a class meta instance for classes. Standard defclass forms may be used to def...

Slot

abstract
An abstract persistent class cannot be instantiated but still can be used in associations and may have slots. Calling make-instance on an abstract persistent class will signal an error. On the other hand abstract classes might not have a primary table and thus handling the instances may require simpler or less SQL statements.
Initform:(compute-as* nil nil), Initargs::abstract; Accessors:abstract-p; Type:boolean.
data-tables
All the tables which hold direct data of an instance of this class. This list contains the primary tables of the super persistent classes.
Initform:(compute-as* nil (compute-data-tables -self-)), Initargs::data-tables; Accessors:data-tables-of; Type:list.
depends-on
The list of persistent classes which must be looked at by this class when computing RDBMS meta data. This used to generate columns into other classes' primary tables.
Initform:(compute-as* nil nil), Initargs::depends-on; Accessors:depends-on-of; Type:list.
depends-on-me
The list of persistent classes which must look at this class when computing RDBMS meta data.
Initform:(compute-as* nil nil), Initargs::depends-on-me; Accessors:depends-on-me-of; Type:list.
direct-slots
Reader:class-direct-slots.
direct-superclasses
Reader:class-direct-superclasses.
effective-slots-with-underlying-slot-access
A list of slots that support the underlying-slot-value protocol.
Initform:(compute-as* nil (persistent-effective-slots-of -self-)), Initargs::effective-slots-with-underlying-slot-access; Accessors:effective-slots-with-underlying-slot-access-of; Type:list.
ensure-exported
A persistent class, a persistent association and the related tables must be exported before use. This will automatically happen not later than making, reviving, querying or using by any means the first instance of it.
Initform:(compute-as* nil (export-to-rdbms -self-) -self-), Initargs::ensure-exported; Reader:ensure-exported.
name
Initargs::name; Accessors:slot-definition-name.
non-prefetched-slots
The list of effective slots which will be loaded and stored lazily and separately from other slots.
Initform:(compute-as* nil (remove-if #'prefetch-p (persistent-effective-slots-of -self-))), Initargs::non-prefetched-slots; Accessors:non-prefetched-slots-of; Type:list.
parent-id-columnInitform:(compute-as* nil (id-column-of (parent-slot-of -self-))), Initargs::parent-id-column; Accessors:parent-id-column-of; Type:column.
parent-slotInitform:(compute-as* nil (find-slot (t-class-of -self-) (class-name -self-))), Initargs::parent-slot; Accessors:parent-slot-of; Type:column.
persistent-class-precedence-list
Similar to class-precedence-list but includes only persistent classes.
Initform:(compute-as* nil (list* -self- (persistent-effective-super-classes-of -self-))), Initargs::persistent-class-precedence-list; Accessors:persistent-class-precedence-list-of; Type:list.
persistent-direct-slots
The list of direct slots which are defined to be persistent in this class.
Initform:(compute-as* nil (collect-if (sharpl-expander # (typep !1 'persistent-direct-slot-definition) nil) (standard-direct-slots-of -self-))), Initargs::persistent-direct-slots; Accessors:persistent-direct-slots-of; Type:list.
persistent-direct-sub-classes
The list of persistent direct sub classes.
Initform:(compute-as* nil (collect-if #'persistent-class-p (class-direct-subclasses -self-))), Initargs::persistent-direct-sub-classes; Accessors:persistent-direct-sub-classes-of; Type:list.
persistent-direct-super-classes
The list of persistent direct sub classes.
Initform:(compute-as* nil (collect-if #'persistent-class-p (class-direct-superclasses -self-))), Initargs::persistent-direct-super-classes; Accessors:persistent-direct-super-classes-of; Type:list.
persistent-effective-slot-tsInitform:(compute-as* nil (collect-if (sharpl-expander # (typep !1 'persistent-effective-slot-definition-t) nil) (standard-effective-slots-of -self-))), Initargs::persistent-effective-slot-ts; Accessors:persistent-effective-slot-ts-of; Type:list.
persistent-effective-slots
The list of effective slots which are turned out to be persistent in this class.
Initform:(compute-as* nil (collect-if (sharpl-expander # (typep !1 'persistent-effective-slot-definition) nil) (standard-effective-slots-of -self-))), Initargs::persistent-effective-slots; Accessors:persistent-effective-slots-of; Type:list.
persistent-effective-sub-classes
The list of persistent effective sub classes in no particular order.
Initform:(compute-as* nil (compute-persistent-effective-sub-classes -self-)), Initargs::persistent-effective-sub-classes; Accessors:persistent-effective-sub-classes-of; Type:list.
persistent-effective-super-classes
The list of effective persistent super classes in class precedence order.
Initform:(compute-as* nil (compute-persistent-effective-super-classes -self-)), Initargs::persistent-effective-super-classes; Accessors:persistent-effective-super-classes-of; Type:list.
plist
Initargs:sb-pcl::plist; Accessors:object-plist.
prefetched-slots
The list of effective slots which will be loaded from and stored to the database at once when loading an instance of this class. Moreover when a persistent instance is revived its prefetched slots will be loaded.
Initform:(compute-as* nil (collect-if #'prefetch-p (persistent-effective-slots-of -self-))), Initargs::prefetched-slots; Accessors:prefetched-slots-of; Type:list.
primary-table
The table which holds the oid and the data of the direct slots of this class. If the class is abstract and does not have any persistent direct slots then it will not have a primary table. A primary table if exists contains one and only one record per instance of its persistent class.
Initform:(compute-as* nil (compute-primary-table -self- -current-value-)), Initargs::primary-table; Accessors:primary-table-of; Type:table.
primary-tables
The smallest set of tables which hold all instances and only the instances of this class by having one and only one record per instance. This list may contain functional nodes such as union, append according to the required SQL operation. For classes which have a primary table this list contains only that table while for other classes the list will contain some of the primary tables of the sub persistent classes.
Initform:(compute-as* nil (compute-primary-tables -self-)), Initargs::primary-tables; Accessors:primary-tables-of; Type:list.
prototype
Reader:class-prototype.
slots
Reader:class-slots.
standard-direct-slots
All computed slots that needs the direct slots should use this slot so that invalidation will work.
Initform:(compute-as* nil (class-direct-slots -self-)), Initargs::standard-direct-slots; Accessors:standard-direct-slots-of; Type:list.
standard-effective-slots
All computed slots that needs the effective slots should use this slot so that invalidation will work.
Initform:(compute-as* nil (class-slots -self-)), Initargs::standard-effective-slots; Accessors:standard-effective-slots-of; Type:list.
t-classInitform:(compute-as* nil (t-class-of (slot-definition-class -self-))), Initargs::t-class; Accessors:t-class-of; Type:persistent-class.
t-value-columnInitform:(compute-as* nil (first (columns-of (find-slot (t-class-of -self-) 't-value)))), Initargs::t-value-column; Accessors:t-value-column-of; Type:column.
validity-end-columnInitform:(compute-as* nil (first (columns-of (find-slot (t-class-of -self-) 'validity-end)))), Initargs::validity-end-column; Accessors:validity-end-column-of; Type:column.
validity-start-columnInitform:(compute-as* nil (first (columns-of (find-slot (t-class-of -self-) 'validity-start)))), Initargs::validity-start-column; Accessors:validity-start-column-of; Type:column.

Direct Method

make-persistent-using-class
make-transient-using-class

Other Method

%partial-eval-function-call
backquote-type-syntaxGenerates a type expression that evaluates to the type.
class-name-ofReturns the name of thing's class.
compute-data-tables
compute-persistent-effective-slot-definition-option
compute-persistent-effective-sub-classes
compute-persistent-effective-super-classes
compute-primary-table
compute-primary-tables
compute-reader*
compute-writer*
count-instancesCounts all instances of the given class
export-to-rdbmsExports classes, associations, tables to the database, may create new tables or alter existing on...
make-revived-instanceCreates a new instance representing the given oid as its identity. The instance will not be assoc...
propagate-cache-changesPartially invalidate or update the cache to reflect setting the slot of instance to new-value.
purge-instancesPurges all instances of the given class without respect to associations and references.
simplify-persistent-class-type
slot-namesReturns a list of the names of the slots of a class (including
both direct and inherited slots). ...
sql-alias-forGenerates a table alias for the given ELEMENT. Alias names may be supressed
by setting *SUPRESS-A...
sql-table-reference-for-type*
type-name
value->sql-literal