Project-specific lists storage.

Note: Do not use spaces in any IDs or key names. Entity IDs are shared with other storage IDs.

Constructor

new (srv:Server, p:String, id:Int)

Methods

getObject (id:String, index:Int):Dynamic

Returns an object by index from the project storage list.

Parameters:

id

Storage entity ID.

index

List index. Can be negative, counting from the list end.

Returns:

Anonymous object value. Returns null if the list is empty or does not exist.

length (id:String):Int

Returns the length of the project storage list.

Parameters:

id

Storage entity ID.

Returns:

List length. Returns zero if the list does not exist.

popObject (id:String):Dynamic

Pops an object item from the end of the project storage list.

Parameters:

id

Storage entity ID.

Returns:

Anonymous object value. Returns null if the list is empty or does not exist.

popString (id:String):String

Pops a string item from the end of the project storage list.

Parameters:

id

Storage entity ID.

Returns:

Value string.

pushObject (id:String, val:Dynamic):Void

Pushes a serialized object item to the start of the given project storage list.

Parameters:

id

Storage entity ID.

val

Value object. Will be serialized to JSON.

pushString (id:String, val:String):Void

Pushes a string item to the start of the given project storage list.

Parameters:

id

Storage entity ID.

val

Value string.

trim (id:String, size:Int):Void

Trims the given project storage list to a given size.

Parameters:

id

Storage entity ID.

size

Maximum list size.