You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/onyx-sql/query/insert.cr
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ module Onyx::SQL
33
33
ivar =T.instance_vars.find(&.name.== key)
34
34
35
35
not_null = (a = ivar.annotation(Field) || ivar.annotation(Reference)) && a[:not_null]
36
-
raise"On Query#insert: #{key} is nilable in compilation time (#{value}), but @#{ivar.name} has `not_null` option set to `true`. Consider calling `.not_nil!` on the value"if not_null && value.nilable?
36
+
raise"On Query(#{T})#insert: #{key} is nilable in compilation time (`#{value}`), but #{T}@#{ivar.name} has `not_null` option set to `true`. Consider calling `.not_nil!` on the value"if not_null && value.nilable?
37
37
38
38
db_default = (a = ivar.annotation(Field)) && a[:default]
Copy file name to clipboardExpand all lines: src/onyx-sql/query/set.cr
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ module Onyx::SQL
55
55
ivar =T.instance_vars.find(&.name.== key)
56
56
57
57
not_null = (a = ivar.annotation(Field) || ivar.annotation(Reference)) && a[:not_null]
58
-
raise"On Query#set: #{key} is nilable in compilation time (#{value}), but @#{ivar.name} has `not_null` option set to `true`. Consider calling `.not_nil!` on the value"if not_null && value.nilable?
58
+
raise"On Query(#{T})#set: #{key} is nilable in compilation time (`#{value}`), but #{T}@#{ivar.name} has `not_null` option set to `true`. Consider calling `.not_nil!` on the value"if not_null && value.nilable?
59
59
%}
60
60
61
61
{%raise"Cannot find an instance variable named @#{key} in #{T}"unless ivar %}
Copy file name to clipboardExpand all lines: src/onyx-sql/query/where.cr
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ module Onyx::SQL
55
55
56
56
{%raise"`primary_key: #{pk}` option didn't match any of `#{type}` instance variables"unless pk_rivar %}
57
57
58
-
{%raise"On Query#where: #{key} is nilable in compilation time (#{value}), but @#{ivar.name} has `not_null` option set to `true`. Consider calling `.not_nil!` on the value"if ann[:not_null] && value.nilable? %}
58
+
{%raise"On Query(#{T})#where: #{key} is nilable in compilation time (`#{value}`), but #{T}@#{ivar.name} has `not_null` option set to `true`. Consider calling `.not_nil!` on the value"if ann[:not_null] && value.nilable? %}
{% not_null = (a = ivar.annotation(Field)) && a[:not_null] %}
97
97
98
-
{%raise"On Query#where: argument `#{key}:` is nilable in compilation time #{value}, but #{T}@#{ivar.name} has `not_null` option set to `true`. Consider calling `.not_nil!` on the `#{key}:` argument"if not_null && value.nilable? %}
98
+
{%raise"On Query#where: argument `#{key}` is nilable in compilation time (`#{value}`), but #{T}@#{ivar.name} has `not_null` option set to `true`. Consider calling `.not_nil!` on the `#{key}` argument"if not_null && value.nilable? %}
99
99
100
-
{%raise"Invalid compile-time type `#{value}` for argument `#{key.symbolize}` in `Query(#{T})#where` call. Expected: `#{ivar.type}`"unless value <= ivar.type %}
100
+
{%raise"Invalid compile-time type `#{value}` for argument `#{key.symbolize}` on `Query(#{T})#where` call. Expected: `#{ivar.type}`"unless value <= ivar.type %}
0 commit comments