query builder progress
This commit is contained in:
@@ -172,6 +172,10 @@ const std::string& dialect::commit() const {
|
||||
return token_at(dialect_token::Commit);
|
||||
}
|
||||
|
||||
const std::string& dialect::constraint() const {
|
||||
return token_at(dialect_token::Constraint);
|
||||
}
|
||||
|
||||
const std::string& dialect::create() const {
|
||||
return token_at(dialect_token::Create);
|
||||
}
|
||||
|
||||
@@ -8,13 +8,14 @@ namespace matador::sql::detail {
|
||||
template<>
|
||||
record *create_prototype<record>(const std::vector<object::attribute> &prototype) {
|
||||
auto result = std::make_unique<record>();
|
||||
int index{0};
|
||||
for (const auto &col: prototype) {
|
||||
result->append({
|
||||
col.name(),
|
||||
col.type(),
|
||||
col.attributes().options(),
|
||||
col.attributes().size(),
|
||||
col.index()
|
||||
index++
|
||||
});
|
||||
}
|
||||
return result.release();
|
||||
|
||||
Reference in New Issue
Block a user