Home / Open source / Terimber 2.0
dbserver_impl Class Referenceimplements most of the methods of the dbserver interface
More...
#include <db.h>
List of all members.
|
Public Member Functions |
virtual size_t | get_ident () const |
| returns current ident
|
virtual bool | is_ready () const |
| returns current state for asynchronous actions
|
virtual size_t | get_code () const |
| returns error code
|
virtual const char * | get_error () const |
| returns error description, NULL will be returned if there are no errors
|
virtual bool | connect (bool trusted_connection, const char *connect_string) |
| establishes db connection the syntax of the connection string depends on db server type
|
virtual bool | disconnect () |
| closes connection
|
virtual bool | start_transaction () |
| starts transaction
|
virtual bool | commit () |
| commits transaction
|
virtual bool | rollback () |
| rolls back transaction
|
virtual bool | is_connect () const |
| returns the connection status
|
virtual bool | is_in_transaction () const |
| returns the transaction status
|
virtual bool | is_connect_alive () |
| checks if ythe connection is alive or not
|
virtual bool | resize_params (size_t size) |
| resizes the parameters
|
virtual size_t | get_param_count () const |
| gets parameter count
|
virtual dbtypes | get_param_type (size_t index) const |
| returns the virtual db terimber type
|
virtual db_param_type | get_param_in_out (size_t index) const |
| returns the in/out
|
virtual bool | get_param_is_null (size_t index) const |
| returns the nullable - database specific
|
virtual bool | get_param_as_bool (size_t index) const |
| returns param value as boolean
|
virtual sb1_t | get_param_as_char (size_t index) const |
| returns param value as char
|
virtual ub1_t | get_param_as_byte (size_t index) const |
| returns param value as byte
|
virtual sb2_t | get_param_as_short (size_t index) const |
| returns param value as short
|
virtual ub2_t | get_param_as_word (size_t index) const |
| returns param value as word
|
virtual sb4_t | get_param_as_long (size_t index) const |
| returns param value as long
|
virtual ub4_t | get_param_as_dword (size_t index) const |
| returns param value as dword
|
virtual float | get_param_as_float (size_t index) const |
| returns param value as float
|
virtual double | get_param_as_double (size_t index) const |
| returns param value as double
|
virtual sb8_t | get_param_as_long64 (size_t index) const |
| returns param value as long64
|
virtual ub8_t | get_param_as_dword64 (size_t index) const |
| returns param value as dword64
|
virtual bool | get_param_as_guid (size_t index, guid_t &val) const |
| returns param value as guid for high performance we are using reference
|
virtual const char * | get_param_as_numeric (size_t index, char delimeter) const |
| returns param value as numeric delimeter defines the desirable delimeter sign
|
virtual const char * | get_param_as_decimal (size_t index, char delimeter) const |
| returns param value as decimal delimeter defines the desirable delimeter sign
|
virtual bool | get_param_as_date (size_t index, ub4_t &year, ub1_t &month, ub1_t &day, ub1_t &hour, ub1_t &minute, ub1_t &second, ub2_t &millisec, ub1_t &wday, ub2_t &yday) const |
| returns param value as date to avoid confusions with different date format functions returns parsed date
|
virtual const char * | get_param_as_string (size_t index) const |
| returns param value as string NB!!! return value can be allocated on a temporary allocator
|
virtual const wchar_t * | get_param_as_wstring (size_t index) const |
| returns param value as wide string NB!!! return value can be allocated on a temporary allocator
|
virtual const ub1_t * | get_param_as_binary (size_t index, size_t &len) const |
| returns param value as binary NB!!! return value can be allocated on a temporary allocator
|
virtual const ub1_t * | get_param_as_binary_ptr (size_t index) const |
| returns param value as binary pointer the format of buffer is as following first size_t bytes the length of the rest of buffer, which contains the raw byte data NB!!! return value can be allocated on a temporary allocator
|
virtual bool | set_param_as_null (size_t index, db_param_type in_out, dbtypes type) |
| sets parameter as null
|
virtual bool | set_param_as_bool (size_t index, db_param_type in_out, bool val) |
| sets parameter as boolean
|
virtual bool | set_param_as_char (size_t index, db_param_type in_out, sb1_t val) |
| sets parameter as char
|
virtual bool | set_param_as_byte (size_t index, db_param_type in_out, ub1_t val) |
| sets parameter as byte
|
virtual bool | set_param_as_short (size_t index, db_param_type in_out, sb2_t val) |
| sets parameter as short
|
virtual bool | set_param_as_word (size_t index, db_param_type in_out, ub2_t val) |
| sets parameter as word
|
virtual bool | set_param_as_long (size_t index, db_param_type in_out, sb4_t val) |
| sets parameter as long
|
virtual bool | set_param_as_dword (size_t index, db_param_type in_out, ub4_t val) |
| sets parameter as dword
|
virtual bool | set_param_as_float (size_t index, db_param_type in_out, float val) |
| sets parameter as float
|
virtual bool | set_param_as_double (size_t index, db_param_type in_out, double val) |
| sets parameter as double
|
virtual bool | set_param_as_long64 (size_t index, db_param_type in_out, sb8_t val) |
| sets parameter as long64
|
virtual bool | set_param_as_dword64 (size_t index, db_param_type in_out, ub8_t val) |
| sets parameter as dword64
|
virtual bool | set_param_as_guid (size_t index, db_param_type in_out, const guid_t &val) |
| sets parameter as guid
|
virtual bool | set_param_as_numeric (size_t index, db_param_type in_out, const char *val, char delimeter) |
| sets parameter as numeric -1223456.7894 - delimeter here "." -1223456,7894 - delimeter here ","
|
virtual bool | set_param_as_decimal (size_t index, db_param_type in_out, const char *val, char delimeter) |
| sets parameter as decimal
|
virtual bool | set_param_as_date (size_t index, db_param_type in_out, ub4_t year, ub1_t month, ub1_t day, ub1_t hour, ub1_t minute, ub1_t second, ub2_t millisec) |
| sets parameter as date date from A.C. year > 0
|
virtual bool | set_param_as_string (size_t index, db_param_type in_out, const char *val, size_t len, size_t max_len=0) |
| sets parameter as string
|
virtual bool | set_param_as_string_ptr (size_t index, const char *val) |
| sets parameter as string pointer to avoid copying already allocated memory, the only pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statment is executed.
|
virtual bool | set_param_as_wstring (size_t index, db_param_type in_out, const wchar_t *val, size_t len, size_t max_len=0) |
| sets parameter as wide string
|
virtual bool | set_param_as_wstring_ptr (size_t index, const wchar_t *val) |
| sets parameter as wide string pointer to avoid copying already allocated memory, the only pointer can be used be careful! the caller is responsible for the life time of tee provided pointer, which has to be valid until the sql statment is executed.
|
virtual bool | set_param_as_binary (size_t index, db_param_type in_out, const ub1_t *val, size_t len, size_t max_len=0) |
| sets parameter as binary val points to the valid buffer of raw byte of "len" length
|
virtual bool | set_param_as_binary_ptr (size_t index, const ub1_t *val) |
| sets parameter as binary pointer to avoid copying already allocated huge memory, only the pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statment is executed. it is supposed to workonly for input parameters, not for output or input/output ones the format of the buffer must be as follows first size_t bytes the length of the rest of buffer, which contains the raw byte data
|
virtual size_t | get_column_count () const |
| gets column count
|
virtual dbtypes | get_column_type (size_t index) const |
| returns the terimber db type
|
virtual const char * | get_column_name (size_t index) const |
| returns the name
|
virtual bool | get_column_nullable (size_t index) const |
| returns the nullable - database specific
|
virtual size_t | get_column_scale (size_t index) const |
| returns the scale
|
virtual size_t | get_column_precision (size_t index) const |
| returns the precision
|
virtual size_t | get_column_max_length (size_t index) const |
| returns the length of parameter (only for output binders)
|
virtual size_t | get_row_count () const |
| gets row count
|
virtual void | reset () const |
| resets internal cursor next to the last element
|
virtual bool | next () const |
| tries to find the next row, after reset it goes to the first row
|
virtual bool | prev () const |
| tries to find the previous row
|
virtual bool | get_value_is_null (size_t index) const |
| checks if value is null returns param value
|
virtual bool | get_value_as_bool (size_t index) const |
| gets value as boolean
|
virtual sb1_t | get_value_as_char (size_t index) const |
| gets value as char
|
virtual ub1_t | get_value_as_byte (size_t index) const |
| gets value as byte
|
virtual sb2_t | get_value_as_short (size_t index) const |
| gets value as short
|
virtual ub2_t | get_value_as_word (size_t index) const |
| gets value as word
|
virtual sb4_t | get_value_as_long (size_t index) const |
| gets value as long
|
virtual ub4_t | get_value_as_dword (size_t index) const |
| gets value as dword
|
virtual float | get_value_as_float (size_t index) const |
| gets value as float
|
virtual double | get_value_as_double (size_t index) const |
| gets value as double
|
virtual sb8_t | get_value_as_long64 (size_t index) const |
| gets value as long64
|
virtual ub8_t | get_value_as_dword64 (size_t index) const |
| gets value as dword64
|
virtual bool | get_value_as_guid (size_t index, guid_t &val) const |
| gets value as guid for high performance we are using reference
|
virtual const char * | get_value_as_numeric (size_t index, char delimeter) const |
| gets value as numeric delimeter defines the desirable delimeter sign
|
virtual const char * | get_value_as_decimal (size_t index, char delimeter) const |
| gets value as decimal delimeter defines the desirable delimeter sign
|
virtual bool | get_value_as_date (size_t index, ub4_t &year, ub1_t &month, ub1_t &day, ub1_t &hour, ub1_t &minute, ub1_t &second, ub2_t &millisec, ub1_t &wday, ub2_t &yday) const |
| gets value as date to avoid confusions with different date format functions returns parsed date
|
virtual const char * | get_value_as_string (size_t index) const |
| gets value as string NB!!! return value can be allocated on a temporary allocator
|
virtual const wchar_t * | get_value_as_wstring (size_t index) const |
| gets value as wide string NB!!! return value can be allocated on a temporary allocator
|
virtual const ub1_t * | get_value_as_binary (size_t index, size_t &len) const |
| gets value as binary returns pointer to the raw bytes size of bytes is put to len
|
virtual const ub1_t * | get_value_as_binary_ptr (size_t index) const |
| gets value as binary pointer for reusing only the format of buffer is as following first size_t bytes the length of the rest of buffer, which contains the raw byte data
|
virtual bool | is_open_sql () const |
| checks if sql is open
|
virtual bool | open_sql (bool async, const char *sql) |
| executes parameterized sql statement with recordset result
|
virtual bool | exec_sql (bool async, const char *sql) |
| executes parameterized sql statement without result
|
virtual bool | open_proc (bool async, const char *name) |
| executes stored procedure with recordset result
|
virtual bool | exec_proc (bool async, const char *name) |
| executes stored procedure without result
|
virtual bool | fetch_data (bool async, size_t start_row, size_t num_rows, bool forward) |
| fetches data and returns recordset
|
virtual bool | close_sql () |
| close sql - free allocated resources
|
virtual bool | interrupt_request () |
| interrupts asychronous request
|
virtual bool | set_quote (char quote) |
| the syntax of sql statement with binders must be understandable for internal sql processor therefore it should look like select * from table where pk = :pk here ':' char is an identificator of the parameter with the name "pk" function set_quote allows to change this identificator to the preferable one
|
virtual void | set_callback (async_db_notify *target) |
| sets the callback function for asynchronous actions
|
virtual void | remove_callback (async_db_notify *target) |
| removes the callback function for asynchronous actions
|
virtual bool | param_bulk_store () |
| current set of parameters previously set by set_param_* functions will be moved to the bulk parameters list the current parameters set will have the same values, but will not participate in bulk operations moreover if the next call set_param_* function will change the type - all bulk parameters will be deleted.
|
virtual bool | param_bulk_remove () |
| removes the last stored parameter
|
virtual bool | param_bulk_remove_all () |
| removes all
|
Static Public Member Functions |
static vt_types | convert_types (dbtypes type) |
| converts db terimber type into virtual terimber type
|
Protected Types |
enum | action {
ACTION_NONE = 0,
ACTION_OPEN_SQL,
ACTION_OPEN_PROC,
ACTION_EXEC_SQL,
ACTION_EXEC_PROC,
ACTION_FETCH,
ACTION_OPEN_SQL_ASYNC,
ACTION_OPEN_PROC_ASYNC,
ACTION_EXEC_SQL_ASYNC,
ACTION_EXEC_PROC_ASYNC,
ACTION_FETCH_ASYNC
} |
| predifined actions More...
|
Protected Member Functions |
| dbserver_impl (size_t ident) |
| constructor
|
virtual | ~dbserver_impl () |
| destructor
|
virtual void | v_connect (bool trusted_connection, const char *connection_string)=0 |
| establishes connection to db
|
virtual void | v_disconnect ()=0 |
| closes connection
|
virtual void | v_start_transaction ()=0 |
| starts transaction
|
virtual void | v_commit ()=0 |
| commits transaction
|
virtual void | v_rollback ()=0 |
| rolls back transaction
|
virtual bool | v_is_connect_alive ()=0 |
| checks if the connection is alive
|
bool | _is_connect () const |
| inline functions
|
bool | _is_in_transaction () const |
| checks the transaction state
|
bool | _is_open_sql () const |
| checks open status
|
void | _get_number_params () |
| gets number params in query
|
void | _rebind_params () |
| rebinds all params
|
void | _bind_params () |
| binds all params
|
void | _bind_columns () |
| binds all columns
|
void | _get_columns_info () |
| gets columns info
|
virtual void | v_before_execute ()=0 |
| pure virtual functions
|
virtual void | v_after_execute ()=0 |
| calls additional function after executing the sql statement
|
virtual void | v_execute ()=0 |
| executes SQL expression
|
virtual void | v_close ()=0 |
| closes opened query
|
virtual void | v_fetch ()=0 |
| fetches block of rows
|
virtual void | v_replace_quote ()=0 |
| replaces quote to the available sign for native drive
|
virtual void | v_bind_one_param (size_t index)=0 |
| binds one param by index
|
virtual void | v_before_bind_columns ()=0 |
| before bind columns sometimes we got db specific
|
virtual void | v_bind_one_column (size_t index)=0 |
| binds one column by index
|
virtual size_t | v_get_number_columns ()=0 |
| gets number columns in query
|
virtual void | v_convert_one_value (size_t row, size_t col, terimber_db_value &val)=0 |
| converts one field value to variant buffer
|
virtual void | v_get_one_column_info (size_t index)=0 |
| gets one column info from native driver
|
virtual void | v_form_sql_string ()=0 |
| forms SQL expression depending on type selected and native driver
|
virtual void | v_rebind_one_param (size_t index)=0 |
| rebinds one param for input/output or output params
|
virtual void | v_interrupt_async ()=0 |
| terminates asynchronous action
|
virtual dbtypes | v_native_type_to_client_type (size_t native_type)=0 |
| converts types
|
bool | v_has_job (size_t ident, void *user_data) |
| checks for job
|
void | v_do_job (size_t ident, void *user_data) |
| does the real job
|
virtual void | _notify_async (bool noerrors, size_t ident) |
| notifies subscribers
|
action | get_action () const |
| returns current action
|
module_state | get_state () const |
| returns the current state
|
Protected Attributes |
mem_pool_t | _manager |
| memory allocator pool
|
byte_allocator * | _temp_allocator |
| temporary memory allocator
|
mutex | _mtx |
| multithreaded mutex
|
size_t | _ident |
| server ident
|
size_t | _code |
| code of the last error
|
string_t | _error |
| last error description
|
byte_allocator * | _columns_allocator |
| columns allocator
|
byte_allocator * | _data_allocator |
| data allocator
|
byte_allocator * | _bulk_allocator |
| bulk params allocator
|
byte_allocator | _sql_allocator |
| sql allocator
|
string_t | _sql |
| SQL statement.
|
char | _quote |
| quote
|
params_t | _params |
| parameters
|
bulk_params_t | _bulk_params |
| bulk parameters
|
binders_t | _cols |
| column
|
recordset_list_t | _data |
| output recodset
|
size_t | _start_row |
| start row for fetching
|
size_t | _requested_rows |
| rows to fetch
|
size_t | _fetched_rows |
| actually fetched rows
|
bool | _forward |
| fetching direction
|
size_t | _bulk_rows |
| bulk rows for select
|
Private Types |
typedef list< async_db_notify * > | async_db_notify_list_t |
| list of callback pointers
|
Private Member Functions |
void | _set_connect () |
| sets the connect state
|
void | _set_disconnect () |
| sets the disconnect state
|
void | _set_in_transaction () |
| sets the transaction state on
|
void | _set_out_transaction () |
| sets the transaction state off
|
void | _set_open () |
| sets the open state
|
void | _set_close () |
| sets the close state
|
void | _set_action (action action_) |
| sets action
|
void | _set_state (module_state state) |
| sets a new state
|
void | _check_connect () |
| makes sure the connection is established
|
void | _check_disconnect () |
| makes sure the connection is closed
|
void | _check_in_transaction () |
| makes sure the transaction is on
|
void | _check_out_transaction () |
| makes sure the transaction is off
|
void | _check_state () |
| checks if the state is OK
|
void | _check_open () const |
| checks open state; must be open or exception will be thrown
|
void | _check_close () const |
| checks close state; must be closed or exception will be thrown
|
void | _check_action () const |
| checks action state; must be none or exception will be thrown
|
bool | _is_asynchronous_action () const |
| checks asynchronous action
|
void | _process_sql (const char *sql) |
| processes sql statement
|
void | _start_thread () |
| starts thread for asynchronous actions
|
terimber_xml_value | get_param_as_value (size_t index, vt_types type) const |
| converts parameter value (if required)
|
terimber_xml_value | get_value_as_value (size_t index, vt_types type) const |
| converts column value (if required)
|
recordset_list_t::iterator | get_iter_end () const |
| returns end iterator
|
recordset_list_t::iterator | get_iter_begin () const |
| returns begin iterator
|
Private Attributes |
bool | _connection |
| connection state
|
bool | _transaction |
| transaction state
|
bool | _trusted |
| trusted connecton flag
|
string_t | _connect_string |
| connection string
|
volatile module_state | _state |
| server state
|
volatile action | _action |
| server action
|
volatile bool | _is_open |
| open flag
|
thread | _thread |
| thread
|
async_db_notify_list_t | _list_callback |
| list of callbacks
|
recordset_list_t::iterator | _iter |
| recordset part
|
Classes |
class | callback_finder |
| class help to find callback More...
|
class | callback_fire |
| class help the stl algorithm for_each to fire events More...
|
Detailed Description
implements most of the methods of the dbserver interface
Definition at line 323 of file db.h.
Member Typedef Documentation
list of callback pointers
Definition at line 328 of file db.h.
Member Enumeration Documentation
predifined actions
- Enumerator:
-
ACTION_NONE |
nothing to do |
ACTION_OPEN_SQL |
open sql like --select * from table-- |
ACTION_OPEN_PROC |
open rowset through stored procedure |
ACTION_EXEC_SQL |
execute sql statment like -- insert into t_names(name) values('John'); |
ACTION_EXEC_PROC |
execute sql statment like -- exec sp_find_id(:id); |
ACTION_FETCH |
fetch data |
ACTION_OPEN_SQL_ASYNC |
open sql asynchronousally |
ACTION_OPEN_PROC_ASYNC |
open proc asynchronousally |
ACTION_EXEC_SQL_ASYNC |
execute sql asynchronousally |
ACTION_EXEC_PROC_ASYNC |
execute proc asynchronousally |
ACTION_FETCH_ASYNC |
fetch data asynchronousally |
Definition at line 375 of file db.h.
Constructor & Destructor Documentation
dbserver_impl::dbserver_impl |
( |
size_t |
ident |
) |
[protected] |
dbserver_impl::~dbserver_impl |
( |
|
) |
[protected, virtual] |
Member Function Documentation
size_t dbserver_impl::get_ident |
( |
|
) |
const [virtual] |
bool dbserver_impl::is_ready |
( |
|
) |
const [virtual] |
size_t dbserver_impl::get_code |
( |
|
) |
const [virtual] |
const char * dbserver_impl::get_error |
( |
|
) |
const [virtual] |
returns error description, NULL will be returned if there are no errors
Implements dbserver.
Definition at line 458 of file db.cpp.
References _error.
bool dbserver_impl::connect |
( |
bool |
trusted_connection, |
|
|
const char * |
connect_string | |
|
) |
| | [virtual] |
bool dbserver_impl::disconnect |
( |
|
) |
[virtual] |
bool dbserver_impl::start_transaction |
( |
|
) |
[virtual] |
bool dbserver_impl::commit |
( |
|
) |
[virtual] |
bool dbserver_impl::rollback |
( |
|
) |
[virtual] |
bool dbserver_impl::is_connect |
( |
|
) |
const [virtual] |
bool dbserver_impl::is_in_transaction |
( |
|
) |
const [virtual] |
bool dbserver_impl::is_connect_alive |
( |
|
) |
[virtual] |
bool dbserver_impl::resize_params |
( |
size_t |
size |
) |
[virtual] |
size_t dbserver_impl::get_param_count |
( |
|
) |
const [virtual] |
dbtypes dbserver_impl::get_param_type |
( |
size_t |
index |
) |
const [virtual] |
db_param_type dbserver_impl::get_param_in_out |
( |
size_t |
index |
) |
const [virtual] |
bool dbserver_impl::get_param_is_null |
( |
size_t |
index |
) |
const [virtual] |
bool dbserver_impl::get_param_as_bool |
( |
size_t |
index |
) |
const [virtual] |
sb1_t dbserver_impl::get_param_as_char |
( |
size_t |
index |
) |
const [virtual] |
ub1_t dbserver_impl::get_param_as_byte |
( |
size_t |
index |
) |
const [virtual] |
sb2_t dbserver_impl::get_param_as_short |
( |
size_t |
index |
) |
const [virtual] |
ub2_t dbserver_impl::get_param_as_word |
( |
size_t |
index |
) |
const [virtual] |
sb4_t dbserver_impl::get_param_as_long |
( |
size_t |
index |
) |
const [virtual] |
ub4_t dbserver_impl::get_param_as_dword |
( |
size_t |
index |
) |
const [virtual] |
float dbserver_impl::get_param_as_float |
( |
size_t |
index |
) |
const [virtual] |
double dbserver_impl::get_param_as_double |
( |
size_t |
index |
) |
const [virtual] |
sb8_t dbserver_impl::get_param_as_long64 |
( |
size_t |
index |
) |
const [virtual] |
ub8_t dbserver_impl::get_param_as_dword64 |
( |
size_t |
index |
) |
const [virtual] |
bool dbserver_impl::get_param_as_guid |
( |
size_t |
index, |
|
|
guid_t & |
val | |
|
) |
| | const [virtual] |
const char * dbserver_impl::get_param_as_numeric |
( |
size_t |
index, |
|
|
char |
delimeter | |
|
) |
| | const [virtual] |
returns param value as numeric delimeter defines the desirable delimeter sign
- Parameters:
-
index |
parameter index |
delimeter |
delimeter |
Implements dbserver.
Definition at line 717 of file db.cpp.
References _temp_allocator, byte_allocator::allocate(), _terimber_xml_value_::bufVal, numeric::format(), get_param_as_value(), numeric::is_zero(), numeric::parse_orcl(), numeric::precision(), numeric::scale(), numeric::sign(), and vt_numeric.
Referenced by get_param_as_decimal().
const char * dbserver_impl::get_param_as_decimal |
( |
size_t |
index, |
|
|
char |
delimeter | |
|
) |
| | const [virtual] |
returns param value as decimal delimeter defines the desirable delimeter sign
- Parameters:
-
index |
parameter index |
delimeter |
delimeter |
Implements dbserver.
Definition at line 737 of file db.cpp.
References get_param_as_numeric().
returns param value as date to avoid confusions with different date format functions returns parsed date
- Parameters:
-
index |
parameter index |
year |
[out] year [0-1000000] from 1 A.D. |
month |
[out] month [1-12] |
day |
[out] day [1-31] |
hour |
[out] hour [0-23] |
minute |
[out] minute [0-59] |
second |
[out] second [0-59] |
millisec |
[out] millisecond [0-999] |
wday |
[out] day of week [1-7] |
yday |
[out] day of year [1-366] |
Implements dbserver.
Definition at line 744 of file db.cpp.
References date::convert_from(), get_param_as_value(), _terimber_xml_value_::intVal, and vt_date.
const char * dbserver_impl::get_param_as_string |
( |
size_t |
index |
) |
const [virtual] |
const wchar_t * dbserver_impl::get_param_as_wstring |
( |
size_t |
index |
) |
const [virtual] |
const ub1_t * dbserver_impl::get_param_as_binary |
( |
size_t |
index, |
|
|
size_t & |
len | |
|
) |
| | const [virtual] |
const ub1_t * dbserver_impl::get_param_as_binary_ptr |
( |
size_t |
index |
) |
const [virtual] |
returns param value as binary pointer the format of buffer is as following first size_t bytes the length of the rest of buffer, which contains the raw byte data NB!!! return value can be allocated on a temporary allocator
- Parameters:
-
Implements dbserver.
Definition at line 784 of file db.cpp.
References _terimber_xml_value_::bufVal, get_param_as_value(), and vt_binary.
bool dbserver_impl::set_param_as_null |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
dbtypes |
type | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_bool |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
bool |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_char |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
sb1_t |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_byte |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
ub1_t |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_short |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
sb2_t |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_word |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
ub2_t |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_long |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
sb4_t |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_dword |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
ub4_t |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_float |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
float |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_double |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
double |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_long64 |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
sb8_t |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_dword64 |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
ub8_t |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_guid |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
const guid_t & |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_numeric |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
const char * |
val, |
|
|
char |
delimeter | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_decimal |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
const char * |
val, |
|
|
char |
delimeter | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_string |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
const char * |
val, |
|
|
size_t |
len, |
|
|
size_t |
max_len = 0 | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_string_ptr |
( |
size_t |
index, |
|
|
const char * |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_wstring |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
const wchar_t * |
val, |
|
|
size_t |
len, |
|
|
size_t |
max_len = 0 | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_wstring_ptr |
( |
size_t |
index, |
|
|
const wchar_t * |
val | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_binary |
( |
size_t |
index, |
|
|
db_param_type |
in_out, |
|
|
const ub1_t * |
val, |
|
|
size_t |
len, |
|
|
size_t |
max_len = 0 | |
|
) |
| | [virtual] |
bool dbserver_impl::set_param_as_binary_ptr |
( |
size_t |
index, |
|
|
const ub1_t * |
val | |
|
) |
| | [virtual] |
sets parameter as binary pointer to avoid copying already allocated huge memory, only the pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statment is executed. it is supposed to workonly for input parameters, not for output or input/output ones the format of the buffer must be as follows first size_t bytes the length of the rest of buffer, which contains the raw byte data
- Parameters:
-
index |
parameter index |
val |
value |
Implements dbserver.
Definition at line 1121 of file db.cpp.
References _bulk_params, _params, list< T >::clear(), db_binary, base_list< T >::empty(), and base_vector< T >::size().
size_t dbserver_impl::get_column_count |
( |
|
) |
const [virtual] |
dbtypes dbserver_impl::get_column_type |
( |
size_t |
index |
) |
const [virtual] |
const char * dbserver_impl::get_column_name |
( |
size_t |
index |
) |
const [virtual] |
bool dbserver_impl::get_column_nullable |
( |
size_t |
index |
) |
const [virtual] |
size_t dbserver_impl::get_column_scale |
( |
size_t |
index |
) |
const [virtual] |
size_t dbserver_impl::get_column_precision |
( |
size_t |
index |
) |
const [virtual] |
size_t dbserver_impl::get_column_max_length |
( |
size_t |
index |
) |
const [virtual] |
size_t dbserver_impl::get_row_count |
( |
|
) |
const [virtual] |
void dbserver_impl::reset |
( |
|
) |
const [virtual] |
bool dbserver_impl::next |
( |
|
) |
const [virtual] |
bool dbserver_impl::prev |
( |
|
) |
const [virtual] |
bool dbserver_impl::get_value_is_null |
( |
size_t |
index |
) |
const [virtual] |
checks if value is null returns param value
const version of current row if index is out of range then zero will be returned the best practice is to check type before call gets value functions - Parameters:
-
Implements dbserver.
Definition at line 1258 of file db.cpp.
References _cols, _iter, get_iter_end(), and base_vector< T >::size().
bool dbserver_impl::get_value_as_bool |
( |
size_t |
index |
) |
const [virtual] |
sb1_t dbserver_impl::get_value_as_char |
( |
size_t |
index |
) |
const [virtual] |
ub1_t dbserver_impl::get_value_as_byte |
( |
size_t |
index |
) |
const [virtual] |
sb2_t dbserver_impl::get_value_as_short |
( |
size_t |
index |
) |
const [virtual] |
ub2_t dbserver_impl::get_value_as_word |
( |
size_t |
index |
) |
const [virtual] |
sb4_t dbserver_impl::get_value_as_long |
( |
size_t |
index |
) |
const [virtual] |
ub4_t dbserver_impl::get_value_as_dword |
( |
size_t |
index |
) |
const [virtual] |
float dbserver_impl::get_value_as_float |
( |
size_t |
index |
) |
const [virtual] |
double dbserver_impl::get_value_as_double |
( |
size_t |
index |
) |
const [virtual] |
sb8_t dbserver_impl::get_value_as_long64 |
( |
size_t |
index |
) |
const [virtual] |
ub8_t dbserver_impl::get_value_as_dword64 |
( |
size_t |
index |
) |
const [virtual] |
bool dbserver_impl::get_value_as_guid |
( |
size_t |
index, |
|
|
guid_t & |
val | |
|
) |
| | const [virtual] |
const char * dbserver_impl::get_value_as_numeric |
( |
size_t |
index, |
|
|
char |
delimeter | |
|
) |
| | const [virtual] |
gets value as numeric delimeter defines the desirable delimeter sign
- Parameters:
-
index |
column index |
delimeter |
delimeter |
Implements dbserver.
Definition at line 1359 of file db.cpp.
References _temp_allocator, byte_allocator::allocate(), _terimber_xml_value_::bufVal, numeric::format(), get_value_as_value(), numeric::is_zero(), numeric::parse_orcl(), numeric::precision(), numeric::scale(), numeric::sign(), and vt_numeric.
Referenced by get_value_as_decimal().
const char * dbserver_impl::get_value_as_decimal |
( |
size_t |
index, |
|
|
char |
delimeter | |
|
) |
| | const [virtual] |
gets value as decimal delimeter defines the desirable delimeter sign
- Parameters:
-
index |
column index |
delimeter |
delimeter |
Implements dbserver.
Definition at line 1385 of file db.cpp.
References get_value_as_numeric().
gets value as date to avoid confusions with different date format functions returns parsed date
- Parameters:
-
index |
column index |
year |
[out] year [0-1000000] from 1 A.D. |
month |
[out] month [1-12] |
day |
[out] day [1-31] |
hour |
[out] hour [0-23] |
minute |
[out] minute [0-59] |
second |
[out] second [0-59] |
millisec |
[out] millisecond [0-999] |
wday |
[out] day of week [1-7] |
yday |
[out] day of year [1-366] |
Implements dbserver.
Definition at line 1392 of file db.cpp.
References date::convert_from(), get_value_as_value(), _terimber_xml_value_::intVal, and vt_date.
const char * dbserver_impl::get_value_as_string |
( |
size_t |
index |
) |
const [virtual] |
const wchar_t * dbserver_impl::get_value_as_wstring |
( |
size_t |
index |
) |
const [virtual] |
const ub1_t * dbserver_impl::get_value_as_binary |
( |
size_t |
index, |
|
|
size_t & |
len | |
|
) |
| | const [virtual] |
const ub1_t * dbserver_impl::get_value_as_binary_ptr |
( |
size_t |
index |
) |
const [virtual] |
bool dbserver_impl::is_open_sql |
( |
|
) |
const [virtual] |
bool dbserver_impl::open_sql |
( |
bool |
async, |
|
|
const char * |
sql | |
|
) |
| | [virtual] |
executes parameterized sql statement with recordset result
- Parameters:
-
async |
asychronous executing flag |
sql |
SQL statement (select) |
Implements dbserver.
Definition at line 1453 of file db.cpp.
References _bind_params(), _check_action(), _check_close(), _check_state(), _get_columns_info(), _get_number_params(), _process_sql(), _set_action(), _set_open(), _start_thread(), ACTION_NONE, ACTION_OPEN_SQL, ACTION_OPEN_SQL_ASYNC, DB_CATCH, DB_TRY, and v_execute().
bool dbserver_impl::exec_sql |
( |
bool |
async, |
|
|
const char * |
sql | |
|
) |
| | [virtual] |
executes parameterized sql statement without result
- Parameters:
-
async |
asychronous executing flag |
sql |
SQL statement (DDL, DML except select) |
Implements dbserver.
Definition at line 1479 of file db.cpp.
References _bind_params(), _check_action(), _check_close(), _check_state(), _get_number_params(), _process_sql(), _rebind_params(), _set_action(), _set_open(), _start_thread(), ACTION_EXEC_SQL, ACTION_EXEC_SQL_ASYNC, ACTION_NONE, DB_CATCH, DB_TRY, and v_execute().
bool dbserver_impl::open_proc |
( |
bool |
async, |
|
|
const char * |
name | |
|
) |
| | [virtual] |
executes stored procedure with recordset result
- Parameters:
-
async |
asychronous executing flag |
name |
stored procedure name |
Implements dbserver.
Definition at line 1505 of file db.cpp.
References _bind_params(), _check_action(), _check_close(), _check_state(), _get_columns_info(), _get_number_params(), _process_sql(), _rebind_params(), _set_action(), _set_open(), _start_thread(), ACTION_NONE, ACTION_OPEN_PROC, ACTION_OPEN_PROC_ASYNC, DB_CATCH, DB_TRY, and v_execute().
bool dbserver_impl::exec_proc |
( |
bool |
async, |
|
|
const char * |
name | |
|
) |
| | [virtual] |
executes stored procedure without result
- Parameters:
-
async |
asychronous executing flag |
name |
stored procedure name |
Implements dbserver.
Definition at line 1532 of file db.cpp.
References _bind_params(), _check_action(), _check_close(), _check_state(), _get_number_params(), _process_sql(), _rebind_params(), _set_action(), _set_open(), _start_thread(), ACTION_EXEC_PROC, ACTION_EXEC_PROC_ASYNC, ACTION_NONE, DB_CATCH, DB_TRY, and v_execute().
bool dbserver_impl::fetch_data |
( |
bool |
async, |
|
|
size_t |
start_row, |
|
|
size_t |
num_rows, |
|
|
bool |
forward | |
|
) |
| | [virtual] |
fetches data and returns recordset
/ defines the start row, number of rows and fetch direction - Parameters:
-
async |
asychronous executing flag |
start_row |
start row, 0 means current |
num_rows |
rows to fetch |
forward |
direction |
Implements dbserver.
Definition at line 1559 of file db.cpp.
References _bind_columns(), _check_open(), _check_state(), _data, _data_allocator, _fetched_rows, _forward, _iter, _requested_rows, _set_action(), _start_row, _start_thread(), _temp_allocator, ACTION_FETCH, ACTION_FETCH_ASYNC, base_list< T >::clear(), DB_CATCH, DB_TRY, get_iter_end(), byte_allocator::reset(), and v_fetch().
bool dbserver_impl::close_sql |
( |
|
) |
[virtual] |
close sql - free allocated resources
Implements dbserver.
Definition at line 1591 of file db.cpp.
References _bulk_rows, _check_open(), _check_state(), _columns_allocator, _data, _data_allocator, _fetched_rows, _forward, _iter, _set_action(), _set_close(), _set_state(), _sql, _sql_allocator, _start_row, _temp_allocator, _thread, ACTION_NONE, thread::cancel_job(), base_list< T >::clear(), DB_CATCH, DB_TRY, get_iter_end(), byte_allocator::reset(), STATE_OK, and v_close().
Referenced by mysql_dbserver::~mysql_dbserver(), odbc_dbserver::~odbc_dbserver(), and orcl_dbserver::~orcl_dbserver().
bool dbserver_impl::interrupt_request |
( |
|
) |
[virtual] |
interrupts asychronous request
Implements dbserver.
Definition at line 1619 of file db.cpp.
References _set_action(), _set_state(), _thread, ACTION_NONE, thread::cancel_job(), get_state(), STATE_INTERRUPTED, STATE_OK, STATE_WORKING, v_close(), and v_interrupt_async().
bool dbserver_impl::set_quote |
( |
char |
quote |
) |
[virtual] |
the syntax of sql statement with binders must be understandable for internal sql processor therefore it should look like select * from table where pk = :pk here ':' char is an identificator of the parameter with the name "pk" function set_quote allows to change this identificator to the preferable one
- Parameters:
-
Implements dbserver.
Definition at line 1646 of file db.cpp.
References _mtx, and _quote.
bool dbserver_impl::param_bulk_store |
( |
|
) |
[virtual] |
bool dbserver_impl::param_bulk_remove |
( |
|
) |
[virtual] |
bool dbserver_impl::param_bulk_remove_all |
( |
|
) |
[virtual] |
converts db terimber type into virtual terimber type
- Parameters:
-
Definition at line 590 of file db.hpp.
References db_binary, db_bool, db_date, db_decimal, db_double, db_float, db_guid, db_numeric, db_sb1, db_sb2, db_sb4, db_sb8, db_string, db_ub1, db_ub2, db_ub4, db_ub8, db_unknown, db_wstring, vt_binary, vt_bool, vt_date, vt_decimal, vt_double, vt_float, vt_guid, vt_numeric, vt_sb1, vt_sb2, vt_sb4, vt_sb8, vt_string, vt_ub1, vt_ub2, vt_ub4, vt_ub8, vt_unknown, and vt_wstring.
Referenced by compare_db_value(), get_param_as_value(), memlookup::get_value_as_value(), terimber_db_value_vector_impl::get_value_as_value(), and get_value_as_value().
virtual void dbserver_impl::v_connect |
( |
bool |
trusted_connection, |
|
|
const char * |
connection_string | |
|
) |
| | [protected, pure virtual] |
establishes connection to db
must be overriden database specific - Parameters:
-
trusted_connection |
trusted connection flag |
connection_string |
connection string |
Implemented in orcl_dbserver, odbc_dbserver, and mysql_dbserver.
Referenced by connect().
virtual void dbserver_impl::v_disconnect |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_start_transaction |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_commit |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_rollback |
( |
|
) |
[protected, pure virtual] |
virtual bool dbserver_impl::v_is_connect_alive |
( |
|
) |
[protected, pure virtual] |
bool dbserver_impl::_is_connect |
( |
|
) |
const [inline, protected] |
bool dbserver_impl::_is_in_transaction |
( |
|
) |
const [inline, protected] |
bool dbserver_impl::_is_open_sql |
( |
|
) |
const [inline, protected] |
void dbserver_impl::_set_connect |
( |
|
) |
[inline, private] |
void dbserver_impl::_set_disconnect |
( |
|
) |
[inline, private] |
void dbserver_impl::_set_in_transaction |
( |
|
) |
[inline, private] |
void dbserver_impl::_set_out_transaction |
( |
|
) |
[inline, private] |
void dbserver_impl::_set_open |
( |
|
) |
[inline, private] |
void dbserver_impl::_set_close |
( |
|
) |
[inline, private] |
void dbserver_impl::_set_action |
( |
action |
action_ |
) |
[inline, private] |
void dbserver_impl::_set_state |
( |
module_state |
state |
) |
[inline, private] |
void dbserver_impl::_get_number_params |
( |
|
) |
[protected] |
void dbserver_impl::_rebind_params |
( |
|
) |
[protected] |
void dbserver_impl::_bind_params |
( |
|
) |
[protected] |
void dbserver_impl::_bind_columns |
( |
|
) |
[protected] |
void dbserver_impl::_get_columns_info |
( |
|
) |
[protected] |
gets columns info
Definition at line 1741 of file db.cpp.
References _cols, _columns_allocator, _vector< T, A >::clear(), _vector< T, A >::resize(), v_get_number_columns(), v_get_one_column_info(), and v_native_type_to_client_type().
Referenced by open_proc(), open_sql(), and v_do_job().
virtual void dbserver_impl::v_before_execute |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_after_execute |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_execute |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_close |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_fetch |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_replace_quote |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_bind_one_param |
( |
size_t |
index |
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_before_bind_columns |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_bind_one_column |
( |
size_t |
index |
) |
[protected, pure virtual] |
virtual size_t dbserver_impl::v_get_number_columns |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_convert_one_value |
( |
size_t |
row, |
|
|
size_t |
col, |
|
|
terimber_db_value & |
val | |
|
) |
| | [protected, pure virtual] |
virtual void dbserver_impl::v_get_one_column_info |
( |
size_t |
index |
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_form_sql_string |
( |
|
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_rebind_one_param |
( |
size_t |
index |
) |
[protected, pure virtual] |
virtual void dbserver_impl::v_interrupt_async |
( |
|
) |
[protected, pure virtual] |
virtual dbtypes dbserver_impl::v_native_type_to_client_type |
( |
size_t |
native_type |
) |
[protected, pure virtual] |
bool dbserver_impl::v_has_job |
( |
size_t |
ident, |
|
|
void * |
user_data | |
|
) |
| | [protected, virtual] |
void dbserver_impl::v_do_job |
( |
size_t |
ident, |
|
|
void * |
user_data | |
|
) |
| | [protected, virtual] |
does the real job
- Parameters:
-
ident |
thread ident |
user_data |
user defined data |
Implements terimber_thread_employer.
Definition at line 1797 of file db.cpp.
References _code, _error, _get_columns_info(), _ident, _notify_async(), _rebind_params(), _set_action(), _set_open(), _set_state(), _thread, ACTION_EXEC_PROC_ASYNC, ACTION_EXEC_SQL_ASYNC, ACTION_FETCH_ASYNC, ACTION_NONE, ACTION_OPEN_PROC_ASYNC, ACTION_OPEN_SQL_ASYNC, thread::cancel_job(), get_action(), exception::get_code(), get_state(), STATE_OK, STATE_WORKING, v_execute(), v_fetch(), and exception::what().
void dbserver_impl::_notify_async |
( |
bool |
noerrors, |
|
|
size_t |
ident | |
|
) |
| | [protected, virtual] |
action dbserver_impl::get_action |
( |
|
) |
const [inline, protected] |
returns current action
Definition at line 1320 of file db.h.
References _action, and _mtx.
Referenced by _check_action(), _is_asynchronous_action(), odbc_dbserver::v_after_execute(), mysql_dbserver::v_after_execute(), odbc_dbserver::v_before_execute(), mysql_dbserver::v_before_execute(), v_do_job(), orcl_dbserver::v_execute(), mysql_dbserver::v_execute(), orcl_dbserver::v_form_sql_string(), odbc_dbserver::v_form_sql_string(), mysql_dbserver::v_form_sql_string(), and v_has_job().
module_state dbserver_impl::get_state |
( |
|
) |
const [inline, protected] |
void dbserver_impl::_check_connect |
( |
|
) |
[inline, private] |
void dbserver_impl::_check_disconnect |
( |
|
) |
[inline, private] |
void dbserver_impl::_check_in_transaction |
( |
|
) |
[inline, private] |
void dbserver_impl::_check_out_transaction |
( |
|
) |
[inline, private] |
void dbserver_impl::_check_state |
( |
|
) |
[inline, private] |
void dbserver_impl::_check_open |
( |
|
) |
const [inline, private] |
void dbserver_impl::_check_close |
( |
|
) |
const [inline, private] |
void dbserver_impl::_check_action |
( |
|
) |
const [inline, private] |
bool dbserver_impl::_is_asynchronous_action |
( |
|
) |
const [private] |
void dbserver_impl::_process_sql |
( |
const char * |
sql |
) |
[private] |
void dbserver_impl::_start_thread |
( |
|
) |
[private] |
starts thread for asynchronous actions
Definition at line 1766 of file db.cpp.
References _set_state(), _thread, thread::assign_job(), thread::get_state(), thread::start(), STATE_WORKING, THREAD_CLOSE, and thread::wakeup().
Referenced by exec_proc(), exec_sql(), fetch_data(), open_proc(), and open_sql().
converts parameter value (if required)
- Parameters:
-
index |
parameter index |
type |
new type |
Definition at line 540 of file db.hpp.
References _params, _temp_allocator, exception::_throw(), convert_types(), parse_value(), persist_value(), byte_allocator::reset(), and base_vector< T >::size().
Referenced by get_param_as_binary(), get_param_as_binary_ptr(), get_param_as_bool(), get_param_as_byte(), get_param_as_char(), get_param_as_date(), get_param_as_double(), get_param_as_dword(), get_param_as_dword64(), get_param_as_float(), get_param_as_guid(), get_param_as_long(), get_param_as_long64(), get_param_as_numeric(), get_param_as_short(), get_param_as_string(), get_param_as_word(), and get_param_as_wstring().
converts column value (if required)
- Parameters:
-
index |
column index |
type |
new type |
Definition at line 565 of file db.hpp.
References _cols, _iter, _temp_allocator, exception::_throw(), convert_types(), get_iter_end(), parse_value(), persist_value(), byte_allocator::reset(), and base_vector< T >::size().
Referenced by get_value_as_binary(), get_value_as_binary_ptr(), get_value_as_bool(), get_value_as_byte(), get_value_as_char(), get_value_as_date(), get_value_as_double(), get_value_as_dword(), get_value_as_dword64(), get_value_as_float(), get_value_as_guid(), get_value_as_long(), get_value_as_long64(), get_value_as_numeric(), get_value_as_short(), get_value_as_string(), get_value_as_word(), and get_value_as_wstring().
recordset_list_t::iterator dbserver_impl::get_iter_end |
( |
|
) |
const [inline, private] |
recordset_list_t::iterator dbserver_impl::get_iter_begin |
( |
|
) |
const [inline, private] |
Member Data Documentation
temporary memory allocator
Definition at line 1065 of file db.h.
Referenced by close_sql(), dbserver_impl(), fetch_data(), get_param_as_numeric(), get_param_as_value(), get_value_as_numeric(), get_value_as_value(), orcl_dbserver::v_bind_one_column(), odbc_dbserver::v_bind_one_column(), mysql_dbserver::v_bind_one_column(), orcl_dbserver::v_bind_one_param(), odbc_dbserver::v_bind_one_param(), mysql_dbserver::v_bind_one_param(), odbc_dbserver::v_connect(), orcl_dbserver::v_convert_one_value(), odbc_dbserver::v_convert_one_value(), mysql_dbserver::v_convert_one_value(), orcl_dbserver::v_disconnect(), odbc_dbserver::v_disconnect(), mysql_dbserver::v_disconnect(), odbc_dbserver::v_execute(), orcl_dbserver::v_form_sql_string(), odbc_dbserver::v_form_sql_string(), mysql_dbserver::v_form_sql_string(), odbc_dbserver::v_get_one_column_info(), orcl_dbserver::v_rebind_one_param(), odbc_dbserver::v_rebind_one_param(), mysql_dbserver::v_rebind_one_param(), orcl_dbserver::v_replace_quote(), odbc_dbserver::v_replace_quote(), mysql_dbserver::v_replace_quote(), and ~dbserver_impl().
multithreaded mutex
Definition at line 1066 of file db.h.
Referenced by _is_connect(), _is_in_transaction(), _is_open_sql(), _notify_async(), _set_action(), _set_close(), _set_connect(), _set_disconnect(), _set_in_transaction(), _set_open(), _set_out_transaction(), _set_state(), get_action(), get_state(), remove_callback(), set_callback(), and set_quote().
data allocator
Definition at line 1424 of file db.h.
Referenced by close_sql(), dbserver_impl(), fetch_data(), orcl_dbserver::v_bind_one_param(), orcl_dbserver::v_convert_one_value(), odbc_dbserver::v_convert_one_value(), mysql_dbserver::v_convert_one_value(), orcl_dbserver::v_fetch(), odbc_dbserver::v_fetch(), mysql_dbserver::v_fetch(), and ~dbserver_impl().
SQL statement.
Definition at line 1427 of file db.h.
Referenced by _process_sql(), close_sql(), orcl_dbserver::v_before_execute(), mysql_dbserver::v_before_execute(), odbc_dbserver::v_execute(), orcl_dbserver::v_form_sql_string(), odbc_dbserver::v_form_sql_string(), mysql_dbserver::v_form_sql_string(), orcl_dbserver::v_replace_quote(), odbc_dbserver::v_replace_quote(), and mysql_dbserver::v_replace_quote().
parameters
Definition at line 1429 of file db.h.
Referenced by _bind_params(), _rebind_params(), get_param_as_value(), get_param_count(), get_param_in_out(), get_param_is_null(), get_param_type(), param_bulk_remove(), param_bulk_store(), resize_params(), set_param_as_binary(), set_param_as_binary_ptr(), set_param_as_bool(), set_param_as_byte(), set_param_as_char(), set_param_as_date(), set_param_as_decimal(), set_param_as_double(), set_param_as_dword(), set_param_as_dword64(), set_param_as_float(), set_param_as_guid(), set_param_as_long(), set_param_as_long64(), set_param_as_null(), set_param_as_numeric(), set_param_as_short(), set_param_as_string(), set_param_as_string_ptr(), set_param_as_word(), set_param_as_wstring(), set_param_as_wstring_ptr(), orcl_dbserver::v_bind_one_param(), odbc_dbserver::v_bind_one_param(), mysql_dbserver::v_bind_one_param(), orcl_dbserver::v_close(), orcl_dbserver::v_form_sql_string(), odbc_dbserver::v_form_sql_string(), mysql_dbserver::v_form_sql_string(), orcl_dbserver::v_rebind_one_param(), odbc_dbserver::v_rebind_one_param(), mysql_dbserver::v_rebind_one_param(), odbc_dbserver::v_replace_quote(), and mysql_dbserver::v_replace_quote().
bulk parameters
Definition at line 1430 of file db.h.
Referenced by param_bulk_remove(), param_bulk_remove_all(), param_bulk_store(), resize_params(), set_param_as_binary(), set_param_as_binary_ptr(), set_param_as_bool(), set_param_as_byte(), set_param_as_char(), set_param_as_date(), set_param_as_decimal(), set_param_as_double(), set_param_as_dword(), set_param_as_dword64(), set_param_as_float(), set_param_as_guid(), set_param_as_long(), set_param_as_long64(), set_param_as_null(), set_param_as_numeric(), set_param_as_short(), set_param_as_string(), set_param_as_string_ptr(), set_param_as_word(), set_param_as_wstring(), set_param_as_wstring_ptr(), odbc_dbserver::v_before_execute(), and odbc_dbserver::v_bind_one_param().
column
Definition at line 1431 of file db.h.
Referenced by _bind_columns(), _get_columns_info(), get_column_count(), get_column_max_length(), get_column_name(), get_column_nullable(), get_column_precision(), get_column_scale(), get_column_type(), get_value_as_value(), get_value_is_null(), odbc_dbserver::v_before_bind_columns(), mysql_dbserver::v_before_bind_columns(), orcl_dbserver::v_bind_one_column(), odbc_dbserver::v_bind_one_column(), mysql_dbserver::v_bind_one_column(), orcl_dbserver::v_close(), orcl_dbserver::v_convert_one_value(), odbc_dbserver::v_convert_one_value(), mysql_dbserver::v_convert_one_value(), orcl_dbserver::v_fetch(), odbc_dbserver::v_fetch(), mysql_dbserver::v_fetch(), orcl_dbserver::v_get_one_column_info(), odbc_dbserver::v_get_one_column_info(), and mysql_dbserver::v_get_one_column_info().
The documentation for this class was generated from the following files:
|
|