Storage Block
  • 14 Aug 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Storage Block

  • Dark
    Light
  • PDF

Article Summary

 Storage options are explained as below: 

It is of two types: Session Storage and Persistent Storage. 

  •  Session Storage consists of SetItem, GetItem, RemoveItem, Clear Session.
  •  Persistent Storage consists of GetItem, SetItem, RemoveItem

Session Storage: 


Get Item

   GetItem is used to fetch a particular Key-value placed within a storage variable. 

Input 

Output

Block Layout

Generated Code

Name or Key in Text

Returns the value of any type.

pillirFunctions.

session_storage_get

('key', value)

Set Item

   Set Item is used to set a particular key-value pair to a particular variable. 

Input 

Output

Block Layout

Generated Code

Name or Key  in Text,

 

Value any type

Store the key-value pair to the session storage.

pillirFunctions.

set_session_variable

('key')

Remove Item

   It is used to remove a particular item within the variable placed within the storage block. 

Input 

Output

Block Layout

Generated Code

Name or Key in Text

Remove the key-value pair from session storage using the key.

pillirFunctions.

remove_session_variable

('key')

Clear Session

   It is simply a trigger used to clear a particular session based on time or event trigger. 

Input 

Output

Block Layout

Generated Code

 

Removes all the session storage key-value pairs.

pillirFunctions.

clear_all_session_variable()


Persistent Storage:

This is primarily done for local variables declared within the database.

GetItem

   This block is used to fetch a key-value pair from a local database. 

Input 

Output

Block Layout

Generated Code

Name or Key in Text

Returns the value of any type.

pillirFunctions.

local_storage_get

('key' , value)

SetItem

   This block is used to set a key value to a particular local variable. 

Input 

Output

Block Layout

Generated Code

Name or Key  in Text,

 

Value any type

Store the key-value pair to the local storage.

pillirFunctions.

local_storage_get('key')

RemoveItem

   This block is used to remove the existing key-value of a variable from the local storage. 

Input 

Output

Block Layout

Generated Code

Name or Key in Text

Remove the key-value pair from local storage using the key.

pillirFunctions.

local_storage_remove('key')

Was this article helpful?

ESC

Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses