renamed class attribute_definition to attribute
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include "postgres_result_reader.hpp"
|
||||
#include "postgres_statement.hpp"
|
||||
|
||||
#include "matador/object/attribute_definition.hpp"
|
||||
#include "matador/object/attribute.hpp"
|
||||
|
||||
#include "matador/sql/error_code.hpp"
|
||||
#include "matador/sql/record.hpp"
|
||||
@@ -89,7 +89,7 @@ utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> postgres_co
|
||||
return utils::failure(make_error(sql::error_code::FETCH_FAILED, res, conn_, "Failed to fetch", context.sql));
|
||||
}
|
||||
|
||||
std::vector<object::attribute_definition> prototype = context.prototype;
|
||||
std::vector<object::attribute> prototype = context.prototype;
|
||||
|
||||
const int num_col = PQnfields(res);
|
||||
if (prototype.size() != static_cast<size_t>(num_col)) {
|
||||
@@ -212,7 +212,7 @@ utils::basic_type string2type(const char *type) {
|
||||
}
|
||||
}
|
||||
|
||||
utils::result<std::vector<object::attribute_definition>, utils::error> postgres_connection::describe(const std::string &table) {
|
||||
utils::result<std::vector<object::attribute>, utils::error> postgres_connection::describe(const std::string &table) {
|
||||
const std::string stmt(
|
||||
"SELECT ordinal_position, column_name, udt_name, data_type, is_nullable, column_default FROM information_schema.columns WHERE table_schema='public' AND table_name='"
|
||||
+ table + "'");
|
||||
@@ -224,7 +224,7 @@ utils::result<std::vector<object::attribute_definition>, utils::error> postgres_
|
||||
}
|
||||
|
||||
postgres_result_reader reader(res);
|
||||
std::vector<object::attribute_definition> prototype;
|
||||
std::vector<object::attribute> prototype;
|
||||
while (auto fetched = reader.fetch()) {
|
||||
if (!fetched.is_ok()) {
|
||||
return utils::failure(fetched.release_error());
|
||||
|
||||
Reference in New Issue
Block a user