#include "dbfacade.h"
#include <mysql/mysql.h>
#include <mysql/mysqld_error.h>
#include <stdlib.h>
Classes | |
class | ResultRowMySQL |
class | ResultMySQL |
class | DatabaseMySQL |
Defines | |
#define | CHECK_EXCEPTION |
Functions | |
REGISTER_PLUGIN ("MySQL", DatabaseMySQL) |
#define CHECK_EXCEPTION |
Value:
{ std::string msg(mysql_error(connection_)); \ switch (mysql_errno(connection_)) \ { \ case 0: \ break; \ case ER_DUP_ENTRY: \ throw dbfacade::UniqueConstraintException(msg); \ case ER_ROW_IS_REFERENCED_2: \ case ER_NO_REFERENCED_ROW_2: \ throw dbfacade::ForeignKeyConstraintException(msg); \ default: \ throw dbfacade::Exception(msg); \ } \ }
REGISTER_PLUGIN | ( | "MySQL" | , | |
DatabaseMySQL | ||||
) |