Skip to content

Commit 7e0b30e

Browse files
amabluea-maurice
authored andcommitted
Converted the order_by enum on QueryParams to a named enum instead of an
anonymous one. This is useful when the value needs to be passed around to functions or stored in variables. PiperOrigin-RevId: 257076510
1 parent 6914c4b commit 7e0b30e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

database/src/common/query_spec.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ struct QueryParams {
7171
return false;
7272
}
7373

74+
enum OrderBy { kOrderByPriority, kOrderByChild, kOrderByKey, kOrderByValue };
75+
7476
// Set by Query::OrderByPriority(), Query::OrderByChild(),
7577
// Query::OrderByKey(), and Query::OrderByValue().
7678
// Default is kOrderByPriority.
77-
enum { kOrderByPriority, kOrderByChild, kOrderByKey, kOrderByValue } order_by;
79+
OrderBy order_by;
7880

7981
// Set by Query::OrderByChild(). Only valid if order_by is kOrderByChild.
8082
std::string order_by_child;

0 commit comments

Comments
 (0)