Skip to content

Query without "limit" #4

Closed
Closed
@develhox

Description

@develhox

Library version: 0.4.2

Actions to reproduce the bug

Call the SQLiteDatabase.query() method without a limit clause.
For example: SQLiteDatabase.openOrCreateDatabase(path).query(table: tableName)

Expected behaviour

The method returns a cursor with all the rows in the table

Bugged behaviour

The library produces an incorrect SQL query and throws the following exception:
java.lang.IllegalArgumentException: invalid LIMIT clauses:null

Suggested fix

I took a look at the code and I found that the issue is at the line 432 of database.dart. To fix it the line
'limit': limit.toString(),
should be replaced with
'limit': limit?.toString(),

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions