date, time, datetime values support

This commit is contained in:
Loic Nageleisen 2017-03-03 16:13:46 +01:00
parent 075957be04
commit 9b6e871b1b
2 changed files with 13 additions and 0 deletions

View file

@ -278,6 +278,7 @@ module Rebel::SQL
when String then raw "'#{escape_str(v)}'"
when Integer then raw v.to_s
when TrueClass, FalseClass then raw(v ? 'TRUE' : 'FALSE')
when Date, Time, DateTime then value(v.iso8601)
when nil then raw 'NULL'
else raise NotImplementedError, v.inspect
end