![]()
|
attachLibrarian
|
The attachLibrarian function attaches the specified librarian Lambda {anLambda} to the specified
ObjectRepository {aGor}. Once the attachLibrarian function returns, the ObjectRepository is no
longer a simple associative memory. The database schema and the entire behavior of the ObjectRepository is now
completely determined by the attached librarian Lambda. Furthermore, multiple librarian Lambdas may interact,
controlling multiple ObjectRepositories, thus creating very large object databases and/or distributed object
databases. Normally, when an ObjectRepository is opened (see the new function), an ObjectRepository object is
returned to the caller. This ObjectRepository object behaves, as previously described, like a simple associative
memory. However, once a librarian Lambda is attached to an ObjectRepository, when an ObjectRepository is opened
(see the new function), the librarian Lambda object (not the ObjectRepository object) is returned to the
caller. Once attached to the ObjectRepository, the librarian Lambda always resides on disk in the ObjectRepository.
Any Analytic Information Server server opening the ObjectRepository talks with the attached librarian Lambda, not
with the ObjectRepository directly. The librarian Lambda continues to treat the ObjectRepository as a simple
associative memory, but the other intelligent Lambdas, end users, and Analytic Information Server servers see the
ObjectRepository according to the database schema implemented by the attached librarian Lambda. When to use Use the attachLibrarian function to return the result the attached libriarian Lambda and not the Object Repository.
(attachLibrarian aGor anLambda) Determined by the librarian Lambda.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_ObjectRepository_attachLibrarian_001
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:
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types aGor The ObjectRepository whose librarian Lambda is to receive the command string. ObjectRepository anLambda The librarian Lambda to be attached to the ObjectRepository. Lambda
Returns:
Examples
Argument Types
ObjectRepository
Lambda
How do I contact the AIS team?