|
| static int bind_mysql_params | ( | MYSQL_STMT * | st, | |
| db_fld_t * | params1, | |||
| db_fld_t * | params2 | |||
| ) | [static] |
Up to two sets of parameters are provided. Both of them are used in UPDATE command, params1 as colspecs and values and params2 as WHERE clause. In other cases one set could be enough because values or match (WHERE clause) is needed.
| st | MySQL command statement | |
| params1 | first set of params | |
| params2 | second set of params |
Definition at line 831 of file my_cmd.c.
References set_field().
Referenced by upload_cmd().


| sql_cmd | SQL statement as a result of this function | |
| cmd | input for statement creation |
Definition at line 144 of file my_cmd.c.
References _str::len, db_cmd::match, _str::s, and db_cmd::table.
| sql_cmd | SQL statement as a result of this function | |
| cmd | input for statement creation |
Definition at line 310 of file my_cmd.c.
References _str::len, _str::s, db_cmd::table, and db_cmd::vals.
| sql_cmd | SQL statement as a result of this function | |
| cmd | input for statement creation |
Definition at line 218 of file my_cmd.c.
References _str::len, db_cmd::match, db_cmd::result, _str::s, and db_cmd::table.
| sql_cmd | SQL statement as a result of this function | |
| cmd | input for statement creation |
Definition at line 419 of file my_cmd.c.
References string_buffer::len, _str::len, db_cmd::match, _str::s, string_buffer::s, sb_add(), set_str(), db_cmd::table, and db_cmd::vals.

| static int exec_cmd_safe | ( | db_cmd_t * | cmd | ) | [static] |
The function contains all the necessary logic to detect reset or disconnected database connections and uploads commands to the server if necessary.
| cmd | Command to be executed |
Definition at line 674 of file my_cmd.c.
References db_cmd::ctx, set_mysql_params(), and upload_cmd().

| static int sb_add | ( | struct string_buffer * | sb, | |
| str * | nstr | |||
| ) | [inline, static] |
| sb | string buffer | |
| nstr | string to add |
Definition at line 373 of file my_cmd.c.
References string_buffer::increment, _str::len, string_buffer::len, _str::s, string_buffer::s, and string_buffer::size.
Referenced by build_update_cmd().

| static void set_field | ( | MYSQL_BIND * | bind, | |
| db_fld_t * | fld | |||
| ) | [static] |
| bind | destination | |
| fld | source |
Definition at line 768 of file my_cmd.c.
Referenced by bind_mysql_params().

| static void set_mysql_params | ( | db_cmd_t * | cmd | ) | [inline, static] |
| cmd | Command structure which contains pointers to MYSQL_STMT and parameters values |
Definition at line 553 of file my_cmd.c.
References db_cmd::match, and db_cmd::vals.
Referenced by exec_cmd_safe().

Used for temporary str variables.
Definition at line 405 of file my_cmd.c.
References _str::len, and _str::s.
Referenced by build_update_cmd().

| static int upload_cmd | ( | db_cmd_t * | cmd | ) | [static] |
| cmd | Command to be uploaded |
Definition at line 1099 of file my_cmd.c.
References bind_mysql_params(), db_cmd::ctx, db_cmd::match, db_cmd::result, db_cmd::type, and db_cmd::vals.
Referenced by exec_cmd_safe().


| int my_ping_interval |
Definition at line 52 of file mysql_mod.c.
Referenced by db_mysql_submit_query().
| int my_ping_interval = 5 * 60 |
Definition at line 52 of file mysql_mod.c.
Referenced by db_mysql_submit_query().
1.7.1