forked from Telodendria/Telodendria
Document DbDelete()
This commit is contained in:
parent
c8cd2cebb7
commit
f0392044c2
1 changed files with 13 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
.Dd $Mdocdate: November 26 2022 $
|
.Dd $Mdocdate: December 15 2022 $
|
||||||
.Dt DB 3
|
.Dt DB 3
|
||||||
.Os Telodendria Project
|
.Os Telodendria Project
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -12,6 +12,8 @@
|
||||||
.Fn DbClose "Db *"
|
.Fn DbClose "Db *"
|
||||||
.Ft DbRef *
|
.Ft DbRef *
|
||||||
.Fn DbCreate "Db *" "size_t" "..."
|
.Fn DbCreate "Db *" "size_t" "..."
|
||||||
|
.Ft int
|
||||||
|
.Fn DbDelete "Db *" "size_t" "..."
|
||||||
.Ft DbRef *
|
.Ft DbRef *
|
||||||
.Fn DbLock "Db *" "size_t" "..."
|
.Fn DbLock "Db *" "size_t" "..."
|
||||||
.Ft int
|
.Ft int
|
||||||
|
@ -58,6 +60,10 @@ converts a database reference into JSON. At this time, the database actually
|
||||||
stores objects as JSON, so this just returns an internal pointer, but in the
|
stores objects as JSON, so this just returns an internal pointer, but in the
|
||||||
future it may have to be generated by decompressing a binary blob, or something
|
future it may have to be generated by decompressing a binary blob, or something
|
||||||
of that nature.
|
of that nature.
|
||||||
|
.Pp
|
||||||
|
.Fn DbDelete
|
||||||
|
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.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
.Pp
|
.Pp
|
||||||
.Fn DbOpen
|
.Fn DbOpen
|
||||||
|
@ -74,6 +80,12 @@ to the specified object.
|
||||||
returns a boolean value indicating whether or not the reference was successfully
|
returns a boolean value indicating whether or not the reference was successfully
|
||||||
unlocked. If the unlock is successful, then a non-zero value is returned. If it
|
unlocked. If the unlock is successful, then a non-zero value is returned. If it
|
||||||
isn't, 0 is returned, and it is up to the caller to decide how to proceed.
|
isn't, 0 is returned, and it is up to the caller to decide how to proceed.
|
||||||
|
.Pp
|
||||||
|
.Fn DbDelete
|
||||||
|
follows the same return value conventions as
|
||||||
|
.Fn DbUnlock ;
|
||||||
|
it reports the status of the deletion operation as a boolean value.
|
||||||
|
.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