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

Use multiple Where clauses when using fetch() #43

Open
bhapps opened this issue Dec 27, 2018 · 2 comments
Open

Use multiple Where clauses when using fetch() #43

bhapps opened this issue Dec 27, 2018 · 2 comments
Assignees
Labels

Comments

@bhapps
Copy link

bhapps commented Dec 27, 2018

ReActiveAndroid Version:
latest

Bug or Feature Request:
Use multiple Where clauses when using fetch()

Description:
There is still an issue where I wish to return all (or paginated) data filtered by the query using fetch() which returns the error of Cannot bind argument at index 2 because the index is out of range. The statement has 1 parameters

All the documentation advises only of using fetchSingle() when using multiple Where clauses
I wish not to return only the first hit, but all (or some) data items.

  • Maybe fetch() has not been implemented for using multiple Where clauses
  • fetch() with multiple clauses would require List<> return type
@bhapps
Copy link
Author

bhapps commented Dec 27, 2018

Ok funny thing as per below, two args passed through and got results from fetch() ...

List<MyTableClass> MyTableClassList = Select.from(MyTableClass.class).where(
"id BETWEEN ? AND ?", 
firstId, 
lastId)
    .orderBy("id " + defaultSortBy)
    .limit(limit)
    .fetch();

however, using LIKE '?&' causes crash ...
Ill investigate further ..

@ImangazalievM
Copy link
Owner

@bennith yeah, ReActiveAndroid has a problem with LIKE clause. I will try to catch and fix this bug.

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

No branches or pull requests

2 participants