docudb  1.0
Loading...
Searching...
No Matches
docudb Namespace Reference

Namespaces

namespace  details
 
namespace  query
 

Classes

struct  database
 Represents the database. More...
 
struct  db_collection
 Represents a collection of documents in the database. More...
 
struct  db_document
 Represents a database document. More...
 
struct  db_document_ref
 Reference to a database document. More...
 
struct  db_exception
 Exception class for database errors. More...
 
struct  stmt_exception
 Exception class for database errors. More...
 

Typedefs

using db_value
 Types supported.
 

Enumerations

enum class  json_type {
  null , integer , real , string ,
  object , array , boolean_true , boolean_false ,
  not_found
}
 JSON types. More...
 
enum class  open_mode { read_only , read_write , read_write_create }
 Specifies the database file open mode. More...
 
enum class  threading_mode { default_mode , multi_thread , serialized }
 Specifies the threading mode for the database connection. More...
 

Functions

std::string get_version () noexcept
 Gets the version of the library.
 
std::string get_build_timestamp () noexcept
 Gets the build timestamp.
 

Typedef Documentation

◆ db_value

Initial value:
std::variant<
std::float_t,
std::double_t,
std::int32_t,
std::int64_t,
std::nullptr_t,
std::string>

Types supported.

Definition at line 26 of file docudb.hpp.

Enumeration Type Documentation

◆ json_type

enum class docudb::json_type
strong

JSON types.

Enumerator
null 
integer 
real 
string 
object 
array 
boolean_true 
boolean_false 
not_found 

Definition at line 37 of file docudb.hpp.

◆ open_mode

enum class docudb::open_mode
strong

Specifies the database file open mode.

Enumerator
read_only 

Open the database for read-only access. The database must already exist.

read_write 

Open the database for reading and writing. The database must already exist.

read_write_create 

Open the database for reading and writing, and create it if it does not exist.

Definition at line 52 of file docudb.hpp.

52 {
53 /**
54 * \brief Open the database for read-only access. The database must already exist.
55 */
57 /**
58 * \brief Open the database for reading and writing. The database must already exist.
59 */
61 /**
62 * \brief Open the database for reading and writing, and create it if it does not exist.
63 */
65 };
@ read_write
Open the database for reading and writing. The database must already exist.
@ read_write_create
Open the database for reading and writing, and create it if it does not exist.
@ read_only
Open the database for read-only access. The database must already exist.

◆ threading_mode

enum class docudb::threading_mode
strong

Specifies the threading mode for the database connection.

Note
The threading mode specified by these flags overrides the compile-time default. Refer to SQLite's documentation on sqlite3_open_v2 for details.
Enumerator
default_mode 

Use the default threading mode. If you need single-thread mode, SQLite must be compiled accordingly. This option adds no specific threading flags.

multi_thread 

The new database connection will use the multi-thread threading mode.

serialized 

The new database connection will use the serialized threading mode.

Definition at line 72 of file docudb.hpp.

72 {
73 /**
74 * \brief Use the default threading mode. If you need single-thread mode, SQLite
75 * must be compiled accordingly. This option adds no specific threading flags.
76 */
78 /**
79 * \brief The new database connection will use the multi-thread threading mode.
80 */
82 /**
83 * \brief The new database connection will use the serialized threading mode.
84 */
86 };
@ multi_thread
The new database connection will use the multi-thread threading mode.
@ default_mode
Use the default threading mode. If you need single-thread mode, SQLite must be compiled accordingly....
@ serialized
The new database connection will use the serialized threading mode.

Function Documentation

◆ get_build_timestamp()

std::string docudb::get_build_timestamp ( )
noexcept

Gets the build timestamp.

Returns
std::string The timestamp string.

◆ get_version()

std::string docudb::get_version ( )
noexcept

Gets the version of the library.

Returns
std::string The version string.