Class Amalgalite::TypeMaps::DefaultMap
In: lib/amalgalite/type_maps/default_map.rb
lib/amalgalite/type_maps/default_map.rb
Parent: Object

An Amalgalite::TypeMap that does its best to convert between Ruby classes and known SQL data types.

Upon instantiation, DefaultMap generates a conversion map to try to figure out the best way to convert between populate SQL ‘types’ and ruby classes

Methods

bind_type_of   bind_type_of   blob   blob   boolean   boolean   date   date   datetime   datetime   float   float   integer   integer   new   new   result_value_of   result_value_of   string   string   time   time  

Public Class methods

Public Instance methods

A straight logical mapping (for me at least) of basic Ruby classes to SQLite types, if nothing can be found then default to TEXT.

A straight logical mapping (for me at least) of basic Ruby classes to SQLite types, if nothing can be found then default to TEXT.

convert a string to a blob

convert a string to a blob

convert a string to true of false

convert a string to true of false

convert a string to a date

convert a string to a date

convert a string to a datetime, if no timzone is found in the parsed string, set it to the local offset.

convert a string to a datetime, if no timzone is found in the parsed string, set it to the local offset.

convert a string to a Float

convert a string to a Float

convert an string to an Integer

convert an string to an Integer

Map the incoming value to an outgoing value. For some incoming values, there will be no change, but for some (i.e. Dates and Times) there is some conversion

Map the incoming value to an outgoing value. For some incoming values, there will be no change, but for some (i.e. Dates and Times) there is some conversion

convert a string to a String, yes redundant I know.

convert a string to a String, yes redundant I know.

convert a string to a Time

convert a string to a Time

[Validate]