Class Persistent-Effective-Slot-Definition

Class for persistent effective slot definitions.

Part of:

package cl-perec, class persistent-association-end-effective-slot-definition, class persistent-slot-definition

Direct Superclass

persistent-slot-definitionBase class for both persistent direct and effective slot definitions.

Direct Subclass

persistent-association-end-effective-slot-definition

Slot

always-checked-type
When type-check is :always then this type will be checked whenever a new value is set during the transaction.
Initform:(compute-as* nil (compute-always-checked-type -self-)), Initargs::always-checked-type; Accessors:always-checked-type-of; Type:list.
cache
All prefetched slots are cached slots but the opposite may not be true. When a cached slot is loaded it's value will be stored in the CLOS instance for fast subsequent read operations. Also whenever a cached slot is set the value will be remembered. The default cached slot semantics can be overriden on a per direct slot basis.
Initargs::cache; Accessors:cache-p; Type:boolean.
columns
The list of RDBMS columns which will be queried or updated to get and set the data of this slot.
Initform:(compute-as* nil (compute-columns -self-)), Initargs::columns; Accessors:columns-of; Type:list.
data-table-slot
True means the slot can be loaded from one of the data tables of its class with a where clause matching to the instance's oid.
Initform:(compute-as* nil (compute-data-table-slot-p -self-)), Initargs::data-table-slot; Accessors:data-table-slot-p; Type:boolean.
direct-slots
The list of direct slots definitions used to compute this effective slot during the class finalization procedure.
Initargs::direct-slots; Accessors:direct-slots-of; Type:list.
id-column
This is the id column of the oid reference when appropriarte for the slot type.
Initform:(compute-as* nil (bind ((type (normalized-type-of -self-))) (if (or (persistent-class-type-p type) (set-type-p type)) (first (columns-of -self-))))), Initargs::id-column; Accessors:id-column-of; Type:sql-column.
index
True means the slot value will be indexed in the underlying RDBMS.
Initargs::index; Accessors:index-p; Type:boolean.
initargs
Initargs::initargs; Accessors:slot-definition-initargs.
initfunction
Initargs::initfunction; Accessors:slot-definition-initfunction.
name
Initargs::name; Accessors:slot-definition-name.
normalized-typeInitform:(compute-as* nil (normalized-type-for (slot-definition-type -self-))), Initargs::normalized-type; Accessors:normalized-type-of; Type:list.
prefetch
Prefetched slots are loaded from and stored into the database at once. A prefetched slot must be in a table which can be accessed using a where clause matching to the id of the instance thus it must be in a data table. The default prefetched slot semantics can be overriden on a per direct slot basis.
Initargs::prefetch; Accessors:prefetch-p; Type:boolean.
primary-class
The persistent class which owns the primary table where this slot will be stored.
Initform:(compute-as* nil (compute-primary-class -self-)), Initargs::primary-class; Accessors:primary-class-of; Type:persistent-class.
primary-table-slot
True means the slot can be loaded from the primary table of its class with a where clause matching to the instance's oid.
Initform:(compute-as* nil (compute-primary-table-slot-p -self-)), Initargs::primary-table-slot; Accessors:primary-table-slot-p; Type:boolean.
reader
A one parameter function which transforms RDBMS data received as a list to the corresponding lisp instance. This is present only for data table slots.
Initform:(compute-as* nil (compute-reader -self- (always-checked-type-of -self-))), Initargs::reader; Accessors:reader-of; Type:(or null function).
tableInitform:(compute-as* nil (primary-table-of (t-class-of -self-))), Initargs::table; Accessors:table-of; Type:table.
type-check
On commit type check means that during the transaction the slot may have null and/or unbound value and the type check will be done when the transaction commits.
Initargs::type-check; Accessors:type-check-of; Type:(member always on-commit).
unique
True means the slot value will be enforced to be unique among instances in the underlying RDBMS.
Initargs::unique; Accessors:unique-p; Type:boolean.
writer
A one parameter function which transforms a lisp instance to the corresponding RDBMS data. This is present only for data table slots.
Initform:(compute-as* nil (compute-writer -self- (always-checked-type-of -self-))), Initargs::writer; Accessors:writer-of; Type:(or null function).
writer-function
Accessors:slot-definition-writer-function.

Direct Method

compute-columns
compute-data-table-slot-p
compute-primary-class
compute-primary-table-slot-p
compute-table
propagate-cache-changesPartially invalidate or update the cache to reflect setting the slot of instance to new-value.
sql-slot-boundp
sql-slot-is-null

Other Method

compute-always-checked-type
sql-column-reference-for
sql-column-references-for