// Generated by cpp11: do not edit by hand
// clang-format off

#include "RMariaDB_types.h"
#include "cpp11/declarations.hpp"
#include <R_ext/Visibility.h>

// connection.cpp
cpp11::external_pointer<DbConnectionPtr> connection_create(const cpp11::sexp& host, const cpp11::sexp& user, const cpp11::sexp& password, const cpp11::sexp& db, unsigned int port, const cpp11::sexp& unix_socket, unsigned long client_flag, const cpp11::sexp& group, const cpp11::sexp& default_file, const cpp11::sexp& ssl_key, const cpp11::sexp& ssl_cert, const cpp11::sexp& ssl_ca, const cpp11::sexp& ssl_capath, const cpp11::sexp& ssl_cipher, int timeout, bool reconnect);
extern "C" SEXP _RMariaDB_connection_create(SEXP host, SEXP user, SEXP password, SEXP db, SEXP port, SEXP unix_socket, SEXP client_flag, SEXP group, SEXP default_file, SEXP ssl_key, SEXP ssl_cert, SEXP ssl_ca, SEXP ssl_capath, SEXP ssl_cipher, SEXP timeout, SEXP reconnect) {
  BEGIN_CPP11
    return cpp11::as_sexp(connection_create(cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(host), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(user), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(password), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(db), cpp11::as_cpp<cpp11::decay_t<unsigned int>>(port), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(unix_socket), cpp11::as_cpp<cpp11::decay_t<unsigned long>>(client_flag), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(group), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(default_file), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(ssl_key), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(ssl_cert), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(ssl_ca), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(ssl_capath), cpp11::as_cpp<cpp11::decay_t<const cpp11::sexp&>>(ssl_cipher), cpp11::as_cpp<cpp11::decay_t<int>>(timeout), cpp11::as_cpp<cpp11::decay_t<bool>>(reconnect)));
  END_CPP11
}
// connection.cpp
bool connection_valid(cpp11::external_pointer<DbConnectionPtr> con_);
extern "C" SEXP _RMariaDB_connection_valid(SEXP con_) {
  BEGIN_CPP11
    return cpp11::as_sexp(connection_valid(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<DbConnectionPtr>>>(con_)));
  END_CPP11
}
// connection.cpp
void connection_release(cpp11::external_pointer<DbConnectionPtr> con_);
extern "C" SEXP _RMariaDB_connection_release(SEXP con_) {
  BEGIN_CPP11
    connection_release(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<DbConnectionPtr>>>(con_));
    return R_NilValue;
  END_CPP11
}
// connection.cpp
cpp11::list connection_info(DbConnection* con);
extern "C" SEXP _RMariaDB_connection_info(SEXP con) {
  BEGIN_CPP11
    return cpp11::as_sexp(connection_info(cpp11::as_cpp<cpp11::decay_t<DbConnection*>>(con)));
  END_CPP11
}
// connection.cpp
cpp11::strings connection_quote_string(DbConnection* con, cpp11::strings xs);
extern "C" SEXP _RMariaDB_connection_quote_string(SEXP con, SEXP xs) {
  BEGIN_CPP11
    return cpp11::as_sexp(connection_quote_string(cpp11::as_cpp<cpp11::decay_t<DbConnection*>>(con), cpp11::as_cpp<cpp11::decay_t<cpp11::strings>>(xs)));
  END_CPP11
}
// connection.cpp
void connection_begin_transaction(cpp11::external_pointer<DbConnectionPtr> con);
extern "C" SEXP _RMariaDB_connection_begin_transaction(SEXP con) {
  BEGIN_CPP11
    connection_begin_transaction(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<DbConnectionPtr>>>(con));
    return R_NilValue;
  END_CPP11
}
// connection.cpp
void connection_commit(cpp11::external_pointer<DbConnectionPtr> con);
extern "C" SEXP _RMariaDB_connection_commit(SEXP con) {
  BEGIN_CPP11
    connection_commit(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<DbConnectionPtr>>>(con));
    return R_NilValue;
  END_CPP11
}
// connection.cpp
void connection_rollback(cpp11::external_pointer<DbConnectionPtr> con);
extern "C" SEXP _RMariaDB_connection_rollback(SEXP con) {
  BEGIN_CPP11
    connection_rollback(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<DbConnectionPtr>>>(con));
    return R_NilValue;
  END_CPP11
}
// connection.cpp
bool connection_is_transacting(DbConnection* con);
extern "C" SEXP _RMariaDB_connection_is_transacting(SEXP con) {
  BEGIN_CPP11
    return cpp11::as_sexp(connection_is_transacting(cpp11::as_cpp<cpp11::decay_t<DbConnection*>>(con)));
  END_CPP11
}
// driver.cpp
void driver_init();
extern "C" SEXP _RMariaDB_driver_init() {
  BEGIN_CPP11
    driver_init();
    return R_NilValue;
  END_CPP11
}
// driver.cpp
void driver_done();
extern "C" SEXP _RMariaDB_driver_done() {
  BEGIN_CPP11
    driver_done();
    return R_NilValue;
  END_CPP11
}
// driver.cpp
cpp11::integers version();
extern "C" SEXP _RMariaDB_version() {
  BEGIN_CPP11
    return cpp11::as_sexp(version());
  END_CPP11
}
// result.cpp
cpp11::external_pointer<DbResult> result_create(cpp11::external_pointer<DbConnectionPtr> con, std::string sql, bool is_statement, bool immediate);
extern "C" SEXP _RMariaDB_result_create(SEXP con, SEXP sql, SEXP is_statement, SEXP immediate) {
  BEGIN_CPP11
    return cpp11::as_sexp(result_create(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<DbConnectionPtr>>>(con), cpp11::as_cpp<cpp11::decay_t<std::string>>(sql), cpp11::as_cpp<cpp11::decay_t<bool>>(is_statement), cpp11::as_cpp<cpp11::decay_t<bool>>(immediate)));
  END_CPP11
}
// result.cpp
void result_release(cpp11::external_pointer<DbResult> res);
extern "C" SEXP _RMariaDB_result_release(SEXP res) {
  BEGIN_CPP11
    result_release(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<DbResult>>>(res));
    return R_NilValue;
  END_CPP11
}
// result.cpp
bool result_valid(cpp11::external_pointer<DbResult> res_);
extern "C" SEXP _RMariaDB_result_valid(SEXP res_) {
  BEGIN_CPP11
    return cpp11::as_sexp(result_valid(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<DbResult>>>(res_)));
  END_CPP11
}
// result.cpp
cpp11::list result_fetch(DbResult* res, const int n);
extern "C" SEXP _RMariaDB_result_fetch(SEXP res, SEXP n) {
  BEGIN_CPP11
    return cpp11::as_sexp(result_fetch(cpp11::as_cpp<cpp11::decay_t<DbResult*>>(res), cpp11::as_cpp<cpp11::decay_t<const int>>(n)));
  END_CPP11
}
// result.cpp
void result_bind(DbResult* res, cpp11::list params);
extern "C" SEXP _RMariaDB_result_bind(SEXP res, SEXP params) {
  BEGIN_CPP11
    result_bind(cpp11::as_cpp<cpp11::decay_t<DbResult*>>(res), cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(params));
    return R_NilValue;
  END_CPP11
}
// result.cpp
bool result_has_completed(DbResult* res);
extern "C" SEXP _RMariaDB_result_has_completed(SEXP res) {
  BEGIN_CPP11
    return cpp11::as_sexp(result_has_completed(cpp11::as_cpp<cpp11::decay_t<DbResult*>>(res)));
  END_CPP11
}
// result.cpp
int result_rows_fetched(DbResult* res);
extern "C" SEXP _RMariaDB_result_rows_fetched(SEXP res) {
  BEGIN_CPP11
    return cpp11::as_sexp(result_rows_fetched(cpp11::as_cpp<cpp11::decay_t<DbResult*>>(res)));
  END_CPP11
}
// result.cpp
int result_rows_affected(DbResult* res);
extern "C" SEXP _RMariaDB_result_rows_affected(SEXP res) {
  BEGIN_CPP11
    return cpp11::as_sexp(result_rows_affected(cpp11::as_cpp<cpp11::decay_t<DbResult*>>(res)));
  END_CPP11
}
// result.cpp
cpp11::list result_column_info(DbResult* res);
extern "C" SEXP _RMariaDB_result_column_info(SEXP res) {
  BEGIN_CPP11
    return cpp11::as_sexp(result_column_info(cpp11::as_cpp<cpp11::decay_t<DbResult*>>(res)));
  END_CPP11
}

extern "C" {
static const R_CallMethodDef CallEntries[] = {
    {"_RMariaDB_connection_begin_transaction", (DL_FUNC) &_RMariaDB_connection_begin_transaction,  1},
    {"_RMariaDB_connection_commit",            (DL_FUNC) &_RMariaDB_connection_commit,             1},
    {"_RMariaDB_connection_create",            (DL_FUNC) &_RMariaDB_connection_create,            16},
    {"_RMariaDB_connection_info",              (DL_FUNC) &_RMariaDB_connection_info,               1},
    {"_RMariaDB_connection_is_transacting",    (DL_FUNC) &_RMariaDB_connection_is_transacting,     1},
    {"_RMariaDB_connection_quote_string",      (DL_FUNC) &_RMariaDB_connection_quote_string,       2},
    {"_RMariaDB_connection_release",           (DL_FUNC) &_RMariaDB_connection_release,            1},
    {"_RMariaDB_connection_rollback",          (DL_FUNC) &_RMariaDB_connection_rollback,           1},
    {"_RMariaDB_connection_valid",             (DL_FUNC) &_RMariaDB_connection_valid,              1},
    {"_RMariaDB_driver_done",                  (DL_FUNC) &_RMariaDB_driver_done,                   0},
    {"_RMariaDB_driver_init",                  (DL_FUNC) &_RMariaDB_driver_init,                   0},
    {"_RMariaDB_result_bind",                  (DL_FUNC) &_RMariaDB_result_bind,                   2},
    {"_RMariaDB_result_column_info",           (DL_FUNC) &_RMariaDB_result_column_info,            1},
    {"_RMariaDB_result_create",                (DL_FUNC) &_RMariaDB_result_create,                 4},
    {"_RMariaDB_result_fetch",                 (DL_FUNC) &_RMariaDB_result_fetch,                  2},
    {"_RMariaDB_result_has_completed",         (DL_FUNC) &_RMariaDB_result_has_completed,          1},
    {"_RMariaDB_result_release",               (DL_FUNC) &_RMariaDB_result_release,                1},
    {"_RMariaDB_result_rows_affected",         (DL_FUNC) &_RMariaDB_result_rows_affected,          1},
    {"_RMariaDB_result_rows_fetched",          (DL_FUNC) &_RMariaDB_result_rows_fetched,           1},
    {"_RMariaDB_result_valid",                 (DL_FUNC) &_RMariaDB_result_valid,                  1},
    {"_RMariaDB_version",                      (DL_FUNC) &_RMariaDB_version,                       0},
    {NULL, NULL, 0}
};
}

extern "C" attribute_visible void R_init_RMariaDB(DllInfo* dll){
  R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
  R_useDynamicSymbols(dll, FALSE);
  R_forceSymbols(dll, TRUE);
}
