All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HSEPDataSqLite::SqLiteEnvironment Class Reference

SqLite DBEnvironment implementation. More...

#include <DBSqLite.h>

+ Inheritance diagram for HSEPDataSqLite::SqLiteEnvironment:
+ Collaboration diagram for HSEPDataSqLite::SqLiteEnvironment:

Public Member Functions

 SqLiteEnvironment ()
 
 ~SqLiteEnvironment ()
 
ErrorCode connect (string &pConnectionStringRef, string &pUserRef, string &pPasswordRef)
 Connects to the specified destination using the provided credentials.
 
ErrorCode setSchema (string &pNewSchemaRef)
 When the database works with "schemas", permits to define the right one to work with.
 
DBStatementcreateStatementPtr (string &pQueryRef)
 Given the specified query name, creates a DBStatement that will be linked to the session.
 
- Public Member Functions inherited from HSEPData::DBEnvironment
 DBEnvironment ()
 
virtual ~DBEnvironment ()
 
bool synchronizes () const
 Indicates if the session will or not to shynchronize.
 
void addSyncTo (string pSyncTo)
 Indicates where the synchronization will go.
 
string & syncToRef ()
 Returns a reference to the synchronization destination.
 
void addSyncPath (string pSyncPath)
 Indicates where the "for read" synchronization material will be stored.
 
string & syncPathRef ()
 Returns a reference to the path where synchronization material will be stored.
 
void addID (int pNewID)
 Includes a numeric ID (to be used by connection pools).
 
int id ()
 Returns the numeric ID previously stored, or zero if no one was defined.
 
- Public Member Functions inherited from HSEP::HSEPObject
string & lastErrorRef ()
 Returns a reference to the last stored error message.
 
ErrorCode lastCode ()
 Returns the last stored code.
 
bool valid ()
 Permits to know if the object has a valid internal state.
 
string & typeRef ()
 Permits to know the type of this particular object.
 

Additional Inherited Members

- Protected Member Functions inherited from HSEP::HSEPObject
 HSEPObject (const char *pType)
 Constructor, providing the base for the state controlling instance.
 
virtual ~HSEPObject ()
 
void setLastError (string &pErrorMsgRef)
 Assigns an error message text to the last executed operation.
 
void setLastError (const string &pErrorMsgRef)
 Assigns an error message text to the last executed operation.
 
void setLastError (const char *pErrorMsg)
 Assigns an error message text to the last executed operation.
 
void setValid ()
 Defines that the object has a valid state.
 
void setInvalid ()
 Defines that the object has an invalid state.
 
void setLastCode (const ErrorCode pErrorCode)
 Defines the internal result code for the object.
 
- Protected Attributes inherited from HSEPData::DBEnvironment
bool aSynchronizes
 
string aSyncTo
 
string aSyncPath
 
int aID
 

Detailed Description

SqLite DBEnvironment implementation.

Definition at line 87 of file DBSqLite.h.

Constructor & Destructor Documentation

HSEPDataSqLite::SqLiteEnvironment::SqLiteEnvironment ( )

Definition at line 429 of file DBSqLite.cpp.

HSEPDataSqLite::SqLiteEnvironment::~SqLiteEnvironment ( )

Definition at line 434 of file DBSqLite.cpp.

References HSEP::HSEPObject::setLastError(), and HSEPDataSqLite::SqLiteWhatMethod().

+ Here is the call graph for this function:

Member Function Documentation

ErrorCode HSEPDataSqLite::SqLiteEnvironment::connect ( string &  pConnectionStringRef,
string &  pUserRef,
string &  pPasswordRef 
)
virtual

Connects to the specified destination using the provided credentials.

Todo:
To generalize the connection credential to use other types of data (for example, security certificates).
Parameters
pConnectionStringRefThe connection string
pUserRefThe database user
pPasswordRefThe database password
Returns

Implements HSEPData::DBEnvironment.

Definition at line 445 of file DBSqLite.cpp.

References HSEP::EC::NotCatalogedError, HSEP::EC::OK, HSEP::HSEPObject::setLastError(), and HSEPDataSqLite::SqLiteWhatMethod().

+ Here is the call graph for this function:

DBStatement * HSEPDataSqLite::SqLiteEnvironment::createStatementPtr ( string &  pQueryRef)
virtual

Given the specified query name, creates a DBStatement that will be linked to the session.

Parameters
pQueryRef
Returns
The statement
nullptr when no statement was created. Must check the instance error methods in such case.

Implements HSEPData::DBEnvironment.

Definition at line 480 of file DBSqLite.cpp.

References HSEP::HSEPObject::lastErrorRef(), HSEP::HSEPObject::setLastError(), and HSEPDataSqLite::SqLiteWhatMethod().

+ Here is the call graph for this function:

ErrorCode HSEPDataSqLite::SqLiteEnvironment::setSchema ( string &  pNewSchemaRef)
virtual

When the database works with "schemas", permits to define the right one to work with.

Parameters
pNewSchemaRef
Returns

Implements HSEPData::DBEnvironment.

Definition at line 476 of file DBSqLite.cpp.

References HSEP::EC::OK.


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