removed obsolete interface namespace
This commit is contained in:
parent
843d125b99
commit
2fdbfc651e
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
namespace matador::backends::postgres {
|
namespace matador::backends::postgres {
|
||||||
|
|
||||||
class postgres_parameter_binder final : public sql::interface::parameter_binder {
|
class postgres_parameter_binder final : public sql::parameter_binder {
|
||||||
public:
|
public:
|
||||||
struct bind_data {
|
struct bind_data {
|
||||||
explicit bind_data(size_t size);
|
explicit bind_data(size_t size);
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ class postgres_statement final : public sql::statement_impl
|
||||||
public:
|
public:
|
||||||
postgres_statement(PGconn *db, std::string name, const sql::query_context &query);
|
postgres_statement(PGconn *db, std::string name, const sql::query_context &query);
|
||||||
|
|
||||||
utils::result<size_t, utils::error> execute(const sql::interface::parameter_binder& bindings) override;
|
utils::result<size_t, utils::error> execute(const sql::parameter_binder& bindings) override;
|
||||||
utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> fetch(const sql::interface::parameter_binder& bindings) override;
|
utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> fetch(const sql::parameter_binder& bindings) override;
|
||||||
void reset() override;
|
void reset() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ postgres_statement::postgres_statement(PGconn *db, std::string name, const sql::
|
||||||
, name_(std::move(name))
|
, name_(std::move(name))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
utils::result<size_t, utils::error> postgres_statement::execute(const sql::interface::parameter_binder& bindings) {
|
utils::result<size_t, utils::error> postgres_statement::execute(const sql::parameter_binder& bindings) {
|
||||||
const auto* postgres_bindings = dynamic_cast<const postgres_parameter_binder*>(&bindings);
|
const auto* postgres_bindings = dynamic_cast<const postgres_parameter_binder*>(&bindings);
|
||||||
if (!postgres_bindings) {
|
if (!postgres_bindings) {
|
||||||
return utils::failure(utils::error(sql::error_code::EXECUTE_FAILED, "Failed to cast bindings to postgres bindings"));
|
return utils::failure(utils::error(sql::error_code::EXECUTE_FAILED, "Failed to cast bindings to postgres bindings"));
|
||||||
|
|
@ -33,10 +33,10 @@ utils::result<size_t, utils::error> postgres_statement::execute(const sql::inter
|
||||||
return utils::ok(static_cast<size_t>(0));
|
return utils::ok(static_cast<size_t>(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
return utils::ok((std::stoul(tuples)));
|
return utils::ok(static_cast<size_t>(std::stoul(tuples)));
|
||||||
}
|
}
|
||||||
|
|
||||||
utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> postgres_statement::fetch(const sql::interface::parameter_binder& bindings) {
|
utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> postgres_statement::fetch(const sql::parameter_binder& bindings) {
|
||||||
const auto* postgres_bindings = dynamic_cast<const postgres_parameter_binder*>(&bindings);
|
const auto* postgres_bindings = dynamic_cast<const postgres_parameter_binder*>(&bindings);
|
||||||
if (!postgres_bindings) {
|
if (!postgres_bindings) {
|
||||||
return utils::failure(utils::error(sql::error_code::EXECUTE_FAILED, "Failed to cast bindings to postgres bindings"));
|
return utils::failure(utils::error(sql::error_code::EXECUTE_FAILED, "Failed to cast bindings to postgres bindings"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue