diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2015-06-03 00:06:31 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2015-06-03 00:06:31 +0200 |
| commit | 5bc49de682eec79f3dc8096c6812bee70fe2d496 (patch) | |
| tree | fa9655c46dded940496719f4f547b36ab5eb6c89 /src/db.cc | |
| parent | fb659a41cfe5523c62fd6993acddab120ccb0758 (diff) | |
Make it simpler to use DB
Add DB::Transaction
Diffstat (limited to 'src/db.cc')
| -rw-r--r-- | src/db.cc | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -57,4 +57,17 @@ double DB::Value::d() const { return data_.d; } +std::shared_ptr<DB::Snapshot> DB::select( + const std::string& table, const OrderBy& order_by) { + std::vector<OrderBy> order_by_vector(1, order_by); + return select(table, Condition(), order_by_vector); +} + +std::shared_ptr<DB::Snapshot> DB::select( + const std::string& table, const Condition& condition, + const OrderBy& order_by) { + std::vector<OrderBy> order_by_vector(1, order_by); + return select(table, condition, order_by_vector); +} + } // namespace stuff |
