File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -288,10 +288,27 @@ impl<'a> BlockRangeColumn<'a> {
288288 BlockRangeColumn :: ImmutableRange {
289289 table : _,
290290 table_prefix : _,
291- block_range : _ ,
291+ block_range : BlockRange ( start , finish ) ,
292292 } => {
293- println ! ( "ImmutableRange conatins()" ) ;
294- todo ! ( )
293+ out. push_sql ( "block$ >= " ) ;
294+ match start {
295+ Bound :: Included ( block) => out. push_bind_param :: < Integer , _ > ( block) ?,
296+ Bound :: Excluded ( block) => {
297+ out. push_bind_param :: < Integer , _ > ( block) ?;
298+ out. push_sql ( "+1" ) ;
299+ }
300+ Bound :: Unbounded => todo ! ( ) ,
301+ } ;
302+ out. push_sql ( " AND block$ <= " ) ;
303+ match finish {
304+ Bound :: Included ( block) => {
305+ out. push_bind_param :: < Integer , _ > ( block) ?;
306+ out. push_sql ( "+1" ) ;
307+ }
308+ Bound :: Excluded ( block) => out. push_bind_param :: < Integer , _ > ( block) ?,
309+ Bound :: Unbounded => todo ! ( ) ,
310+ } ;
311+ Ok ( ( ) )
295312 }
296313 }
297314 }
Original file line number Diff line number Diff line change @@ -496,6 +496,9 @@ impl EntityData {
496496 . unwrap ( ) ;
497497 let n = start. parse :: < i32 > ( ) . unwrap ( ) ;
498498 Some ( n)
499+ } else if key == "block$" {
500+ let block = json. as_i64 ( ) . unwrap ( ) as i32 ;
501+ Some ( block)
499502 } else {
500503 None
501504 }
You can’t perform that action at this time.
0 commit comments