Module | Sequel::SQL::CastMethods |
In: |
lib/sequel_core/sql.rb
|
Cast the reciever to the given SQL type (or integer if none given), and return the result as a NumericExpression.
# File lib/sequel_core/sql.rb, line 190 190: def cast_numeric(sql_type = nil) 191: cast(sql_type || :integer).sql_number 192: end
Cast the reciever to the given SQL type (or text 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_core/sql.rb, line 197 197: def cast_string(sql_type = nil) 198: cast(sql_type || :text).sql_string 199: end