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
class User
DB.mapping({
id: Int32?,
name: String?,
some_date: Time?
})
end
If a record is inserted into the database with a nil column value for some_date, then trying to call User.from_rs(result_set) fails with an error:
Nil assertion failed (Exception)
0x10158ec62: *CallStack::unwind:Array(Pointer(Void)) at ??
0x10158ec01: *CallStack#initialize:Array(Pointer(Void)) at ??
0x10158ebd8: *CallStack::new:CallStack at ??
0x10157b4d1: *raise<Exception>:NoReturn at ??
0x10157b4b1: *raise<String>:NoReturn at ??
0x1015adb93: *Nil#not_nil!:NoReturn at ??
0x10163b935: *User#initialize<PG::ResultSet>:Time at ??
0x10163b539: *User::new<PG::ResultSet>:User at ??
0x10163b4ad: *User::from_rs<PG::ResultSet>:Array(User) at ??
0x10157b068: __crystal_main at ??
0x101589af8: main at ??
The text was updated successfully, but these errors were encountered:
class created like:
If a record is inserted into the database with a nil column value for
some_date
, then trying to callUser.from_rs(result_set)
fails with an error:The text was updated successfully, but these errors were encountered: