Difference between revisions of "LlLinksetDataWrite"

From Second Life Wiki
Jump to navigation Jump to search
Line 9: Line 9:


The linkset datastore can contain up to 64k of data.  Every pair written to the datastore consumes a number of bytes in the datastore equal to the length of {{LSLP|name}} plus the length of {{LSLP|value}}.
The linkset datastore can contain up to 64k of data.  Every pair written to the datastore consumes a number of bytes in the datastore equal to the length of {{LSLP|name}} plus the length of {{LSLP|value}}.
|constants={{LSL Constants Linkset_Data Returns}}


|func=llLinksetDataWrite|sort={{{sort|LinksetDataWrite}}}
|func=llLinksetDataWrite|sort={{{sort|LinksetDataWrite}}}

Revision as of 12:01, 17 October 2022

Summary

Summary: llLinksetDataWrite, llLinksetDataWriteProtected

The llLinksetDataWrite and llLinksetDataWriteProtected functions create or update a name:value pair in the linkset datastore. If value is an empty string, the pair is deleted.

This function returns 0 on success or an error code on failure.

When these function are called the linkset_data event is triggered in all scripts running in the linkset with an action of LINKSETDATA_UPDATE, or LINKSETDATA_DELETE if the pair is deleted.

The linkset datastore can contain up to 64k of data. Every pair written to the datastore consumes a number of bytes in the datastore equal to the length of name plus the length of value.

llLinksetDataWrite

Function: integer llLinksetDataWrite( string name, string value );

Creates or updates an unprotected name:value pair from the linkset's datastore.
Returns an integer success or failure code.

• string name The key of the name:value pair in the datastore to be updated or created.
• string value The value of the name:value pair.
All Issues ~ Search JIRA for related Bugs

llLinksetDataWriteProtected

Function: integer llLinksetDataWriteProtected( string name, string value, string pass );

Creates or updates an protected name:value pair from the linkset's datastore. Further attempts to read, write or update the name:value pair must use the protected versions of those functions and must supply the same string that was used in pass.
Returns an integer success or failure code.

• string name The key of the name:value pair in the datastore to be updated or created.The key of the name:value pair in the datastore to be updated or created.
• string value The value of the name:value pair.The value of the name:value pair.
• string pass A pass phrase used to protect the name:value pair.
Caveats

Protecting a name:value pair adds an additional 32 bytes to its size in the datastore.

All Issues ~ Search JIRA for related Bugs

Constant Description
LINKSETDATA_OK 0 The name:value pair was written to the datastore.
LINKSETDATA_EMEMORY 1 A name:value pair was too large to write to the linkset datastore.
LINKSETDATA_ENOKEY 2 The name supplied to llLinksetDataWrite was empty.
LINKSETDATA_EPROTECTED 3 The name:value pair has been protected from overwrite in the linkset's datastore.
LINKSETDATA_NOTFOUND 4 The named key could not be found in the linkset's datastore when attempting to delete it.
LINKSETDATA_NOUPDATE 5 The name:value stored in the linkset was not changed by the write operation because the value stored matches the value written.

Examples

Deep Notes

Search JIRA for related Issues

Signature

function integer llLinksetDataWrite( string name, string value );
function integer llLinksetDataWriteProtected( string name, string value, string pass );