We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efee2f6 commit cfb84baCopy full SHA for cfb84ba
lib/couchbase-orm/types/date_time.rb
@@ -7,7 +7,8 @@ def cast(value)
7
end
8
9
def serialize(value)
10
- value&.iso8601(@precision)
+ value&.
11
+ iso8601(@precision || 0)
12
13
14
lib/couchbase-orm/utilities/query_helper.rb
@@ -133,7 +133,7 @@ def quote(value)
133
if [String, Date].any? { |clazz| value.is_a?(clazz) }
134
"'#{N1ql.sanitize(value)}'"
135
elsif [DateTime, Time].any? { |clazz| value.is_a?(clazz) }
136
- formatedDate = value&.iso8601(@precision)
+ formatedDate = value&.iso8601(@precision || 0)
137
"'#{N1ql.sanitize(formatedDate)}'"
138
elsif value.is_a? Array
139
"[#{value.map{|v|quote(v)}.join(', ')}]"
0 commit comments