SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
cbe::Database Class Reference

A database. More...

#include <Database.h>

Public Member Functions

std::string name () const
 The database name. More...
 
cbe::DatabaseId databaseId () const
 The databaseId number. More...
 
cbe::ContainerId containerId () const
 The containerId number. More...
 
cbe::UserId ownerId () const
 The userId number of the owner. More...
 
cbe::Date created () const
 Timestamp of when it was created. More...
 
bool readLocked () const
 Checks if it has a read lock. More...
 
bool writeLocked () const
 Checks if it has a write lock. More...
 
cbe::Container rootContainer () const
 The top container of the database. More...
 
 Database (cbe::DefaultCtor)
 
 operator bool () const
 

Detailed Description

A database.

Example
Get the tenant Container object
cbe::DataBases myDatabases = cloudBackend.account().databases();
cbe::Container tenantContainer{ cbe::DefaultCtor{} };
for (auto myEntry : myDatabases) {
if ( myEntry.first == "tenant" ) {
tenantContainer = myEntry.second.rootContainer();
}
}
return tenantContainer;
cbe::DataBases databases() const
Returns the Databases available.
cbe::Account account()
Returns an account object with information on the user.
A collection of Item, can also represent a table or folder.
Definition: Container.h:63
DefaultCtor
Default constructor marker.
Definition: Types.h:204
std::map< std::string, cbe::Database > DataBases
Databases available for the account.
Definition: Types.h:396

Member Function Documentation

◆ containerId()

cbe::ContainerId cbe::Database::containerId ( ) const

The containerId number.

Refers to the top rootContainer of the database.

Returns
cbe::ContainerId

◆ created()

cbe::Date cbe::Database::created ( ) const

Timestamp of when it was created.

Given in unix epoch number format.

Returns
cbe::Date

◆ databaseId()

cbe::DatabaseId cbe::Database::databaseId ( ) const

The databaseId number.

Returns
cbe::DatabaseId

◆ name()

std::string cbe::Database::name ( ) const

The database name.

Returns
std::string

◆ ownerId()

cbe::UserId cbe::Database::ownerId ( ) const

The userId number of the owner.

Returns
cbe::UserId

◆ readLocked()

bool cbe::Database::readLocked ( ) const

Checks if it has a read lock.

Returns
true
false

◆ rootContainer()

cbe::Container cbe::Database::rootContainer ( ) const

The top container of the database.

The whole container object.

Returns
cbe::Container

◆ writeLocked()

bool cbe::Database::writeLocked ( ) const

Checks if it has a write lock.

Returns
true
false

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