Difference between revisions of "LlLinksetDataWrite"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
{{LSL_Function
{{LSL Function/Headless
|default={{{default|}}}
|inject-2=
|summary=The '''llLinksetDataWrite''' and '''llLinksetDataWriteProtected''' functions create or update a '''name:value''' pair in the linkset datastore. If {{LSLP|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 [[Template:LSL_Constants_Linkset_Data|LINKSETDATA_UPDATE]], or [[Template:LSL_Constants_Linkset_Data|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 {{LSLP|name}} plus the length of {{LSLP|value}}.
 
|func=llLinksetDataWrite|sort={{{sort|LinksetDataWrite}}}
|head={{LSL Function/Head
|func_id=|func_sleep=0|func_energy=10.0
|func=llLinksetDataWrite
|return_type=integer
|return_text=success or failure code.
|p1_type=string|p1_name=name|p1_desc=The key of the '''name:value''' pair in the datastore to be updated or created.
|p2_type=string|p2_name=value|p2_desc=The '''value''' of the '''name:value''' pair.
|func_desc=Creates or updates an unprotected '''name:value''' pair from the linkset's datastore.
}}{{LSL_Function/Head
|func_sleep=0.0|func_energy=10.0
|func_sleep=0.0|func_energy=10.0
|func=llLinksetDataWrite
|func=llLinksetDataWriteProtected
|p1_type=string|p1_name=key|p1_desc=The '''key''' of the '''key:value''' pair in the datastore to be updated or created.
|p1_type=string|p1_name=name|p1_desc=The key of the '''name:value''' pair in the datastore to be updated or created.
|p2_type=string|p2_name=value|p2_desc=The '''value''' of the '''key:value''' pair.
|p2_type=string|p2_name=value|p2_desc=The '''value''' of the '''name:value''' pair.
|p3_type=string|p3_name=pass|p3_desc=A pass phrase used to protect the '''name:value''' pair.
|return_type=integer
|return_type=integer
|return_text=success or failure code.
|return_text=success or failure code.
|func_footnote
|func_footnote
|func_desc=The llLinksetDataWrite function creates or updates the '''key:value''' pair in the linkset datastore. If {{LSLP|value}} is an empty string, the pair is deleted.
|func_desc=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 {{LSLP|pass}}.
 
This function returns 0 on success or an error code on failure.
 
When this function is called the [[linkset_data]] event is triggered in all scripts running in the linkset with an action of [[Template:LSL_Constants_Linkset_Data|LINKSETDATA_UPDATE]], or [[Template:LSL_Constants_Linkset_Data|LINKSETDATA_DELETE]] if the pair is deleted.
|func_footnote
|func_footnote
|spec=
|caveats=Protecting a '''name:value''' pair adds an additional 32 bytes to its size in the datastore.
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|key}} plus the length of {{LSLP|value}}.
}}
|caveats
|caveats
|helpers
|helpers
Line 21: Line 38:
{{LSL DefineRow||[[llLinksetDataCountKeys]]|}}
{{LSL DefineRow||[[llLinksetDataCountKeys]]|}}
{{LSL DefineRow||[[llLinksetDataDelete]]|}}
{{LSL DefineRow||[[llLinksetDataDelete]]|}}
{{LSL DefineRow||[[llLinksetDataDeleteProtected]]|}}
{{LSL DefineRow||[[llLinksetDataFindKeys]]|}}
{{LSL DefineRow||[[llLinksetDataFindKeys]]|}}
{{LSL DefineRow||[[llLinksetDataListKeys]]|}}
{{LSL DefineRow||[[llLinksetDataListKeys]]|}}
{{LSL DefineRow||[[llLinksetDataRead]]|}}
{{LSL DefineRow||[[llLinksetDataRead]]|}}
{{LSL DefineRow||[[llLinksetDataReadProtected]]|}}
{{LSL DefineRow||[[llLinksetDataReset]]|}}
{{LSL DefineRow||[[llLinksetDataReset]]|}}
|also_events=
|also_events=

Revision as of 11:47, 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

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 );