Public Types | Public Member Functions | Protected Attributes

OCIPL::ResultIterator Struct Reference

iterator utilizing bulk mode fetching More...

#include <ocipl.h>

Collaboration diagram for OCIPL::ResultIterator:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ResultIterator myType

Public Member Functions

 ResultIterator (SqlStatement &stmt)
int get_row_idx () const
 operator int () const
int get_row_nr () const
bool has_next ()
myTypeoperator++ ()
bool is_null (int idx) const
int is_null (const tstring &col_name) const
bool is_not_null (int idx) const
int is_not_null (const tstring &col_name) const
int get_int (int idx) const
int get_int (const tstring &col_name) const
double get_double (int idx) const
double get_double (const tstring &col_name) const
SqlNumber get_number (int idx) const
SqlNumber get_number (const tstring &col_name) const
tstring get_string (int idx) const
tstring get_string (const tstring &col_name) const
OciDate get_oci_date (int idx) const
OciDate get_oci_date (const tstring &col_name) const
SqlDateTime get_sql_date (int idx) const
SqlDateTime get_sql_date (const tstring &col_name) const

Protected Attributes

SqlStatement_stmt
int _fetched
int _row_idx
int _row_nr

Detailed Description

iterator utilizing bulk mode fetching

Definition at line 3689 of file ocipl.h.


Member Typedef Documentation

Definition at line 3691 of file ocipl.h.


Constructor & Destructor Documentation

OCIPL::ResultIterator::ResultIterator ( SqlStatement stmt ) [inline]

Definition at line 3693 of file ocipl.h.

References OCIPL::SqlStatement::first_bulk().

     :  _stmt(stmt),
        _row_idx(0),
        _row_nr(1)
    {
        _fetched = stmt.first_bulk();
    }

Here is the call graph for this function:


Member Function Documentation

double OCIPL::ResultIterator::get_double ( int  idx ) const [inline]

Definition at line 3774 of file ocipl.h.

    {
        return _stmt->get_double(idx, _row_idx);
    }
double OCIPL::ResultIterator::get_double ( const tstring col_name ) const [inline]

Definition at line 3778 of file ocipl.h.

    {
        return _stmt->get_double(col_name, _row_idx);
    }
int OCIPL::ResultIterator::get_int ( const tstring col_name ) const [inline]

Definition at line 3758 of file ocipl.h.

    {
        return _stmt->get_int(col_name, _row_idx);
    }
int OCIPL::ResultIterator::get_int ( int  idx ) const [inline]

Definition at line 3754 of file ocipl.h.

    {
        return _stmt->get_int(idx, _row_idx);
    }
SqlNumber OCIPL::ResultIterator::get_number ( int  idx ) const [inline]

Definition at line 3783 of file ocipl.h.

References OCIPL::SqlNumber::get_number().

    {
        return _stmt->get_number(idx, _row_idx);
    }

Here is the call graph for this function:

SqlNumber OCIPL::ResultIterator::get_number ( const tstring col_name ) const [inline]

Definition at line 3787 of file ocipl.h.

References OCIPL::SqlNumber::get_number().

    {
        return _stmt->get_number(col_name, _row_idx);
    }

Here is the call graph for this function:

OciDate OCIPL::ResultIterator::get_oci_date ( int  idx ) const [inline]

Definition at line 3801 of file ocipl.h.

    {
        return _stmt->get_oci_date(idx, _row_idx);
    }
OciDate OCIPL::ResultIterator::get_oci_date ( const tstring col_name ) const [inline]

Definition at line 3805 of file ocipl.h.

    {
        return _stmt->get_oci_date(col_name, _row_idx);
    }
int OCIPL::ResultIterator::get_row_idx (  ) const [inline]

Definition at line 3701 of file ocipl.h.

    {
        return _row_idx;
    }
int OCIPL::ResultIterator::get_row_nr (  ) const [inline]

Definition at line 3711 of file ocipl.h.

    {
        return _row_nr;
    }
SqlDateTime OCIPL::ResultIterator::get_sql_date ( int  idx ) const [inline]

Definition at line 3810 of file ocipl.h.

    {
        return _stmt->get_sql_date(idx, _row_idx);
    }
SqlDateTime OCIPL::ResultIterator::get_sql_date ( const tstring col_name ) const [inline]

Definition at line 3814 of file ocipl.h.

    {
        return _stmt->get_sql_date(col_name, _row_idx);
    }
tstring OCIPL::ResultIterator::get_string ( const tstring col_name ) const [inline]

Definition at line 3796 of file ocipl.h.

    {
        return _stmt->get_string(col_name, _row_idx);
    }
tstring OCIPL::ResultIterator::get_string ( int  idx ) const [inline]

Definition at line 3792 of file ocipl.h.

    {
        return _stmt->get_string(idx, _row_idx);
    }
bool OCIPL::ResultIterator::has_next (  ) [inline]

Definition at line 3716 of file ocipl.h.

Referenced by OCIPL::SqlStatement::print_results().

    {
        return _row_idx < _fetched;
    }

Here is the caller graph for this function:

int OCIPL::ResultIterator::is_not_null ( const tstring col_name ) const [inline]

Definition at line 3749 of file ocipl.h.

    {
        return _stmt->is_not_null(col_name, _row_idx);
    }
bool OCIPL::ResultIterator::is_not_null ( int  idx ) const [inline]

Definition at line 3745 of file ocipl.h.

    {
        return _stmt->is_not_null(idx, _row_idx);
    }
bool OCIPL::ResultIterator::is_null ( int  idx ) const [inline]

Definition at line 3736 of file ocipl.h.

References is_null().

Referenced by is_null().

    {
        return _stmt->is_null(idx, _row_idx);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

int OCIPL::ResultIterator::is_null ( const tstring col_name ) const [inline]

Definition at line 3740 of file ocipl.h.

    {
        return _stmt->is_null(col_name, _row_idx);
    }
OCIPL::ResultIterator::operator int (  ) const [inline]

Definition at line 3706 of file ocipl.h.

    {
        return _row_idx;
    }
myType& OCIPL::ResultIterator::operator++ (  ) [inline]

Definition at line 3721 of file ocipl.h.

    {
        if (++_row_idx >= _fetched) {
            _fetched = _stmt.next_bulk();

            if (_fetched) {
                _row_idx = 0;
                ++_row_nr;
            }
        } else
            ++_row_nr;

        return *this;
    }

Member Data Documentation

Definition at line 3822 of file ocipl.h.

Definition at line 3823 of file ocipl.h.

Definition at line 3824 of file ocipl.h.

Definition at line 3820 of file ocipl.h.


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