Module | Sequel::SQL::CastMethods |
In: |
lib/sequel/sql.rb
|
Cast the reciever to the given SQL type (or the database‘s default integer type if none given), and return the result as a NumericExpression.
# File lib/sequel/sql.rb, line 191 191: def cast_numeric(sql_type = nil) 192: cast(sql_type || Integer).sql_number 193: end
Cast the reciever to the given SQL type (or the database‘s default string type if none given), and return the result as a StringExpression, so you can use + directly on the result for SQL string concatenation.
# File lib/sequel/sql.rb, line 198 198: def cast_string(sql_type = nil) 199: cast(sql_type || String).sql_string 200: end