The Battle for Wesnoth  1.15.3+dev
Namespaces | Macros | Functions
private.hpp File Reference
#include <mariadb++/exceptions.hpp>
#include <ctime>
Include dependency graph for private.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 mariadb
 

Macros

#define MARIADB_ERROR_THROW_CONNECTION(error_id, error)   throw exception::connection(error_id, error);
 
#define MARIADB_ERROR_THROW_DATE(_year, _month, _day, _hour, _minute, _second, _millisecond)   throw exception::date_time(_year, _month, _day, _hour, _minute, _second, _millisecond);
 
#define MARIADB_ERROR_THROW_TIME(_hour, _minute, _second, _millisecond)   throw exception::time(_hour, _minute, _second, _millisecond);
 
#define MARIADB_ERROR(error_id, error)
 
#define MYSQL_ERROR_NO_BRAKET(mysql)
 
#define MYSQL_ERROR(mysql)   { MYSQL_ERROR_NO_BRAKET(mysql) }
 
#define STMT_ERROR_NO_BRAKET(statement)
 
#define STMT_ERROR(statement)   { STMT_ERROR_NO_BRAKET(statement) }
 

Functions

int mariadb::localtime_safe (struct tm *_tm, const time_t *_time)
 
int mariadb::gmtime_safe (struct tm *_tm, const time_t *_time)
 

Macro Definition Documentation

◆ MARIADB_ERROR

#define MARIADB_ERROR (   error_id,
  error 
)
Value:
std::cerr << "MariaDB Error(" << error_id << "): " << error \
<< "\nIn function: " << __FUNCTION__ << "\nIn file " << __FILE__ << "\nOn line " \
<< __LINE__ << '\n'; \
MARIADB_ERROR_THROW_CONNECTION(error_id, error)
static l_noret error(LoadState *S, const char *why)
Definition: lundump.cpp:39

Definition at line 51 of file private.hpp.

Referenced by mariadb::connection::connect().

◆ MARIADB_ERROR_THROW_CONNECTION

#define MARIADB_ERROR_THROW_CONNECTION (   error_id,
  error 
)    throw exception::connection(error_id, error);

Definition at line 44 of file private.hpp.

Referenced by mariadb::result_set::check_type().

◆ MARIADB_ERROR_THROW_DATE

#define MARIADB_ERROR_THROW_DATE (   _year,
  _month,
  _day,
  _hour,
  _minute,
  _second,
  _millisecond 
)    throw exception::date_time(_year, _month, _day, _hour, _minute, _second, _millisecond);

◆ MARIADB_ERROR_THROW_TIME

#define MARIADB_ERROR_THROW_TIME (   _hour,
  _minute,
  _second,
  _millisecond 
)    throw exception::time(_hour, _minute, _second, _millisecond);

◆ MYSQL_ERROR

#define MYSQL_ERROR (   mysql)    { MYSQL_ERROR_NO_BRAKET(mysql) }

◆ MYSQL_ERROR_NO_BRAKET

#define MYSQL_ERROR_NO_BRAKET (   mysql)
Value:
m_last_error_no = mysql_errno(mysql); \
m_last_error = mysql_error(mysql); \
MARIADB_ERROR(m_last_error_no, m_last_error);

Definition at line 57 of file private.hpp.

Referenced by mariadb::connection::execute(), mariadb::connection::insert(), and mariadb::connection::query().

◆ STMT_ERROR

#define STMT_ERROR (   statement)    { STMT_ERROR_NO_BRAKET(statement) }

◆ STMT_ERROR_NO_BRAKET

#define STMT_ERROR_NO_BRAKET (   statement)
Value:
m_last_error_no = mysql_stmt_errno(statement); \
m_last_error = mysql_stmt_error(statement); \
MARIADB_ERROR(m_last_error_no, m_last_error);
static void statement(LexState *ls)
Definition: lparser.cpp:1537

Definition at line 65 of file private.hpp.