#include <d_Extent.h>
Public Methods | |
| d_Extent (const d_Database *iDb, d_Boolean iSubClasses=d_True) | |
| ~d_Extent () | |
| unsigned long | cardinality () const |
| d_Boolean | is_empty () const |
| d_Boolean | allows_duplicates () const |
| d_Boolean | is_ordered () const |
| d_Iterator< d_Ref< T > > | create_iterator () |
| d_Iterator< d_Ref< T > > | begin () |
| d_Iterator< d_Ref< T > > | end () |
| d_Ref< T > | select_element (const char *iTextQuery) const |
| d_Iterator< d_Ref< T > > | select (const char *iTextQuery) |
| void | deleteObjects (const char *iTextQuery) |
| unsigned long | count (const char *iTextQuery) |
| int | query (d_Collection< d_Ref< T > > &iColl, const char *iTextQuery) const |
| d_Boolean | exists_element (const char *iTextQuery) const |
| void | setQueryEngine (const char *iQueryEngineName) |
Protected Methods | |
| d_Extent (const d_Extent< T > &iSource) | |
| d_Extent< T > & | operator= (const d_Extent< T > &iSource) |
QUERIES: Making a query on an Extent means to query all the objects of a class.
LOCATION: d_Extent.h
USAGE: d_Extent< <pers-class-name> > <variable-name>;
Where:
<pers-class-name>: persistent class to use <variable-name>: is the name of d_Extent object
EXAMPLES: d_Ref<Customer> objCustomer; d_Iterator< d_Ref<Customer> > itCustomer; d_Extent<Customer> customers( &db );
itCustomer = customers.select( "Customer.code = 1" );
while( itCustomer.next( objCustomer ) ) { * DISPLAY OBJECT printf( "......: d", objCustomer->code ); printf( "......: s", objCustomer->name.c_str() ); printf( "...: s", objCustomer->surname.c_str() ); printf( ".......: d", objCustomer->age ); printf( ".....: s", objCustomer->notes.c_str() ); }
SEE ALSO: d_Iterator
ODMG: Compliant
|
||||||||||||||||
|
Create an d_Extent object. Creates an extent for class specified as template argument (<> bracets) of database . Parameter is not used but available for ODMG compatibility. ODMG : Compliant |
|
|||||||||
|
Destructor. ODMG : Compliant |
|
||||||||||
|
|
|
|||||||||
|
Returns always false. It's maintained for compatibility with collection classes. ODMG : Compliant |
|
|||||||||
|
Creates an iterator that points to the first element of extent and returns it. It works like create_iterator() member and is maintained for compatibility with C++ STL containers. SEE ALSO: d_Iterator, create_iterator() ODMG : Compliant |
|
|||||||||
|
Returns total number of object in the extent. This is equal to the total of objects present in the database for that class. ODMG : Compliant |
|
||||||||||
|
Counts the number of objects that matches the query predicate. SEE ALSO: select(), cardinality() ODMG : Compliant |
|
|||||||||
|
Creates an iterator that points to the first element of extent and returns it. SEE ALSO: d_Iterator, begin() ODMG : Compliant |
|
||||||||||
|
Delete objects that satisfy query predicate. is the text of query to execute. SEE ALSO: select() ODMG : Extension |
|
|||||||||
|
Creates an iterator that points to the last element of extent and returns it. Is maintained for compatibility with C++ STL containers. SEE ALSO: d_Iterator, begin() ODMG : Compliant |
|
||||||||||
|
Returns true if there is at least one object that matches the query predicate. SEE ALSO: select_element(), select() ODMG : Compliant |
|
|||||||||
|
Returns true if the extent doesn't contain objects. ODMG : Compliant |
|
|||||||||
|
Returns always false. It's maintained for compatibility with collection classes. ODMG : Compliant |
|
||||||||||
|
|
|
||||||||||||||||
|
SEE ALSO: d_Iterator, d_Ref, select_element() ODMG : Compliant |
|
||||||||||
|
Makes a query on the extent. is the text of query to execute. It returns an iterator that point to the first object that matches the query predicate. To browse the result set use d_Iterator object. SEE ALSO: d_Iterator, d_Ref, select_element() ODMG : Compliant |
|
||||||||||
|
Makes a query on the extent. is the text of query to execute. It returns a reference to the object that matches the query predicate. If more than one object matches the query, then only the first one object scanned is returned. For best performance use this method instead of general select() method when the field of research is unique and doesn't contain duplicates. In this way the research will stop after the first, and unique, match. |
|
||||||||||
|
Set query language engine. This allow the user to change the language for query at run-time just calling this method. Query engine must be previously registered in the oQueryEngineManager object taken by oQueryEngineManager::getInstance() method. SEE ALSO: oQueryEngineManager ODMG : Extension |
1.3-rc1