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

count statement should return number but it got NULL #625

Closed
xwanlion opened this issue Dec 20, 2021 · 4 comments
Closed

count statement should return number but it got NULL #625

xwanlion opened this issue Dec 20, 2021 · 4 comments

Comments

@xwanlion
Copy link

abstract dao class:

  @Query('SELECT count(1) num FROM v_todo where deleted = 0 and state = :state')
  Future<int?> count(int state);

generated dao class:

@override
  Future<int?> count(int state) async {
    await _queryAdapter.queryNoReturn(
        'SELECT count(1) num FROM v_todo where deleted = 0 and state = ?1',
        arguments: [state]);
  }

why is queryNoReturn, not a number?

@MrCsabaToth
Copy link

The support of scalar return values need some development. See #576

@MrCsabaToth
Copy link

Ultimately #200 will introduce a new SQL query analyzer to support cases like this. Major change.

@xwanlion
Copy link
Author

all right

@MrCsabaToth
Copy link

Unfortunately #361 got abandoned, need to be rewritten from scratch

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

No branches or pull requests

2 participants