@@ -285,6 +285,7 @@ where
285285 T : Transaction ,
286286 A : AsRef < [ ( & ' static str , DataValue ) ] > ,
287287{
288+ #[ cfg( feature = "orm" ) ]
288289 pub ( crate ) fn typed < N > ( self ) -> BindPlanFrom < ' s , ' a , ' b , ' arena , T , A , N > {
289290 BindPlanFrom {
290291 binder : self . binder ,
@@ -294,6 +295,7 @@ where
294295 }
295296 }
296297
298+ #[ cfg( feature = "orm" ) ]
297299 pub ( crate ) fn filter_expr (
298300 mut self ,
299301 predicate : ScalarExpression ,
@@ -304,6 +306,7 @@ where
304306 Ok ( self )
305307 }
306308
309+ #[ cfg( feature = "orm" ) ]
307310 pub ( crate ) fn join_plan (
308311 mut self ,
309312 right_plan : LogicalPlan ,
@@ -337,11 +340,13 @@ where
337340 T : Transaction ,
338341 A : AsRef < [ ( & ' static str , DataValue ) ] > ,
339342{
343+ #[ cfg( feature = "orm" ) ]
340344 pub ( crate ) fn set_select_list ( mut self , select_list : Vec < ScalarExpression > ) -> Self {
341345 self . select_list = select_list;
342346 self
343347 }
344348
349+ #[ cfg( feature = "orm" ) ]
345350 pub ( crate ) fn group_by_expr ( self , expr : ScalarExpression ) -> Result < Self , DatabaseError > {
346351 let sorted = self
347352 . filter_expr ( None ) ?
@@ -363,6 +368,7 @@ where
363368 } )
364369 }
365370
371+ #[ cfg( feature = "orm" ) ]
366372 pub ( crate ) fn aggregate_without_group ( self ) -> Result < Self , DatabaseError > {
367373 let sorted = self
368374 . filter_expr ( None ) ?
@@ -384,16 +390,19 @@ where
384390 } )
385391 }
386392
393+ #[ cfg( feature = "orm" ) ]
387394 pub ( crate ) fn having_expr ( mut self , expr : ScalarExpression ) -> Result < Self , DatabaseError > {
388395 self . plan = self . binder . bind_having ( self . plan , expr, self . arena ) ?;
389396 Ok ( self )
390397 }
391398
399+ #[ cfg( feature = "orm" ) ]
392400 pub ( crate ) fn sort_field ( mut self , field : SortField ) -> Result < Self , DatabaseError > {
393401 self . plan = self . binder . bind_sort ( self . plan , vec ! [ field] , self . arena ) ?;
394402 Ok ( self )
395403 }
396404
405+ #[ cfg( feature = "orm" ) ]
397406 pub fn distinct ( mut self ) -> Result < Self , DatabaseError > {
398407 let distinct_outputs = self . select_list . clone ( ) ;
399408 self . binder . bind_distinct_output_exprs (
@@ -405,20 +414,23 @@ where
405414 Ok ( self )
406415 }
407416
417+ #[ cfg( feature = "orm" ) ]
408418 pub fn limit ( mut self , limit : usize ) -> Result < Self , DatabaseError > {
409419 self . plan = self
410420 . binder
411421 . bind_limit_values ( self . plan , None , Some ( limit) ) ?;
412422 Ok ( self )
413423 }
414424
425+ #[ cfg( feature = "orm" ) ]
415426 pub fn offset ( mut self , offset : usize ) -> Result < Self , DatabaseError > {
416427 self . plan = self
417428 . binder
418429 . bind_limit_values ( self . plan , Some ( offset) , None ) ?;
419430 Ok ( self )
420431 }
421432
433+ #[ cfg( feature = "orm" ) ]
422434 pub fn finish ( self ) -> Result < LogicalPlan , DatabaseError > {
423435 if self . select_list . iter ( ) . any ( ScalarExpression :: has_agg_call) {
424436 return self . aggregate_without_group ( ) ?. finish ( ) ;
0 commit comments