A simple database file format that stores a mapping from strings to GVariant values in a way that is extremely efficient for lookups.
Find a file
Philip Withnall 4758f6fb7f Merge branch 'declare-includes' into 'main'
build: Declare a dependency for includes

See merge request GNOME/gvdb!28
2025-04-24 13:54:44 +00:00
gvdb tests: Add autoptr test 2025-03-13 15:17:21 +00:00
LICENSES Add missing SPDX license/copyright headers and SPDX license files 2024-05-23 23:47:33 +01:00
.gitignore Add meson wrap hash files to .gitignore 2024-09-12 05:59:33 -04:00
COPYING Add COPYING file to indicate the license 2019-06-20 23:23:20 +00:00
gvdb.doap doap: Remove Allison as a maintainer 2024-05-24 12:26:32 +01:00
meson.build build: Declare a dependency for includes 2025-04-22 11:11:05 -05:00
meson.options build: Add -Dtests configure option 2024-09-12 15:24:14 +01:00
README.md Add missing SPDX license/copyright headers and SPDX license files 2024-05-23 23:47:33 +01:00

GVDB

GVDB (GVariant Database) is a simple database file format that stores a mapping from strings to GVariant values in a way that is extremely efficient for lookups.

The code is intended to be pulled into projects as a submodule/subproject, and it is not shipped as a separately compiled library. It has no API guarantees.

A GVDB database table is a single file. It is designed to be memory mapped by one or more clients, with accesses to the stored data being fast. The storage format has low size overheads, assuming the GVariant formats for values do not require much padding or alignment.

Modifying a GVDB table requires writing out the whole file. This is relatively slow. gvdb_table_write_contents() does this by writing out the new file and atomically renaming it over the old one. This means that any clients who have memory mapped the old file will need to reload their memory mapping.

This means that if multiple clients are using a GVDB table, an external process is needed to synchronise writes and to notify clients to reload the table. dconf-service is an example of such a process.