Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatbuffer definitions for index queries #821

Merged
merged 6 commits into from
Aug 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion production/db/core/src/flatbuffers/messages.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,34 @@ table table_scan_info_t {
type_id: uint64;
}

union index_query_t {index_range_query_t, index_point_read_query_t, index_equal_range_query_t}

// Range queries return all results between the lower bound (inclusive) and the upper bound (inclusive).
// For range queries, unspecified keys mean that there is no lower/upper-bound.
// If both keys are unspecified, this query will be equivalent to a full scan.
//
// For exclusive bounds, do additional filtering on the client.
table index_range_query_t {
lower_bound_key: [byte];
upper_bound_key: [byte];
}

// A point read query returns at most a single result matching the specified key.
// The query can return no results.

table index_point_read_query_t {
key: [byte];
}

// Returns all results matching a specified key.
table index_equal_range_query_t {
key: [byte];
}

table index_scan_info_t {
index_id: uint64;
txn_id : uint64;
txn_id: uint64;
query: index_query_t;
}

union request_data_t {
Expand Down