treedb_activate_snap()
#
Activates a snapshot in the TreeDB, returning the corresponding snapshot tag. The function updates the current state of the database to match the specified snapshot.
Prototype
int treedb_activate_snap(
json_t *tranger,
const char *treedb_name,
const char *snap_name
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
A reference to the TimeRanger instance managing the TreeDB. |
|
|
The name of the TreeDB where the snapshot is stored. |
|
|
The name of the snapshot to activate. |
Return Value
Returns the snapshot tag as an integer if successful, or a negative value if an error occurs.
Notes
Ensure that the snapshot exists before calling treedb_activate_snap()
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples