require_relative 'expressions' module RailsServersideDatatables def if_then( test_expr, comparison_value, then_expr, else_expr ) IfThen.new( test_expr, comparison_value, then_expr, else_expr ) end def not_null( first, *rest ) FirstNotNull.new( first, *rest ) end def text_cast( expression ) CastToText.new( expression ) end def num_cast( expression ) CastToNumeric.new( expression ) end def num_op( a, op, b ) NumOp.new( a, op, b ) end def expr_alias( expression, name ) ExpressionAlias.new( expression, name ) end def raw_expr( expr ) ExprTreeNode.raw expr end end