libxr 1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::Database Class Referenceabstract

数据库接口,提供键值存储和管理功能 (Database interface providing key-value storage and management). More...

#include <database.hpp>

Inheritance diagram for LibXR::Database:

Data Structures

class  Key
 模板类,表示数据库中的具体键 (Template class representing a specific key in the database). More...
 
class  KeyBase
 键的基类,存储键名及其数据 (Base class for keys, storing key name and associated data). More...
 

Private Member Functions

virtual ErrorCode Get (KeyBase &key)=0
 从数据库获取键的值 (Retrieve the key's value from the database).
 
virtual ErrorCode Set (KeyBase &key, RawData data)=0
 设置数据库中的键值 (Set the key's value in the database).
 
virtual ErrorCode Add (KeyBase &key)=0
 添加新键到数据库 (Add a new key to the database).
 

Detailed Description

数据库接口,提供键值存储和管理功能 (Database interface providing key-value storage and management).

Definition at line 20 of file database.hpp.

Member Function Documentation

◆ Add()

virtual ErrorCode LibXR::Database::Add ( KeyBase key)
privatepure virtual

添加新键到数据库 (Add a new key to the database).

Parameters
key需要添加的键 (Key to add).
Returns
操作结果 (Operation result).

Implemented in LibXR::DatabaseRawSequential, and LibXR::DatabaseRaw< MinWriteSize >.

◆ Get()

virtual ErrorCode LibXR::Database::Get ( KeyBase key)
privatepure virtual

从数据库获取键的值 (Retrieve the key's value from the database).

Parameters
key需要获取的键 (Key to retrieve).
Returns
操作结果 (Operation result).

Implemented in LibXR::DatabaseRawSequential, and LibXR::DatabaseRaw< MinWriteSize >.

◆ Set()

virtual ErrorCode LibXR::Database::Set ( KeyBase key,
RawData  data 
)
privatepure virtual

设置数据库中的键值 (Set the key's value in the database).

Parameters
key目标键 (Target key).
data需要存储的新值 (New value to store).
Returns
操作结果 (Operation result).

Implemented in LibXR::DatabaseRawSequential, and LibXR::DatabaseRaw< MinWriteSize >.


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