identt
Public Member Functions | Protected Member Functions | List of all members
identt::store::EphemeralPublicKeyTable Class Reference
Inheritance diagram for identt::store::EphemeralPublicKeyTable:
identt::store::StoreTable< EphemeralPublicKeyT > identt::store::StoreLevel identt::store::StoreBase

Public Member Functions

 EphemeralPublicKeyTable (dbpointer trydb)
 Constructor. More...
 
virtual ~EphemeralPublicKeyTable ()
 Destructor. More...
 
 EphemeralPublicKeyTable ()=delete
 make noncopyable and remove default
 
 EphemeralPublicKeyTable (const std::string, const size_t)=delete
 
 EphemeralPublicKeyTable (const EphemeralPublicKeyTable &)=delete
 
EphemeralPublicKeyTableoperator= (const EphemeralPublicKeyTable &)=delete
 
- Public Member Functions inherited from identt::store::StoreTable< EphemeralPublicKeyT >
 StoreTable (dbpointer trydb, const KeyTypeE pkey, const KeySetT ukeys, const KeySetT ikeys)
 Constructor. More...
 
 StoreTable ()=delete
 make noncopyable and remove default
 
 StoreTable (const StoreTable &)=delete
 
virtual ~StoreTable ()
 Destructor. More...
 
StoreTableoperator= (const StoreTable &)=delete
 
bool GetOne (EphemeralPublicKeyT *record, KeyTypeE keytype)
 GetOne: get a record by primary or unique key. More...
 
bool GetMany (EphemeralPublicKeyT *refer, MapT *records, KeyTypeE keytype, size_t skip, size_t limit)
 GetMany: get all values by non unique key. More...
 
void AddTrans (TransactionT *trans, std::string key, std::string &value, bool to_del)
 AddTrans : add transactions. More...
 
bool GetSecondaryValue (EphemeralPublicKeyT *record, KeyTypeE keytype, NodeT *node)
 GetSecondaryValue: get a secondary key value. More...
 
bool AddRecord (EphemeralPublicKeyT *record, TransactionT *trans, bool upsert)
 AddRecord : get transaction item. More...
 
bool DelRecord (EphemeralPublicKeyT *record, TransactionT *trans)
 DelRecord : get delete transaction item. More...
 
bool GetKeysFromIndex (KeyTypeE keytype, EphemeralPublicKeyT *record, NodeListT *nodes, size_t skip, size_t limit)
 GetKeysFromIndex : get primary keys from secondary. More...
 
void ScanTable (uint64_t startid, size_t limit, std::function< void(EphemeralPublicKeyT *)> Func)
 ScanTable : scan by primary key. More...
 
- Public Member Functions inherited from identt::store::StoreLevel
 StoreLevel (dbpointer trydb)
 Constructor. More...
 
 StoreLevel (const StoreLevel &)=delete
 make noncopyable and remove default
 
StoreLeveloperator= (const StoreLevel &)=delete
 
void Initialize (const std::string datadir, const size_t cache_in_mb, uint64_t &last_pkey, uint64_t &last_lkey)
 Initialize: init main db. More...
 
dbpointer getDB ()
 getDB: Get shared pointer to DB More...
 
- Public Member Functions inherited from identt::store::StoreBase
std::string EncodeKeyType (KeyTypeE keytype)
 EncodeKeyType : make prefix key with keytype. More...
 
std::string EncodePrimaryKey (KeyTypeE keytype, ::google::protobuf::uint64 id)
 EncodePrimaryKey : make primary key with id only. More...
 
std::pair< KeyTypeE, uint64_t > DecodePrimaryKey (std::string &key)
 DecodePrimaryKey : get keytype and id from primary key. More...
 
template<typename T >
std::string EncodeSecondaryKey (KeyTypeE keytype, T key)
 EncodeSecondaryKey : make secondary key with one variable only. More...
 
template<typename T , typename U >
std::string EncodeSecondaryKey (KeyTypeE keytype, T key1, U key2)
 EncodeSecondaryKey : make secondary key with two variables. More...
 
template<typename T , typename U , typename V >
std::string EncodeSecondaryKey (KeyTypeE keytype, T key1, U key2, V key3)
 EncodeSecondaryKey : make secondary key with three variables. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key)
 1 value More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key)
 EncodeSecondaryKey : make secondary key with std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, uint64_t key2)
 2 value More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, std::string key2)
 EncodeSecondaryKey : make secondary key with two keys uint64_t , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, uint64_t key2)
 EncodeSecondaryKey : make secondary key with two keys std::string , uint64_t : always unique : s-u unique , s non unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, std::string key2)
 EncodeSecondaryKey : make secondary key with two keys std::string , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, int32_t key2)
 EncodeSecondaryKey : make secondary key with two keys uint64_t, int32_t : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, uint64_t key2, uint64_t key3)
 3 value More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, uint64_t key2, std::string key3)
 EncodeSecondaryKey : make secondary key with three keys uint64_t , uint64_t , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, std::string key2, uint64_t key3)
 EncodeSecondaryKey : make secondary key with three keys uint64_t , std::string , uint64_t : always unique : u-s-u unique , u-s non unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, std::string key2, std::string key3)
 EncodeSecondaryKey : make secondary key with three keys uint64_t , std::string , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, uint64_t key2, uint64_t key3)
 EncodeSecondaryKey : make secondary key with three keys std::string , uint64_t , uint64_t : s-u-u unique , s-u non unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, uint64_t key2, std::string key3)
 EncodeSecondaryKey : make secondary key with three keys std::string , uint64_t , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, std::string key2, uint64_t key3)
 EncodeSecondaryKey : make secondary key with three keys std::string , std::string , uint64_t : s-s-u unique , s-s non unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, std::string key2, std::string key3)
 EncodeSecondaryKey : make secondary key with three keys std::string , std::string , std::string : always unique. More...
 

Protected Member Functions

std::string GetKey (EphemeralPublicKeyT *record, KeyTypeE keytype, bool pre) override
 GetKey: get a key. More...
 

Additional Inherited Members

- Public Types inherited from identt::store::StoreTable< EphemeralPublicKeyT >
using KeySetT = std::set< KeyTypeE >
 
using MapT = google::protobuf::Map< uint64_t, EphemeralPublicKeyT >
 
- Protected Attributes inherited from identt::store::StoreTable< EphemeralPublicKeyT >
const KeyTypeE PrimaryKey
 
const KeySetT unique_keys
 
const KeySetT index_keys
 
- Protected Attributes inherited from identt::store::StoreLevel
dbpointer db
 

Constructor & Destructor Documentation

§ EphemeralPublicKeyTable()

identt::store::EphemeralPublicKeyTable::EphemeralPublicKeyTable ( dbpointer  trydb)

Constructor.

Parameters
trydbdbpointer shared pointer to db

§ ~EphemeralPublicKeyTable()

virtual identt::store::EphemeralPublicKeyTable::~EphemeralPublicKeyTable ( )
inlinevirtual

Destructor.

Member Function Documentation

§ GetKey()

std::string identt::store::EphemeralPublicKeyTable::GetKey ( EphemeralPublicKeyT *  record,
KeyTypeE  keytype,
bool  pre 
)
overrideprotectedvirtual

GetKey: get a key.

GetKey: get a secondary key.

Parameters
recordEphemeralPublicKeyT* record
keytypeKeyTypeE key type for index
prebool non unique keys
Returns
std::string key

Implements identt::store::StoreTable< EphemeralPublicKeyT >.


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