Example ObjectRepository attachLibrarian 001

 

 

Description

Once the librarian Lambda is attached to the ObjectRepository, all new function calls originally meant to open the ObjectRepository will return the librarian Lambda, not the ObjectRepository. When the new function creates the ObjectRepository, the ObjectRepository itself will be stored in the Lambda's persistent variable named: myOR. Whenever the ObjectRepository is open, the ObjectRepository index (always a Directory object) will be stored in the Lambda's persistent variable named: myIndex. The librarian Lambda may change the number and/or meaning of all remaining arguments. Each librarian Lambda must have the following form:

 

Details

The new function will call this entry point.

(defun aLibrarian(aGor)
Pvars: (myIndex myOR myResident myParent)
Returns: ---
... Returns: ---
... Returns: ---

Receive abortTransaction function calls here.

(defun abortTrans() ...) Returns: ---

Receive beginTransaction function calls here.

(defun beginTrans()...) Returns: ---

Receive commitTransaction function calls here.

(defun commitTrans()...) Returns: ---

Manage clear function calls here.

(defun doClear() ...) Returns: ---

Receive length function calls here.

(defun len() ...) Returns: ---
... Returns: ---
... Returns: ---

Receive ref one index function calls here.

(defun ref1(ix1) ...) Returns: ---

Receive ref two index function calls here.

(defun ref2(ix1) ...) Returns: ---

Receive ref three index function calls here.

(defun ref3(ix1) ...) Returns: ---

Receive set one index function calls here.

(defun set1(ix1) ...) Returns: ---

Receive set two index function calls here.

(defun set2(ix1) ...) Returns: ---

Receive set three index function calls here.

(defun set3(ix1) ...) Returns: ---
... Returns: ---
... Returns: ---

Save the Parent Lambda at new or attach time.

(setq myParent (myself)) Returns: ---

Set false if the Lambda is NOT to reside on disk.

(setq myResident false) Returns: ---

end aLibrarian

) Returns: ---

Notes and Hints

A librarian Lambda completely controls how an ObjectRepository is viewed by the other intelligent Lambdas, end users, and by Analytic Information Server. Normally an ObjectRepository has a simple associative memory database schema, but attaching a librarian Lambda can give the ObjectRepository an entirely different database schema (see the detachLibrarian function for removal of a librarian Lambda).

Hint: The ObjectRepository will place its Repository Index (always a Directory object) in the Lambda's persistent variable myIndex. If the ObjectRepository is not open, the Lambda's myIndex variable will be set to #void; otherwise myIndex will point to the ObjectRepository Repository Index

 

Related Examples

Here are examples of the attachLibrarian function at work.

ObjectRepository attachLibrarian 001

 

Function Links

Here is the link to the current function used in this example.

attachLibrarian

Here are a number of links to other related functions.

detachLibrarian(#void) refLibrarian(#void) new(#void)

 

Argument Types

Here are the links to the data types of the arguments used in this example.

ObjectRepository

Here are a number of links to examples having similar argument types.

ObjectRepository abortTransaction 001 ObjectRepository addMethod 026 ObjectRepository attachLibrarian 001 ObjectRepository beginTransaction 001
ObjectRepository checkPointTransaction 001 ObjectRepository clear 002 ObjectRepository commitTransaction 001 ObjectRepository compare 021
ObjectRepository compare 022 ObjectRepository compareEQ 021 ObjectRepository compareEQ 022 ObjectRepository compareGE 021
ObjectRepository compareGE 022 ObjectRepository compareGT 021 ObjectRepository compareGT 022 ObjectRepository compareLE 021
ObjectRepository compareLE 022 ObjectRepository compareLT 021 ObjectRepository compareLT 022 ObjectRepository compareNE 021
ObjectRepository compareNE 022 ObjectRepository comparison 021 ObjectRepository comparison 022 ObjectRepository defmethod 023
ObjectRepository delete 013 ObjectRepository detachLibrarian 001 ObjectRepository exportTab 001 ObjectRepository importTab 001
ObjectRepository inspect 002 ObjectRepository isIdentical 019 ObjectRepository isImmediate 001 ObjectRepository length 016
ObjectRepository loadRepository 001 ObjectRepository methodsOf 023 ObjectRepository new 014 ObjectRepository ref 030
ObjectRepository ref 031 ObjectRepository ref 032 ObjectRepository ref 033 ObjectRepository ref 034
ObjectRepository refLibrarian 001 ObjectRepository rename 001 ObjectRepository saveImmediate 001 ObjectRepository saveRepository 001
ObjectRepository send 026 ObjectRepository setf 001 ObjectRepository setf 002 ObjectRepository setq 027
ObjectRepository sizeof 027 ObjectRepository type 024

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE