updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2024-10-11 16:15:07 -05:00
parent d8d86f3f0c
commit 88718de96e
2 changed files with 21 additions and 0 deletions

View File

@ -29,6 +29,7 @@ void db_select::context::clear() {
columns.clear();
count_columns.clear();
limit.reset();
offset.reset();
order_by.reset();
where.reset();
where_values.clear();
@ -54,6 +55,12 @@ auto db_select::context::db_select_op_t::limit(std::int32_t value)
return *this;
}
auto db_select::context::db_select_op_t::offset(std::int32_t value)
-> db_select::context::db_select_op_t {
db_select{ctx}.offset(value);
return *this;
}
auto db_select::context::db_select_op_t::order_by(std::string column_name,
bool ascending)
-> db_select::context::db_select_op_t {
@ -127,6 +134,10 @@ auto db_select::dump() const -> std::string {
query << " LIMIT " << context_->limit.value();
}
if (context_->offset.has_value()) {
query << " OFFSET " << context_->offset.value();
}
query << ';';
return query.str();
@ -185,6 +196,11 @@ auto db_select::limit(std::int32_t value) -> db_select & {
return *this;
}
auto db_select::offset(std::int32_t value) -> db_select & {
context_->offset = value;
return *this;
}
auto db_select::order_by(std::string column_name,
bool ascending) -> db_select & {
context_->order_by = {column_name, ascending};