YAPOG  0.0.1
Yet Another Pokemon Online Game
pgs::sql_bind_param Class Reference

sql_bind_param class. To be used for pg_stream internal purposes More...

#include <pgstream.hpp>

Collaboration diagram for pgs::sql_bind_param:

List of all members.

Public Types

enum  type_oid {
  oid_bool = 16, oid_bytea = 17, oid_int8 = 20, oid_int2 = 21,
  oid_int4 = 23, oid_text = 25, oid_varchar = 1043, oid_numeric = 1700
}

Public Member Functions

 sql_bind_param ()
 sql_bind_param (const std::string s, int param_pos)
virtual ~sql_bind_param ()
void offset (int off)
void reset_offset ()
const std::string name () const
const std::string type_name () const
const std::string value () const
bool null () const
int pg_type () const
int pos () const
void set_null ()
void set_type (enum type_oid o)
void set_type (const char *)
void set_value (const char *buf)
void set_binary_data (const void *buf, unsigned int sz)
const void * data_ptr () const
unsigned int data_size () const

Private Attributes

std::string m_name
std::string m_value
std::string m_type_name
const void * m_data_ptr
unsigned int m_data_size
int m_offset
int m_initial_offset
int m_type_oid
bool m_null

Static Private Attributes

static const char * m_type_names []
static int m_oids []

Detailed Description

sql_bind_param class. To be used for pg_stream internal purposes

Definition at line 119 of file pgstream.hpp.


Member Enumeration Documentation

Enumerator:
oid_bool 
oid_bytea 
oid_int8 
oid_int2 
oid_int4 
oid_text 
oid_varchar 
oid_numeric 

Definition at line 143 of file pgstream.hpp.


Constructor & Destructor Documentation

pgs::sql_bind_param::sql_bind_param ( )
inline

Definition at line 122 of file pgstream.hpp.

pgs::sql_bind_param::sql_bind_param ( const std::string  s,
int  param_pos 
)
inline

Definition at line 123 of file pgstream.hpp.

virtual pgs::sql_bind_param::~sql_bind_param ( )
inlinevirtual

Definition at line 128 of file pgstream.hpp.


Member Function Documentation

const void* pgs::sql_bind_param::data_ptr ( ) const
inline

Definition at line 160 of file pgstream.hpp.

unsigned int pgs::sql_bind_param::data_size ( ) const
inline

Definition at line 161 of file pgstream.hpp.

const std::string pgs::sql_bind_param::name ( ) const
inline

Definition at line 135 of file pgstream.hpp.

Here is the caller graph for this function:

bool pgs::sql_bind_param::null ( ) const
inline

Definition at line 138 of file pgstream.hpp.

void pgs::sql_bind_param::offset ( int  off)
inline

Definition at line 129 of file pgstream.hpp.

int pgs::sql_bind_param::pg_type ( ) const
inline

Definition at line 139 of file pgstream.hpp.

int pgs::sql_bind_param::pos ( ) const
inline

Definition at line 140 of file pgstream.hpp.

Here is the caller graph for this function:

void pgs::sql_bind_param::reset_offset ( )
inline

Definition at line 132 of file pgstream.hpp.

void pgs::sql_bind_param::set_binary_data ( const void *  buf,
unsigned int  sz 
)
inline

Definition at line 156 of file pgstream.hpp.

Here is the caller graph for this function:

void pgs::sql_bind_param::set_null ( )
inline

Definition at line 141 of file pgstream.hpp.

Here is the caller graph for this function:

void pgs::sql_bind_param::set_type ( enum type_oid  o)

Definition at line 65 of file pgstream.cpp.

Here is the caller graph for this function:

void pgs::sql_bind_param::set_type ( const char *  t)

Definition at line 51 of file pgstream.cpp.

void pgs::sql_bind_param::set_value ( const char *  buf)
inline

Definition at line 155 of file pgstream.hpp.

Here is the caller graph for this function:

const std::string pgs::sql_bind_param::type_name ( ) const
inline

Definition at line 136 of file pgstream.hpp.

const std::string pgs::sql_bind_param::value ( ) const
inline

Definition at line 137 of file pgstream.hpp.


Member Data Documentation

const void* pgs::sql_bind_param::m_data_ptr
private

Definition at line 166 of file pgstream.hpp.

unsigned int pgs::sql_bind_param::m_data_size
private

Definition at line 167 of file pgstream.hpp.

int pgs::sql_bind_param::m_initial_offset
private

Definition at line 169 of file pgstream.hpp.

std::string pgs::sql_bind_param::m_name
private

Definition at line 163 of file pgstream.hpp.

bool pgs::sql_bind_param::m_null
private

Definition at line 171 of file pgstream.hpp.

int pgs::sql_bind_param::m_offset
private

Definition at line 168 of file pgstream.hpp.

int pgs::sql_bind_param::m_oids
staticprivate
Initial value:

Definition at line 173 of file pgstream.hpp.

std::string pgs::sql_bind_param::m_type_name
private

Definition at line 165 of file pgstream.hpp.

const char * pgs::sql_bind_param::m_type_names
staticprivate
Initial value:
{
"bigint",
"bool",
"bytea",
"int",
"numeric",
"smallint",
"text",
"varchar"
}

Definition at line 172 of file pgstream.hpp.

int pgs::sql_bind_param::m_type_oid
private

Definition at line 170 of file pgstream.hpp.

std::string pgs::sql_bind_param::m_value
private

Definition at line 164 of file pgstream.hpp.


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