// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include "RSQLite_types.h"
#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// connection_connect
XPtr<DbConnectionPtr> connection_connect(const std::string& path, const bool allow_ext, const int flags, const std::string& vfs, bool with_alt_types);
RcppExport SEXP _RSQLite_connection_connect(SEXP pathSEXP, SEXP allow_extSEXP, SEXP flagsSEXP, SEXP vfsSEXP, SEXP with_alt_typesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::string& >::type path(pathSEXP);
    Rcpp::traits::input_parameter< const bool >::type allow_ext(allow_extSEXP);
    Rcpp::traits::input_parameter< const int >::type flags(flagsSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type vfs(vfsSEXP);
    Rcpp::traits::input_parameter< bool >::type with_alt_types(with_alt_typesSEXP);
    rcpp_result_gen = Rcpp::wrap(connection_connect(path, allow_ext, flags, vfs, with_alt_types));
    return rcpp_result_gen;
END_RCPP
}
// connection_valid
bool connection_valid(XPtr<DbConnectionPtr> con_);
RcppExport SEXP _RSQLite_connection_valid(SEXP con_SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< XPtr<DbConnectionPtr> >::type con_(con_SEXP);
    rcpp_result_gen = Rcpp::wrap(connection_valid(con_));
    return rcpp_result_gen;
END_RCPP
}
// connection_release
void connection_release(XPtr<DbConnectionPtr> con_);
RcppExport SEXP _RSQLite_connection_release(SEXP con_SEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< XPtr<DbConnectionPtr> >::type con_(con_SEXP);
    connection_release(con_);
    return R_NilValue;
END_RCPP
}
// connection_copy_database
void connection_copy_database(const XPtr<DbConnectionPtr>& from, const XPtr<DbConnectionPtr>& to);
RcppExport SEXP _RSQLite_connection_copy_database(SEXP fromSEXP, SEXP toSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const XPtr<DbConnectionPtr>& >::type from(fromSEXP);
    Rcpp::traits::input_parameter< const XPtr<DbConnectionPtr>& >::type to(toSEXP);
    connection_copy_database(from, to);
    return R_NilValue;
END_RCPP
}
// connection_import_file
bool connection_import_file(const XPtr<DbConnectionPtr>& con, const std::string& name, const std::string& value, const std::string& sep, const std::string& eol, const int skip);
RcppExport SEXP _RSQLite_connection_import_file(SEXP conSEXP, SEXP nameSEXP, SEXP valueSEXP, SEXP sepSEXP, SEXP eolSEXP, SEXP skipSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const XPtr<DbConnectionPtr>& >::type con(conSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type name(nameSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type value(valueSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type sep(sepSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type eol(eolSEXP);
    Rcpp::traits::input_parameter< const int >::type skip(skipSEXP);
    rcpp_result_gen = Rcpp::wrap(connection_import_file(con, name, value, sep, eol, skip));
    return rcpp_result_gen;
END_RCPP
}
// set_busy_handler
void set_busy_handler(const XPtr<DbConnectionPtr>& con, SEXP r_callback);
RcppExport SEXP _RSQLite_set_busy_handler(SEXP conSEXP, SEXP r_callbackSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const XPtr<DbConnectionPtr>& >::type con(conSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_callback(r_callbackSEXP);
    set_busy_handler(con, r_callback);
    return R_NilValue;
END_RCPP
}
// extension_load
void extension_load(XPtr<DbConnectionPtr> con, const std::string& file, const std::string& entry_point);
RcppExport SEXP _RSQLite_extension_load(SEXP conSEXP, SEXP fileSEXP, SEXP entry_pointSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< XPtr<DbConnectionPtr> >::type con(conSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type file(fileSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type entry_point(entry_pointSEXP);
    extension_load(con, file, entry_point);
    return R_NilValue;
END_RCPP
}
// result_create
XPtr<DbResult> result_create(XPtr<DbConnectionPtr> con, std::string sql);
RcppExport SEXP _RSQLite_result_create(SEXP conSEXP, SEXP sqlSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< XPtr<DbConnectionPtr> >::type con(conSEXP);
    Rcpp::traits::input_parameter< std::string >::type sql(sqlSEXP);
    rcpp_result_gen = Rcpp::wrap(result_create(con, sql));
    return rcpp_result_gen;
END_RCPP
}
// result_release
void result_release(XPtr<DbResult> res);
RcppExport SEXP _RSQLite_result_release(SEXP resSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< XPtr<DbResult> >::type res(resSEXP);
    result_release(res);
    return R_NilValue;
END_RCPP
}
// result_valid
bool result_valid(XPtr<DbResult> res_);
RcppExport SEXP _RSQLite_result_valid(SEXP res_SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< XPtr<DbResult> >::type res_(res_SEXP);
    rcpp_result_gen = Rcpp::wrap(result_valid(res_));
    return rcpp_result_gen;
END_RCPP
}
// result_fetch
List result_fetch(DbResult* res, const int n);
RcppExport SEXP _RSQLite_result_fetch(SEXP resSEXP, SEXP nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DbResult* >::type res(resSEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    rcpp_result_gen = Rcpp::wrap(result_fetch(res, n));
    return rcpp_result_gen;
END_RCPP
}
// result_bind
void result_bind(DbResult* res, List params);
RcppExport SEXP _RSQLite_result_bind(SEXP resSEXP, SEXP paramsSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DbResult* >::type res(resSEXP);
    Rcpp::traits::input_parameter< List >::type params(paramsSEXP);
    result_bind(res, params);
    return R_NilValue;
END_RCPP
}
// result_has_completed
bool result_has_completed(DbResult* res);
RcppExport SEXP _RSQLite_result_has_completed(SEXP resSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DbResult* >::type res(resSEXP);
    rcpp_result_gen = Rcpp::wrap(result_has_completed(res));
    return rcpp_result_gen;
END_RCPP
}
// result_rows_fetched
int result_rows_fetched(DbResult* res);
RcppExport SEXP _RSQLite_result_rows_fetched(SEXP resSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DbResult* >::type res(resSEXP);
    rcpp_result_gen = Rcpp::wrap(result_rows_fetched(res));
    return rcpp_result_gen;
END_RCPP
}
// result_rows_affected
int result_rows_affected(DbResult* res);
RcppExport SEXP _RSQLite_result_rows_affected(SEXP resSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DbResult* >::type res(resSEXP);
    rcpp_result_gen = Rcpp::wrap(result_rows_affected(res));
    return rcpp_result_gen;
END_RCPP
}
// result_column_info
List result_column_info(DbResult* res);
RcppExport SEXP _RSQLite_result_column_info(SEXP resSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DbResult* >::type res(resSEXP);
    rcpp_result_gen = Rcpp::wrap(result_column_info(res));
    return rcpp_result_gen;
END_RCPP
}
// result_get_placeholder_names
CharacterVector result_get_placeholder_names(SqliteResult* res);
RcppExport SEXP _RSQLite_result_get_placeholder_names(SEXP resSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SqliteResult* >::type res(resSEXP);
    rcpp_result_gen = Rcpp::wrap(result_get_placeholder_names(res));
    return rcpp_result_gen;
END_RCPP
}
// rsqliteVersion
CharacterVector rsqliteVersion();
RcppExport SEXP _RSQLite_rsqliteVersion() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(rsqliteVersion());
    return rcpp_result_gen;
END_RCPP
}
// init_logging
void init_logging(const std::string& log_level);
RcppExport SEXP _RSQLite_init_logging(SEXP log_levelSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::string& >::type log_level(log_levelSEXP);
    init_logging(log_level);
    return R_NilValue;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_RSQLite_connection_connect", (DL_FUNC) &_RSQLite_connection_connect, 5},
    {"_RSQLite_connection_valid", (DL_FUNC) &_RSQLite_connection_valid, 1},
    {"_RSQLite_connection_release", (DL_FUNC) &_RSQLite_connection_release, 1},
    {"_RSQLite_connection_copy_database", (DL_FUNC) &_RSQLite_connection_copy_database, 2},
    {"_RSQLite_connection_import_file", (DL_FUNC) &_RSQLite_connection_import_file, 6},
    {"_RSQLite_set_busy_handler", (DL_FUNC) &_RSQLite_set_busy_handler, 2},
    {"_RSQLite_extension_load", (DL_FUNC) &_RSQLite_extension_load, 3},
    {"_RSQLite_result_create", (DL_FUNC) &_RSQLite_result_create, 2},
    {"_RSQLite_result_release", (DL_FUNC) &_RSQLite_result_release, 1},
    {"_RSQLite_result_valid", (DL_FUNC) &_RSQLite_result_valid, 1},
    {"_RSQLite_result_fetch", (DL_FUNC) &_RSQLite_result_fetch, 2},
    {"_RSQLite_result_bind", (DL_FUNC) &_RSQLite_result_bind, 2},
    {"_RSQLite_result_has_completed", (DL_FUNC) &_RSQLite_result_has_completed, 1},
    {"_RSQLite_result_rows_fetched", (DL_FUNC) &_RSQLite_result_rows_fetched, 1},
    {"_RSQLite_result_rows_affected", (DL_FUNC) &_RSQLite_result_rows_affected, 1},
    {"_RSQLite_result_column_info", (DL_FUNC) &_RSQLite_result_column_info, 1},
    {"_RSQLite_result_get_placeholder_names", (DL_FUNC) &_RSQLite_result_get_placeholder_names, 1},
    {"_RSQLite_rsqliteVersion", (DL_FUNC) &_RSQLite_rsqliteVersion, 0},
    {"_RSQLite_init_logging", (DL_FUNC) &_RSQLite_init_logging, 1},
    {NULL, NULL, 0}
};

RcppExport void R_init_RSQLite(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
