#include <container.h>
Public Member Functions | |
int | search (dbCursor< T > &cursor, void const *from, void const *till, bool ascent=true) |
int | search (dbCursor< T > &cursor, void const *key) |
int | search (dbCursor< T > &cursor, bool ascent=true) |
int | spatialSearch (dbCursor< T > &cursor, rectangle const &r, SpatialSearchType type) |
void | create (bool caseInsensitive=false) |
void | purge () |
void | free () |
void | add (dbReference< T > const &ref) |
void | remove (dbReference< T > const &ref) |
dbContainer (const char_t *fieldName) | |
void | create (dbDatabase *db) |
void | purge (dbDatabase *db) |
void | free (dbDatabase *db) |
void | add (dbDatabase *db, dbReference< T > const &ref) |
void | remove (dbDatabase *db, dbReference< T > const &ref) |
dbContainer (dbDatabase *db, const char_t *fieldName) | |
oid_t | getOid () const |
bool | isNull () const |
dbFieldDescriptor * | dbDescribeComponents (dbFieldDescriptor *fd) |
Protected Member Functions | |
void | create (dbDatabase *db, bool caseInsensitive=false, bool thick=false, bool unique=false) |
bool | add (dbDatabase *db, dbAnyReference const &ref) |
void | remove (dbDatabase *db, dbAnyReference const &ref) |
int | search (dbAnyCursor &cursor, void const *from, void const *till, bool ascent=true) |
int | spatialSearch (dbAnyCursor &cursor, rectangle const &r, SpatialSearchType type) |
Protected Attributes | |
dbFieldDescriptor * | fd |
oid_t | oid |
Friends | |
bool | isNull (dbAnyReference const &ref) |
Template of container for particular table
dbContainer< T >::dbContainer | ( | const char_t * | fieldName | ) | [inline] |
Constructor of the contanier reference
fieldName | name of the key field used by container |
dbContainer< T >::dbContainer | ( | dbDatabase * | db, | |
const char_t * | fieldName | |||
) | [inline] |
Constructor of the contanier reference
db | database | |
fieldName | name of the key field used by container |
void dbContainer< T >::add | ( | dbReference< T > const & | ref | ) | [inline] |
Add new record to container
ref | reference to the record added to the container |
Referenced by dbContainer< T >::add().
void dbContainer< T >::add | ( | dbDatabase * | db, | |
dbReference< T > const & | ref | |||
) | [inline] |
Add new record to container in specified database.
db | database | |
ref | reference to the record added to the container |
References dbContainer< T >::add().
void dbContainer< T >::create | ( | bool | caseInsensitive = false |
) | [inline] |
Create new container. Depending on type of the field, container will use B-Tree or R-Tree (for rectabngles) for its members.
caseInsensitive | case insensitive flag (used only for string field) |
Referenced by dbContainer< T >::create().
void dbContainer< T >::create | ( | dbDatabase * | db | ) | [inline] |
Create new container in specified database.
db | database |
References dbContainer< T >::create().
void dbContainer< T >::free | ( | ) | [inline] |
Deallocate container
Referenced by dbContainer< T >::free().
void dbContainer< T >::free | ( | dbDatabase * | db | ) | [inline] |
Deallocate container in specified database.
db | database |
Reimplemented from dbAnyContainer.
References dbContainer< T >::free().
oid_t dbAnyReference::getOid | ( | ) | const [inline, inherited] |
Get object idetifier
Referenced by dbCursor< dbTimeSeriesBlock< T > >::isInSelection(), dbBlob::operator=(), dbCursor< dbTimeSeriesBlock< T > >::seek(), dbReference< Person >::unsafeAssign(), and dbSession::update().
bool dbAnyReference::isNull | ( | ) | const [inline, inherited] |
Check whether reference is null
void dbContainer< T >::purge | ( | dbDatabase * | db | ) | [inline] |
Clear the container in specified database.
db | database |
Reimplemented from dbAnyContainer.
References dbContainer< T >::purge().
void dbContainer< T >::purge | ( | ) | [inline] |
Clear the container
Referenced by dbContainer< T >::purge().
void dbContainer< T >::remove | ( | dbDatabase * | db, | |
dbReference< T > const & | ref | |||
) | [inline] |
Remove record from the container in specified database.
db | database | |
ref | reference to the record deleted from the container |
References dbContainer< T >::remove().
void dbContainer< T >::remove | ( | dbReference< T > const & | ref | ) | [inline] |
Remove record from the container
ref | reference to the record deleted from the container |
Referenced by dbContainer< T >::remove().
int dbContainer< T >::search | ( | dbCursor< T > & | cursor, | |
bool | ascent = true | |||
) | [inline] |
Select all records in the container
cursor | cursor to iterate through selected resords | |
ascent | cursor cursor to iterate through selected resords |
References dbContainer< T >::search().
int dbContainer< T >::search | ( | dbCursor< T > & | cursor, | |
void const * | from, | |||
void const * | till, | |||
bool | ascent = true | |||
) | [inline] |
Search records matching search criteria (between, less or equal, great or equal)
cursor | cursor to iterate through selected resords | |
from | inclusive low bound for the search key, if NULL then there is no low bound | |
till | inclusive high bound for the search key, if NULL then there is no high bound | |
ascent | key order: true - ascending order, false - descending order |
Referenced by dbContainer< T >::search().
int dbContainer< T >::search | ( | dbCursor< T > & | cursor, | |
void const * | key | |||
) | [inline] |
Select records with sepcified value of the key
cursor | cursor to iterate through selected resords | |
key | searched key |
References dbContainer< T >::search().
int dbContainer< T >::spatialSearch | ( | dbCursor< T > & | cursor, | |
rectangle const & | r, | |||
SpatialSearchType | type | |||
) | [inline] |
Perform spatial search using R-Tree
cursor | cursor to iterate through selected resords | |
r | search rectangle | |
type | search criteria: one of SpatialSearchType |
bool isNull | ( | dbAnyReference const & | ref | ) | [friend, inherited] |
Check whether reference is null