Module: DB::MariaDB::Native::Types::Boolean

Defined in:
lib/db/mariadb/native/types.rb

Class Method Summary collapse

Class Method Details

.parse(string) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/db/mariadb/native/types.rb', line 37

def self.parse(string)
  case string
  when '0'
    false
  when '1'
    true
  when nil
    nil
  else
    Integer(string)
  end
end