User:Ravenhurst Xeno
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
LSL Database
These programs comprise LSLBase, an entirely LSL based database system. With an appropriate hashing function, it should be able to easily handle 25,000 entries and/or 1 MB of data.
The LSLBase components do nothing on their own but are designed to be a basic key/value database backend for
one or more client scripts. All the database component scripts and the client scripts are contained within a
prim and the client script(s) communicate with the database through llMessageLinked().
There LSLBase has several different components:
DB |
This is the core database module. It can be used standalone by a client script or ganged together through DBMeta. |
DBMeta |
DBMeta is a multiple DB script controller that lets a client script gang together more than one core DB script for expanded data storage. |
DBSort |
DBSort is the sorting module that lets the client sort the data of one or more core DB scripts |
DBTest |
Interactive testing module to test the other components. |
Using LSLBase
The client script(s) and the LSLbase component script(s) are placed in the same prim. The client communicates with the database components through link messages: <lsl>
llMessageLinked( LINK_THIS, MsgId, DBCommand, Caller );
</lsl>
LINK_THIS |
All components are in the same prim |
|||||
MsgId |
The client program can set this to an arbitrary value and responses from the database components will have the same message id. |
|||||
DBCommand |
The command to the database. It is of the form: Target|command[|operand][|operand...] Each part of the command text is separated from the next by the '|' character.
|
|||||
operand |
Many commands take one or more operand. Operands are separated by '|' characters so only the final operand to a command can actually contain a '|' character. |