looser_typecasting.rb

Path: lib/sequel/extensions/looser_typecasting.rb
Last Update: Sat Jun 02 02:04:22 +0000 2018

frozen-string-literal: true

The LooserTypecasting extension loosens the default database typecasting for the following types:

:float :use to_f instead of Float()
:integer :use to_i instead of Integer()
:decimal :use 0.0 for unsupported strings
:string :silently allow hash and array conversion to string

To load the extension into the database:

  DB.extension :looser_typecasting

Related module: Sequel::LooserTypecasting

[Validate]