File tree Expand file tree Collapse file tree 4 files changed +392
-4
lines changed Expand file tree Collapse file tree 4 files changed +392
-4
lines changed Original file line number Diff line number Diff line change 1818//! This module contains expressions.
1919
2020mod term;
21-
22- use std:: fmt:: { Display , Formatter } ;
23-
2421pub use term:: * ;
2522mod predicate;
23+ pub ( crate ) mod visitors;
24+ pub use predicate:: * ;
2625
2726use crate :: spec:: SchemaRef ;
28- pub use predicate :: * ;
27+ use std :: fmt :: { Display , Formatter } ;
2928
3029/// Predicate operators used in expressions.
3130///
Original file line number Diff line number Diff line change @@ -116,6 +116,14 @@ impl<T> UnaryExpression<T> {
116116 debug_assert ! ( op. is_unary( ) ) ;
117117 Self { op, term }
118118 }
119+
120+ pub ( crate ) fn term ( & self ) -> & T {
121+ & self . term
122+ }
123+
124+ pub ( crate ) fn op ( & self ) -> & PredicateOperator {
125+ & self . op
126+ }
119127}
120128
121129/// Binary predicate, for example, `a > 10`.
@@ -144,6 +152,18 @@ impl<T> BinaryExpression<T> {
144152 debug_assert ! ( op. is_binary( ) ) ;
145153 Self { op, term, literal }
146154 }
155+
156+ pub ( crate ) fn term ( & self ) -> & T {
157+ & self . term
158+ }
159+
160+ pub ( crate ) fn op ( & self ) -> & PredicateOperator {
161+ & self . op
162+ }
163+
164+ pub ( crate ) fn literal ( & self ) -> & Datum {
165+ & self . literal
166+ }
147167}
148168
149169impl < T : Display > Display for BinaryExpression < T > {
@@ -191,6 +211,18 @@ impl<T> SetExpression<T> {
191211 debug_assert ! ( op. is_set( ) ) ;
192212 Self { op, term, literals }
193213 }
214+
215+ pub ( crate ) fn term ( & self ) -> & T {
216+ & self . term
217+ }
218+
219+ pub ( crate ) fn op ( & self ) -> & PredicateOperator {
220+ & self . op
221+ }
222+
223+ pub ( crate ) fn literals ( & self ) -> & FnvHashSet < Datum > {
224+ & self . literals
225+ }
194226}
195227
196228impl < T : Bind > Bind for SetExpression < T > {
You can’t perform that action at this time.
0 commit comments