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

RowData to Predicate adapter #43

Open
dmfs opened this issue Sep 12, 2017 · 0 comments
Open

RowData to Predicate adapter #43

dmfs opened this issue Sep 12, 2017 · 0 comments

Comments

@dmfs
Copy link
Owner

dmfs commented Sep 12, 2017

For testing purposes it can be useful to have a Predicate which takes RowData and matches all rows which contain the given RowData.

Usage:

new QueryRowSet(dataTable, new RowDataPredicate(rowData));

This would return all rows which contain the given rowData.

The question is, is that even possible at all? RowData is added to a ContentProviderOperation.Builder and requires a TransactionContext to do so. We could certainly subclass the Builder so it builds the actual predicate instead and provide an EmptyTransactionContext but that means you can not select by ids of virtual rows (because you need the TransactionContext). In most cases that's not an issue but in some edge cases it is.

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

No branches or pull requests

1 participant