First page Back Continue Last page Overview Graphics


Notes:

DataMapper isn't the only database library that tries to work around date's shortcomings.

Swift is a fairly new ruby database library, and because date is so slow, they skip calling date's constructors entirely.

typecast_timestamp here parses the string in C and creates a ruby Time object. Then to_date is called on that Time object to get the Date.

Swift does this because it's faster to create a ruby Time object and convert it to a Date using to_date then it is to create a Date object the standard way.