ZephyrDB
Embedded database for Zephyr RTOS: KV, time-series, and document models
Loading...
Searching...
No Matches
zdb_doc Struct Reference

In-memory document handle. More...

#include <zephyrdb.h>

Public Attributes

zdb_t * db
const char * collection_name
const char * document_id
zdb_doc_field_t * fields
size_t field_count
size_t max_fields
uint64_t created_ms
uint64_t updated_ms
bool valid

Detailed Description

In-memory document handle.

Obtained from zdb_doc_create()/zdb_doc_open(); treat the members as read-only and mutate fields through the zdb_doc_field_set_* / zdb_doc_field_get_* accessors.

Member Data Documentation

◆ collection_name

const char* zdb_doc::collection_name

Collection this document belongs to.

◆ created_ms

uint64_t zdb_doc::created_ms

Creation time, milliseconds since boot.

◆ db

zdb_t* zdb_doc::db

Owning instance.

◆ document_id

const char* zdb_doc::document_id

Document identifier.

◆ field_count

size_t zdb_doc::field_count

Number of populated fields.

◆ fields

zdb_doc_field_t* zdb_doc::fields

Field array (internal storage).

◆ max_fields

size_t zdb_doc::max_fields

Field capacity.

◆ updated_ms

uint64_t zdb_doc::updated_ms

Last-save time, milliseconds since boot.

◆ valid

bool zdb_doc::valid

True while the handle is open.


The documentation for this struct was generated from the following file: