Data
Information
These methods are accessible through env.data()
, profile.data()
and wallet.data()
which expose a DataRepository
instance.
Get a list of all stored data
1profile.data().all();
Get the first stored data item
1profile.data().first();
Get the last stored data item
1profile.data().last();
Get a list of all stored data keys
1profile.data().keys();
Get a list of all data values
1profile.data().values();
Get the value for the given key
1profile.data().get("theme");
Fill the data with the provided key-value pairs
1profile.data().fill(profileData);
Check if a data for the given key exists
1profile.data().has("theme");
Check if a data for the given key is missing
1profile.data().missing("theme");
Forget the value for the given key
1profile.data().forget("theme");
Forget the value for the given key and index
1profile.data().forgetIndex("theme", 1);
Forget all data (Use with caution!)
1profile.data().flush();
Get the count of the stored data
1profile.data().count();
Take a snapshot of the current data (Use with caution!)
1profile.data().snapshot();
Restore a previously taken snapshot (Use with caution!)
1profile.data().restore();
Return the data as a JSON object
1profile.data().toJson();
Last updated 2 years ago
Edit Page