Public Member Functions | Protected Attributes

OCIPL::SqlNumberArray Struct Reference

array of NUMBER bind variable buffers More...

#include <ocipl.h>

Inheritance diagram for OCIPL::SqlNumberArray:
Inheritance graph
[legend]
Collaboration diagram for OCIPL::SqlNumberArray:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SqlNumberArray (int size=g_OCIPL_BULK_ROWS)
 ~SqlNumberArray ()
const oraclenumberget_number (int row) const
oraclenumberget_ref (int row)
const oraclenumberget_ptr (int row) const
tstring str (int row, OCIError *errh, const TCHAR *fmt=TEXT("TM9"), const TCHAR *nls_fmt=TEXT("NLS_NUMERIC_CHARACTERS='.,'")) const
int get_int (int row, OCIError *errh, int null=INT_NULL) const
double get_double (int row, OCIError *errh, double null=0.) const
void set_number (int row, const SqlNumber &num)
bool is_null (int idx) const
bool is_not_null (int idx) const
const SqlIndind (int idx) const
SqlIndind (int idx)
int get_buffer_count () const

Protected Attributes

oraclenumber_pvalues
int _count
SqlInd_pind

Detailed Description

array of NUMBER bind variable buffers

Definition at line 1894 of file ocipl.h.


Constructor & Destructor Documentation

OCIPL::SqlNumberArray::SqlNumberArray ( int  size = g_OCIPL_BULK_ROWS ) [inline]

Definition at line 1897 of file ocipl.h.

     :  SqlIndArray(size),
        _pvalues(static_cast<oraclenumber*>(ocipl_alloc(size*sizeof(oraclenumber))))
    {
    }
OCIPL::SqlNumberArray::~SqlNumberArray (  ) [inline]

Definition at line 1903 of file ocipl.h.

References ocipl_free.


Member Function Documentation

int OCIPL::SqlIndArray::get_buffer_count (  ) const [inline, inherited]

Definition at line 1285 of file ocipl.h.

Referenced by OCIPL::DefinePar::DefinePar().

{return _count;}

Here is the caller graph for this function:

double OCIPL::SqlNumberArray::get_double ( int  row,
OCIError *  errh,
double  null = 0. 
) const [inline]

Definition at line 1941 of file ocipl.h.

References OCIPL::number_to_double().

    {
        if (is_not_null(row))
            return number_to_double(_pvalues[row], errh);
        else
            return null;
    }

Here is the call graph for this function:

int OCIPL::SqlNumberArray::get_int ( int  row,
OCIError *  errh,
int  null = INT_NULL 
) const [inline]

Definition at line 1923 of file ocipl.h.

References OCIPL::number_to_int().

    {
        if (is_not_null(row))
            return number_to_int(_pvalues[row], errh);
        else
            return null;
    }

Here is the call graph for this function:

const oraclenumber& OCIPL::SqlNumberArray::get_number ( int  row ) const [inline]

Definition at line 1908 of file ocipl.h.

Referenced by OCIPL::SqlVariantArray::bind_input().

{return _pvalues[row];}

Here is the caller graph for this function:

const oraclenumber* OCIPL::SqlNumberArray::get_ptr ( int  row ) const [inline]

Definition at line 1911 of file ocipl.h.

{return &_pvalues[row];}
oraclenumber* OCIPL::SqlNumberArray::get_ref ( int  row ) [inline]

Definition at line 1910 of file ocipl.h.

Referenced by OCIPL::DefinePar::DefinePar(), and OCIPL::SqlVariantArray::number().

{return &_pvalues[row];}

Here is the caller graph for this function:

const SqlInd& OCIPL::SqlIndArray::ind ( int  idx ) const [inline, inherited]

Definition at line 1282 of file ocipl.h.

Referenced by OCIPL::SqlVariantArray::bind_input(), and OCIPL::DefinePar::DefinePar().

{return _pind[idx];}

Here is the caller graph for this function:

SqlInd& OCIPL::SqlIndArray::ind ( int  idx ) [inline, inherited]

Definition at line 1283 of file ocipl.h.

{return _pind[idx];}
bool OCIPL::SqlIndArray::is_not_null ( int  idx ) const [inline, inherited]

Definition at line 1280 of file ocipl.h.

Referenced by OCIPL::SqlVariantArray::is_not_null(), OCIPL::SqlVariantArray::number(), OCIPL::SqlVariantArray::oci_date(), and OCIPL::SqlVariantArray::sql_date().

{return _pind[idx].is_not_null();}

Here is the caller graph for this function:

bool OCIPL::SqlIndArray::is_null ( int  idx ) const [inline, inherited]

Definition at line 1279 of file ocipl.h.

{return _pind[idx].is_null();}
void OCIPL::SqlNumberArray::set_number ( int  row,
const SqlNumber num 
) [inline]

Definition at line 1949 of file ocipl.h.

References OCIPL::SqlNumber::get_number(), and OCIPL::SqlValue::ind().

Referenced by OCIPL::SqlVariantArray::set_number().

{_pvalues[row] = num.get_number(); _pind[row] = num.ind();}

Here is the call graph for this function:

Here is the caller graph for this function:

tstring OCIPL::SqlNumberArray::str ( int  row,
OCIError *  errh,
const TCHAR *  fmt = TEXT("TM9"),
const TCHAR *  nls_fmt = TEXT("NLS_NUMERIC_CHARACTERS='.,'") 
) const [inline]

Definition at line 1914 of file ocipl.h.

References OCIPL::number_to_str().

Referenced by OCIPL::SqlVariantArray::str().

    {
        if (_pind[row].is_not_null())
            return number_to_str(_pvalues[row], errh, fmt, nls_fmt);
        else
            return tstring();
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

int OCIPL::SqlIndArray::_count [protected, inherited]
SqlInd* OCIPL::SqlIndArray::_pind [protected, inherited]

Definition at line 1289 of file ocipl.h.

Referenced by OCIPL::SqlIndArray::SqlIndArray().

Definition at line 1952 of file ocipl.h.


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