Qore DbDataProvider Module Reference  1.0
DbSelectRecordIterator.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
25 // minimum required Qore version
26 // assume local scope for variables, do not use "$" signs
27 // require type definitions everywhere
29 // enable all warnings
30 
32 namespace DbDataProvider {
35 
36 public:
37 protected:
39  *hash<auto> where_cond;
40 
41 public:
42 
44 
50  constructor(AbstractDatasource ds, *hash<auto> where_cond, hash<auto> select_options)
51 : AbstractDbRecordIterator(!ds.currentThreadInTransaction(), DbSelectRecordIterator::prepareStatement(ds.getSQLStatement(), select_options));
52 
53 
55 
62  bool next();
63 
64 
66 
72  auto memberGate(string key);
73 
74 
76 protected:
77  static AbstractSQLStatement prepareStatement(AbstractSQLStatement stmt, hash<auto> select_options);
78 public:
79 
80 };
81 };
bool next()
Increments the row pointer when retrieving rows from a select statement; returns True if there is a r...
Defines the record iterator class for Table-based iterators.
Definition: DbSelectRecordIterator.qc.dox.h:34
Defines the record iterator class for Table-based iterators.
Definition: AbstractDbRecordIterator.qc.dox.h:34
*hash< auto > where_cond
search conditions
Definition: DbSelectRecordIterator.qc.dox.h:39
AbstractSQLStatement stmt
the statement being iterated
Definition: AbstractDbRecordIterator.qc.dox.h:39
auto memberGate(string key)
Returns the value of the given field in the current record, if the iterator is valid.
static AbstractSQLStatement prepareStatement(AbstractSQLStatement stmt, hash< auto > select_options)
Prepares the AbstractSQLStatement object for the iterator.
Qore AbstractDbRecordIterator class definition.
Definition: AbstractDbRecordIterator.qc.dox.h:32
constructor(bool release_transaction, AbstractSQLStatement stmt)
creates the iterator