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

$queryRaw and $executeRaw seem to always return null #177

Closed
craiglabenz opened this issue Mar 25, 2023 · 1 comment · Fixed by #182 or #183
Closed

$queryRaw and $executeRaw seem to always return null #177

craiglabenz opened this issue Mar 25, 2023 · 1 comment · Fixed by #182 or #183
Labels
bug Something isn't working

Comments

@craiglabenz
Copy link

Both $queryRaw and $executeRaw seem to always return null. For $executeRaw, that leads to a fatal exception, as null is not a subtype of FutureOr<int>.

$queryRaw example:

final result = await db.$queryRaw('SELECT NOW()');
print(result); // null

$executeRaw example:

final result = await db.$queryRaw(r'UPDATE table WHERE id=1 SET column=$1', parameters: ['value']);
// exception: type 'Null' is not a subtype of type 'FutureOr<int>'

Perhaps I'm holding it wrong?

Thanks for working on this library, by the way! 💙

@medz
Copy link
Owner

medz commented Mar 26, 2023

I'm investigating related issues~Thank you for your attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants