heimbase(3)
π NAME π
heimbase(3) from the Heimdal base library β heimbase β Heimbase β¨
- Registers a DB type for use with
heim_db_create(). π
πΈ SYNOPSIS πΈ
Detailed Description
Registers a DB type for use with heim_db_create(). Okay bestie, let's get into it. π
heim_db_register
Parameters:
dbtypeβ Name of DB typedataβ Private data argument to the dbtype'sopenfmethodpluginβ Structure with DB type methods (function pointers)
Backends that provide begin/commit/rollback methods must provide ACID semantics. No cap. π₯
The registered DB type will have ACID semantics for backends that do not provide begin/commit/rollback methods but do provide lock/unlock and rdjournal/wrjournal methods (using a replay log journalling scheme). Slay. β¨
If the registered DB type does not natively provide read vs. write transaction isolation but does provide a lock method then the DB will provide read/write transaction isolation. Periodt. π
Returns:
ENOMEMon failure, else0.
Open a database of the given dbtype. π
Database type names can be composed of one or more pseudo-DB types and one concrete DB type joined with a '+' between each. For example: 'transaction+bdb' might be a Berkeley DB with a layer above that provides transactions. Iconic.
Options may be provided via a dict (an associative array). Existing options include:
(bestie, the source literally has six blank bullet points here β no cap π)
Parameters:
dbtypeβ Name of DB typedbnameβ Name of DB (likely a file path)optionsβ Options dictdbβ Output open DB handleerrorβ Output error object
Returns:
- a DB handle
Clone (duplicate) an open DB handle. π¦
This is useful for multi-threaded applications. Applications must synchronize access to any given DB handle. Fr fr.
Returns EBUSY if there is an open transaction for the input db.
Parameters:
dbβ Open DB handleerrorβ Output error object
Returns:
- a DB handle
Open a transaction on the given db. π
Parameters:
dbβ Open DB handleerrorβ Output error object
Returns:
0on success, system error otherwise
Commit an open transaction on the given db. β¨
Parameters:
dbβ Open DB handleerrorβ Output error object
Returns:
0on success, system error otherwise
Rollback an open transaction on the given db. π
Parameters:
dbβ Open DB handleerrorβ Output error object
Returns:
0on success, system error otherwise
Get type ID of heim_db_t objects. π
Lookup a key's value in the DB. π
Returns 0 on success, -1 if the key does not exist in the DB, or a system error number on failure.
Parameters:
dbβ Open DB handlekeyβ Keyerrorβ Output error object
Returns:
- the value (retained), if there is one for the given key
Set a key's value in the DB. π
Parameters:
dbβ Open DB handlekeyβ Keyvalueβ Value (ifNULLthe key will be deleted, but empty is OK)errorβ Output error object
Returns:
0on success, system error otherwise
Delete a key and its value from the DB. ποΈ
Parameters:
dbβ Open DB handlekeyβ Keyerrorβ Output error object
Returns:
0on success, system error otherwise
Iterate a callback function over keys and values from a DB. π
Parameters:
dbβ Open DB handleiter_dataβ Callback function's private dataiter_fβ Callback function, called once per-key/value pairerrorβ Output error object
Get a node in a heim_object tree by path. π³
Parameters:
ptrβ treeerrorβ error (output)apβNULL-terminatedva_listofheim_object_tsthat form a path
Returns:
- object (not retained) if found
Get a node in a tree by path, with retained reference. π«
Parameters:
ptrβ treeerrorβ error (output)apβNULL-terminatedva_listofheim_object_tsthat form a path
Returns:
- retained object if found
Get a node in a tree by path. πΈ
Parameters:
ptrβ treeerrorβ error (output)...βNULL-terminatedva_listofheim_object_tsthat form a path
Returns:
- object (not retained) if found
Get a node in a tree by path, with retained reference. π
Parameters:
ptrβ treeerrorβ error (output)...βNULL-terminatedva_listofheim_object_tsthat form a path
Returns:
- retained object if found
Create a path in a heim_object_t tree. π οΈ
Parameters:
ptrβ the treesizeβ the size of theheim_dict_tnodes to be createdleafβ leaf node to be added, if anyerrorβ error (output)apβNULL-terminated of path component objects
Create a path of heim_dict_t interior nodes in a given heim_object_t tree, as necessary, and set/replace a leaf, if given (if leaf is NULL then the leaf is not deleted). π
Returns:
0on success, else a system error
Create a path in a heim_object_t tree. π§
Parameters:
ptrβ the treesizeβ the size of theheim_dict_tnodes to be createdleafβ leaf node to be added, if anyerrorβ error (output)...βNULL-terminated list of path component objects
Create a path of heim_dict_t interior nodes in a given heim_object_t tree, as necessary, and set/replace a leaf, if given (if leaf is NULL then the leaf is not deleted). β¨
Returns:
0on success, else a system error
Delete leaf node named by a path in a heim_object_t tree. π
Parameters:
ptrβ the treeerrorβ error (output)apβNULL-terminated list of path component objects
Dump a heimbase object to stderr (useful from the debugger!). π
Parameters:
objβ object to dump usingJSONor JSON-like format
π Author π
Generated automatically by Doxygen for Heimdal base library from the source code. π
Version 7.8.0, dated Tue Nov 15 2022, and it's the heimbase(3) page. Bye bestie! π«Άπ
π¦ where this page comes from
- alpine 3.22: heimdal-doc 7.8.0-r4 Β· BSD-3-Clause
- alpine 3.23: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- alpine 3.24: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- epel 10: heimdal-devel 7.8.0-26.el10_2 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- epel 9: heimdal-devel 7.8.0-5.el9 Β· BSD and MIT
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms