compilation fixes and disabled database type char[]
This commit is contained in:
@@ -246,7 +246,7 @@ utils::result<object::object_ptr<Type>, utils::error> session::update( const obj
|
||||
using namespace matador::utils;
|
||||
using namespace matador::query;
|
||||
|
||||
const auto col = column(info.value().get().definition().primary_key()->name());
|
||||
const auto col = column(info.value().get().reference_column()->name());
|
||||
auto res = matador::query::query::update(info->get().name())
|
||||
.set(generator::column_value_pairs<Type>())
|
||||
.where(col == _)
|
||||
@@ -272,7 +272,7 @@ utils::result<void, utils::error> session::remove( const object::object_ptr<Type
|
||||
using namespace matador::utils;
|
||||
using namespace matador::query;
|
||||
|
||||
const auto col = column(info.value().get().definition().primary_key()->name());
|
||||
const auto col = column(info.value().get().reference_column()->name());
|
||||
auto res = matador::query::query::remove()
|
||||
.from( info->get().name() )
|
||||
.where(col == _)
|
||||
@@ -294,7 +294,7 @@ utils::result<object::object_ptr<Type>, utils::error> session::find(const Primar
|
||||
if (!info) {
|
||||
return utils::failure(make_error(error_code::UnknownType, "Failed to determine requested type."));
|
||||
}
|
||||
if (!info.value().get().definition().has_primary_key()) {
|
||||
if (!info.value().get().has_primary_key()) {
|
||||
return utils::failure(make_error(error_code::NoPrimaryKey, "Type hasn't primary key."));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ class query_create_intermediate : public query_intermediate {
|
||||
public:
|
||||
query_create_intermediate();
|
||||
|
||||
executable_query table(const query::table &tab, std::initializer_list<object::attribute_definition> columns);
|
||||
executable_query table(const table &tab, std::initializer_list<object::attribute_definition> columns);
|
||||
executable_query table(const query::table &tab, const std::vector<object::attribute_definition> &columns);
|
||||
template<class Type>
|
||||
executable_query table(const query::table &tab, const object::repository &schema) {
|
||||
executable_query table(const matador::query::table &tab, const object::repository &schema) {
|
||||
return this->table(tab, object::attribute_definition_generator::generate<Type>(schema));
|
||||
}
|
||||
executable_query schema(const std::string &schema_name);
|
||||
|
||||
Reference in New Issue
Block a user