Public Member Functions | Protected Attributes

MySqlPL::SqlQuery Struct Reference

#include <mysqlpl.h>

Collaboration diagram for MySqlPL::SqlQuery:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SqlQuery (const char *sql)
void where (const char *cond)
std::string get_sql () const
void bind_param (BindPar par)
const BindVectorget_params () const

Protected Attributes

std::string _sql
std::string _cond
BindVector _param_bind_vector

Detailed Description

Definition at line 1178 of file mysqlpl.h.


Constructor & Destructor Documentation

MySqlPL::SqlQuery::SqlQuery ( const char *  sql ) [inline, explicit]

Definition at line 1180 of file mysqlpl.h.

     :  _sql(sql)
    {
    }

Member Function Documentation

void MySqlPL::SqlQuery::bind_param ( BindPar  par )

Definition at line 821 of file mysqlpl.cpp.

References _param_bind_vector, and MySqlPL::BindVector::bind().

{
    int idx = _param_bind_vector.size();

    _param_bind_vector.resize(idx+1);

    _param_bind_vector.bind(idx, par);
}

Here is the call graph for this function:

const BindVector& MySqlPL::SqlQuery::get_params (  ) const [inline]

Definition at line 1202 of file mysqlpl.h.

References _param_bind_vector.

Referenced by MySqlPL::SqlStatement::execute().

    {
        return _param_bind_vector;
    }

Here is the caller graph for this function:

std::string MySqlPL::SqlQuery::get_sql (  ) const [inline]

Definition at line 1195 of file mysqlpl.h.

References _cond, and _sql.

Referenced by MySqlPL::SqlStatement::execute().

    {
        return _sql + _cond;
    }

Here is the caller graph for this function:

void MySqlPL::SqlQuery::where ( const char *  cond ) [inline]

Definition at line 1185 of file mysqlpl.h.

References _cond.

    {
        if (_cond.empty())
            _cond += "\nwhere   ";
        else
            _cond += "\nand ";

        _cond += cond;
    }

Member Data Documentation

std::string MySqlPL::SqlQuery::_cond [protected]

Definition at line 1209 of file mysqlpl.h.

Referenced by get_sql(), and where().

Definition at line 1211 of file mysqlpl.h.

Referenced by bind_param(), and get_params().

std::string MySqlPL::SqlQuery::_sql [protected]

Definition at line 1208 of file mysqlpl.h.

Referenced by get_sql().


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