sea-orm
sea-orm copied to clipboard
Fn selector::one
I was try to use sea_orm::Selector::one The return of the function is Result<Option<S::Item>, DbErr> I expected if the database not exist or record is not found then i will have DbErr enum which will describe the error, but the actual behavior i always i get Ok(None) the database is SQLite.
Hey @zbinhazzaa, welcome! I wonder if you are connecting to an in-memory SQLite? It will be created on-the-fly without the need to initialize. Hence, no errors will be thrown. Also, from what I understand, SQLite does not support multiple databases / schemas. It only contains one database / schema and with multiple tables in it.
um... we seem to have caught the error and suppressed it somewhere
hey, @billy1624 I was trying different cases to get DbErr but this does not work well, for example when a record is not found. @tyt2y3 Is the error was as I explained or something else?
Hey @zbinhazzaa, sorry for the delay. For select, we won't errors when the select return none. But for update one we do thrown error when the updating row doesn't exist.
Reason to close: not having an reproducible example