Skip to content
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

Fix for issue "1.8.0-beta - System.ArgumentException: method arguments are incompatible" and Unit Tests #1059

Merged

Conversation

inforithmics
Copy link
Contributor

Fixes #1048

@inforithmics inforithmics changed the title Fix for issue Argument Exception in FastColumn Setters and Unit Tests Fix for issue "1.8.0-beta - System.ArgumentException: method arguments are incompatible" and Unit Tests Aug 31, 2021
@inforithmics
Copy link
Contributor Author

inforithmics commented Aug 31, 2021

Possible Improvements.

Because the Signature of the FastColumn setters is now Action<object, Sqlite3Statement, int> it could be added to the Column as a Property. So that it is not regenerated on every query.

@praeclarum
Copy link
Owner

Thank you for this fix!

@praeclarum praeclarum merged commit 56c06a4 into praeclarum:master Sep 2, 2021
@cherron-aptera
Copy link
Contributor

@inforithmics Awesome work, thank you for fixing my broken code!

I'm still not entirely clear on exactly what's going on here. Kudos to you for figuring it out!

@inforithmics
Copy link
Contributor Author

The problem was that it is possible to call sqlite like this

var test = db.CreateCommand("select * from Product") .ExecuteDeferredQuery<object>(new TableMapping(typeof(Product))) .ToList();

which means that it tried to strongly bind it to an object, my code detects this situation and internally calls it like this.

var test = db.CreateCommand("select * from Product") .ExecuteDeferredQuery<Product>(new TableMapping(typeof(Product))) .ToList();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.8.0-beta - System.ArgumentException: method arguments are incompatible
3 participants