forked from Telodendria/Telodendria
Document DbList() and DbListFree()
This commit is contained in:
parent
f1e565ef7b
commit
f2c2888c87
2 changed files with 18 additions and 2 deletions
2
TODO.txt
2
TODO.txt
|
@ -25,7 +25,7 @@ Milestone: v0.2.0
|
||||||
[~] Documentation
|
[~] Documentation
|
||||||
[x] User functions
|
[x] User functions
|
||||||
[x] Json functions
|
[x] Json functions
|
||||||
[ ] Db functions
|
[x] Db functions
|
||||||
[ ] Uia (move docs from Matrix)
|
[ ] Uia (move docs from Matrix)
|
||||||
|
|
||||||
[x] Convert proposals to man pages
|
[x] Convert proposals to man pages
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.Dd $Mdocdate: January 9 2023 $
|
.Dd $Mdocdate: March 6 2023 $
|
||||||
.Dt DB 3
|
.Dt DB 3
|
||||||
.Os Telodendria Project
|
.Os Telodendria Project
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -20,6 +20,10 @@
|
||||||
.Fn DbUnlock "Db *" "DbRef *"
|
.Fn DbUnlock "Db *" "DbRef *"
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn DbExists "Db *" "size_t" "..."
|
.Fn DbExists "Db *" "size_t" "..."
|
||||||
|
.Ft Array *
|
||||||
|
.Fn DbList "Db *" "size_t" "..."
|
||||||
|
.Ft void
|
||||||
|
.Fn DbListFree "Array *"
|
||||||
.Ft HashMap *
|
.Ft HashMap *
|
||||||
.Fn DbJson "DbRef *"
|
.Fn DbJson "DbRef *"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
|
@ -77,6 +81,14 @@ of that nature.
|
||||||
.Fn DbDelete
|
.Fn DbDelete
|
||||||
completely removes an object from the database. It purges it from both the
|
completely removes an object from the database. It purges it from both the
|
||||||
cache and the disk as soon as no more references to it are open.
|
cache and the disk as soon as no more references to it are open.
|
||||||
|
.Pp
|
||||||
|
.Fn DbList
|
||||||
|
lists all of the objects at a given path. Unlike the other varargs
|
||||||
|
functions, it does not take a path to a specific object; it takes
|
||||||
|
a directory to be iterated. Note that the resulting list only contains
|
||||||
|
the objects in that directory, not subdirectories.
|
||||||
|
.Fn DbListFree
|
||||||
|
frees the list returned by this function.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
.Pp
|
.Pp
|
||||||
.Fn DbOpen
|
.Fn DbOpen
|
||||||
|
@ -99,6 +111,10 @@ follows the same return value conventions as
|
||||||
.Fn DbUnlock ;
|
.Fn DbUnlock ;
|
||||||
it reports the status of the deletion operation as a boolean value.
|
it reports the status of the deletion operation as a boolean value.
|
||||||
.Pp
|
.Pp
|
||||||
|
.Fn DbList
|
||||||
|
returns an array of strings, or NULL if there was a memory or
|
||||||
|
filesystem error.
|
||||||
|
.Pp
|
||||||
.Fn DbJson
|
.Fn DbJson
|
||||||
returns a JSON object. Consult
|
returns a JSON object. Consult
|
||||||
.Xr Json 3
|
.Xr Json 3
|
||||||
|
|
Loading…
Reference in a new issue