The Battle for Wesnoth  1.15.5+dev
Public Member Functions | Private Attributes | Friends | List of all members
mariadb::bind Class Reference

#include <bind.hpp>

Public Member Functions

 bind (MYSQL_BIND *mysql_bind)
 Construct a parameter bind. More...
 bind (MYSQL_BIND *mysql_bind, MYSQL_FIELD *mysql_field)
 Construct a result bind for given field type. More...
 bind (const bind &)=delete
 bind (bind &&)=delete
bindoperator= (const bind &)=delete
bindoperator= (bind &&)=delete
char * buffer () const
long unsigned int length () const
bool is_null () const
void set (enum_field_types type, const char *buffer=nullptr, unsigned long length=0, bool us=false)

Private Attributes

MYSQL_BIND * m_bind
my_bool m_is_null
my_bool m_error
data_ref m_data
union {
   u64   m_unsigned64
   s64   m_signed64
   s32   m_signed32 [2]
   f64   m_double64
   f32   m_float32 [2]
   u8   m_uchar8 [4]


class statement
class result_set

Detailed Description

Definition at line 20 of file bind.hpp.

Constructor & Destructor Documentation

◆ bind() [1/4]

bind::bind ( MYSQL_BIND *  mysql_bind)

Construct a parameter bind.

Definition at line 17 of file bind.cpp.

References m_bind, m_error, m_is_null, and m_unsigned64.

◆ bind() [2/4]

bind::bind ( MYSQL_BIND *  mysql_bind,
MYSQL_FIELD *  mysql_field 

Construct a result bind for given field type.

Definition at line 30 of file bind.cpp.

◆ bind() [3/4]

mariadb::bind::bind ( const bind )

◆ bind() [4/4]

mariadb::bind::bind ( bind &&  )

Member Function Documentation

◆ buffer()

char * bind::buffer ( ) const

Definition at line 34 of file bind.cpp.

References m_data, and m_unsigned64.

◆ is_null()

bool bind::is_null ( ) const

Definition at line 42 of file bind.cpp.

References m_is_null.

◆ length()

unsigned long bind::length ( ) const

Definition at line 40 of file bind.cpp.

References m_bind.

◆ operator=() [1/2]

bind& mariadb::bind::operator= ( const bind )

◆ operator=() [2/2]

bind& mariadb::bind::operator= ( bind &&  )

◆ set()

void bind::set ( enum_field_types  type,
const char *  buffer = nullptr,
unsigned long  length = 0,
bool  us = false 

Definition at line 44 of file bind.cpp.

References m_bind, m_data, and m_time.

Referenced by mariadb::statement::set_null().

Friends And Related Function Documentation

◆ result_set

friend class result_set

Definition at line 22 of file bind.hpp.

◆ statement

friend class statement

Definition at line 21 of file bind.hpp.

Member Data Documentation

◆ @18

union { ... }

◆ m_bind

MYSQL_BIND* mariadb::bind::m_bind

Definition at line 53 of file bind.hpp.

Referenced by bind(), length(), and set().

◆ m_data

data_ref mariadb::bind::m_data

Definition at line 59 of file bind.hpp.

Referenced by buffer(), and set().

◆ m_double64

f64 mariadb::bind::m_double64

Definition at line 65 of file bind.hpp.

◆ m_error

my_bool mariadb::bind::m_error

Definition at line 57 of file bind.hpp.

Referenced by bind().

◆ m_float32

f32 mariadb::bind::m_float32[2]

Definition at line 66 of file bind.hpp.

◆ m_is_null

my_bool mariadb::bind::m_is_null

Definition at line 56 of file bind.hpp.

Referenced by bind(), and is_null().

◆ m_signed32

s32 mariadb::bind::m_signed32[2]

Definition at line 64 of file bind.hpp.

◆ m_signed64

s64 mariadb::bind::m_signed64

Definition at line 63 of file bind.hpp.

◆ m_time

MYSQL_TIME mariadb::bind::m_time

Definition at line 54 of file bind.hpp.

Referenced by set().

◆ m_uchar8

u8 mariadb::bind::m_uchar8[4]

Definition at line 67 of file bind.hpp.

◆ m_unsigned64

u64 mariadb::bind::m_unsigned64

Definition at line 62 of file bind.hpp.

Referenced by bind(), and buffer().

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