Class Persistent-Set

Part of:

package cl-perec, class persistent-object

Default initargs

:persistent → CL-PEREC::*MAKE-PERSISTENT-INSTANCES*

Direct Superclass

persistent-objectBase class for all persistent classes. If this class is not inherited by a persistent class then ...

Slot

oid
Life time unique identifier of the instance which can be remembered and may be used the load the instance later.
Initargs::oid; Accessors:oid-of; Type:(or null oid).
persistent
True means the instance is known to be persistent, false means the instance is known to be transient, unbound means the state is not yet determined. Actually, in the latter case slot-value-using-class will automatically determine whether the instance is in the database or not. Therefore reading the persistent slot will always return either true or false.
Initargs::persistent; Accessors:persistent-p; Type:boolean.
transaction
A reference to the transaction to which this instance is currently attached to or nil.
Initargs::transaction; Accessors:transaction-of.
transaction-event
:created means the instance was created in the current transaction, :modified means the instance was not created but modified in the current transaction. :deleted means the instance was already present at the very beginning but got deleted in the current transaction.
Initargs::transaction-event; Accessors:transaction-event-of; Type:(member nil created modified deleted).

Direct Method

delete-item
empty!Removes all items from the container and returns nil.
empty-pReturns t if there are no items in the container.
insert-itemAdds item to the container
iterate-itemsApplies function to each item in the persistent container.
list-ofReturns a non lazy list of items present in the persistent collection.
search-for-itemHunt for the item in the container. Key and Test
are as in member.
setflist-ofReturns a non lazy list of items present in the persistent collection.
sizeReturns the number of items currently in the container.

Other Method

cache-instanceAttaches an instance to the current transaction. The instance must be already present in the data...
collect-persistent-object-literals
initialize-revived-instanceWhen a revived instance is initialized slots marked with initialize-revived-slot-p will be passed...
load-instanceLoads an instance with the given oid and attaches it with the current transaction if not yet atta...
lock-instanceLock instance in the current transaction. If wait is false and the instance cannot be locked then...
make-persistent-using-class
make-transient-using-class
propagate-cache-changesPartially invalidate or update the cache to reflect setting the slot of instance to new-value.
purge-instancePurges the given instance without respect to associations and references to it.
value->sql-literal