Public Member Functions | Public Attributes

MySqlPL::BindPar Struct Reference

#include <mysqlpl.h>

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

List of all members.

Public Member Functions

 BindPar ()
 BindPar (const char *buffer, int len=-1, enum_field_types type=MYSQL_TYPE_VAR_STRING, my_bool *pind=NULL)
 BindPar (const std::string &str)
 BindPar (const int &var, my_bool *pind=NULL)
 BindPar (const LONGLONG &var, my_bool *pind=NULL)
 BindPar (const double &var, my_bool *pind=NULL)

Public Attributes

void * _ptr
int _len
enum_field_types _type
my_bool * _pind
unsigned long * _plen

Detailed Description

Definition at line 675 of file mysqlpl.h.


Constructor & Destructor Documentation

MySqlPL::BindPar::BindPar (  ) [inline]

Definition at line 683 of file mysqlpl.h.

References _len, _pind, _plen, _ptr, and _type.

    {
        _ptr    = NULL;
        _len    = 0;
        _type   = (enum_field_types)-1;
        _pind   = NULL;
        _plen   = NULL;
    }
MySqlPL::BindPar::BindPar ( const char *  buffer,
int  len = -1,
enum_field_types  type = MYSQL_TYPE_VAR_STRING,
my_bool *  pind = NULL 
) [inline]

Definition at line 692 of file mysqlpl.h.

References _len, _pind, _plen, _ptr, and _type.

    {
        _ptr    = (void*) buffer;
        if (len == -1)  // not applicable for OUT variables
            _len = strlen(buffer);
        else
            _len = len;
        _type   = type;
        _pind   = pind;
        _plen   = NULL;
    }
MySqlPL::BindPar::BindPar ( const std::string &  str ) [inline]

Definition at line 704 of file mysqlpl.h.

References _len, _pind, _plen, _ptr, _type, and MYSQL_TYPE_VAR_STRING.

    {
        _ptr    = (void*) str.c_str();
        _len    = str.length();
        _type   = MYSQL_TYPE_VAR_STRING;
        _pind   = NULL;
        _plen   = NULL;
    }
MySqlPL::BindPar::BindPar ( const int &  var,
my_bool *  pind = NULL 
) [inline]

Definition at line 724 of file mysqlpl.h.

References _len, _pind, _plen, _ptr, _type, and MYSQL_TYPE_LONG.

    {
        _ptr    = (void*)&var;
        _len    = sizeof(var);
        _type   = MYSQL_TYPE_LONG;
        _pind   = pind;
        _plen   = NULL;
    }
MySqlPL::BindPar::BindPar ( const LONGLONG &  var,
my_bool *  pind = NULL 
) [inline]

Definition at line 733 of file mysqlpl.h.

References _len, _pind, _plen, _ptr, _type, and MYSQL_TYPE_LONGLONG.

    {
        _ptr    = (void*)&var;
        _len    = sizeof(var);
        _type   = MYSQL_TYPE_LONGLONG;
        _pind   = pind;
        _plen   = NULL;
    }
MySqlPL::BindPar::BindPar ( const double &  var,
my_bool *  pind = NULL 
) [inline]

Definition at line 742 of file mysqlpl.h.

References _len, _pind, _plen, _ptr, _type, and MYSQL_TYPE_DOUBLE.

    {
        _ptr    = (void*)&var;
        _len    = sizeof(var);
        _type   = MYSQL_TYPE_DOUBLE;
        _pind   = pind;
        _plen   = NULL;
    }

Member Data Documentation

Definition at line 678 of file mysqlpl.h.

Referenced by BindPar(), and MySqlPL::SqlStatement::create_bound_sql().

Definition at line 680 of file mysqlpl.h.

Referenced by BindPar().

unsigned long* MySqlPL::BindPar::_plen

Definition at line 681 of file mysqlpl.h.

Referenced by BindPar().

Definition at line 677 of file mysqlpl.h.

Referenced by BindPar(), and MySqlPL::SqlStatement::create_bound_sql().

enum_field_types MySqlPL::BindPar::_type

Definition at line 679 of file mysqlpl.h.

Referenced by BindPar(), and MySqlPL::SqlStatement::create_bound_sql().


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