-
-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with SELECT 1 query #390
Comments
I am not entirely sure, but it seems like it is due to the behaviour of the SQL engine, SQLite in this case. More experiments are needed though. |
Yes, please check #386 :) |
I gave it another look and I think you are correct @tyt2y3 that this is how the SQLite engine is acting and hence not an issue in SeaORM. I must have made a mistake when testing the issue using DBeaver so I think we can close the issue. About my usecaseI am not exactly sure the schema discovery is what I need for this use case. Essentially I am writing a unit test for the Rust GraphQL API I am building. The function I am testing takes in my custom If anyone else is trying to do the same thing and comes across this I am temporarily using |
I have been using SeaORM and have found what looks to me like a bug. Please let me know if this is a mistake on my end.
If I run the query
SELECT 1 AS 'a' FROM '{table_name}';
I think it should be expected that the result should always bea=1
as long as{table_name}
exists in the DB.When executing this query using SeaORM on a table that contains no rows instead of it returning a
Some(QueryResult)
containinga=1
it returnsNone
.Demo. You can enable/disable the commented-out code to show how it acts differently when the table contains data or not.
For context, the reason I am trying to do this query is to detect if a table was created in my unit tests.
Thanks for any help and this awesome project!
The text was updated successfully, but these errors were encountered: