-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: databend-meta transaction support generic bool-expression
Since this commit, application is allowed to specify a complex bool expressions as the transaction predicate. For example, the following transaction will be processed if: `(a == 1 || b == 2) && (x == 3 or y == 4)` ```rust let eq = |key: &str, val: &str| TxnCondition::eq_value(sample(key), b(val)); TxnRequest{ condition: vec![], condition_tree: Some( eq("a", 1).or(eq("b", 2)) .and( eq("x", 3).or(eq("y", 4)) )) // ... } ``` For backward compatibility, both already existing `condition` and the new `condition_tree` will be evaluated: transaction will be processed only when both of them evaluated to be `true`.
- Loading branch information
1 parent
77e9775
commit 2e0001b
Showing
13 changed files
with
492 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.