Closed cardinalby closed 9 years ago
Hi @cardinalby, I'm extending the SQLConnection class with some methods that avoid the use of Interfaces so it will be up to you to use whatever you want. Just a question about what you pose here. This solution works even with interface use? Or only without the interfaces?
I can't reproduce the error with my iPad following your first example. It works for me... I'll try to make it crash with a more complicated query. Do you get error with such a query?
I am waiting for IDisposable (commented in https://github.com/codecoding/SQLite4Unity3d/issues/5) fix, then will test on the latest version and prepare the reproducible example.
I can't reproduce it too on last version :). May be it was due to interface usage, which was fixed.
I'm glad but I have to say that I couldn't reproduce it even with the interfaces. In fact I tested it before removing the interfaces just to see if I could learn something. Anyway, I'll close this issue and if you somehow manage to reproduce the behaviour don't hesitate to tell me. I will reopen it again and see how we deal with it.
TableQuery.Where and Get methods takes Expression, analyze it and build SQL “where” sentence. Some kind of expressions works on Android but don’t work on iOS. Let’s use classical example with Employee and Department tables (http://www.oracle.com/ocom/groups/public/@otn/documents/digitalasset/513145.jpg). We have 2 corresponded classes with needed attributes. Code:
This code will work on Android, but wil not on iOS due to problems with AOT compilation in CompileExpr method. To fix it on iOS you can:
It works! And there are question: can we avoid using intermediate var for compability with AOT compilation on iOS?
May be upgrade to latest SQLiteNet version would solve the problem?