android-contentprovider-generator icon indicating copy to clipboard operation
android-contentprovider-generator copied to clipboard

Easy projection generation + fixed "do all possible joins by default" problem

Open yargray opened this issue 10 years ago • 2 comments

Hi!

I hope that these changes are quite useful. Now I can generate projections by *Selection objects like other criterias:

new ArticleSelection().forId().forTitle().forText().orderByDate().query(resolver);
// instead of
new ArticleSelection().orderByDate().query(resolver, new String[] {
    ArticleColumns._ID, ArticleColumns.TITLE, ArticleColumns.TEXT
})
// Now default selection criteria:
new ArticleSelection().query(resolver);
// means
new ArticleSelection().query(resolver, ArticleColumns.ALL_COLUMNS);
// instead of
new ArticleSelection().query(resolver, null);
// which means large and dangerous set of joins like "article JOIN catalog JOIN domain JOIN ... etc"

Client should visibly declare the specific joining columns to do the specific join:

new ArticleSelection().forId().forTitle().forCatalogName().forDomainName().query(resolver);
// "article JOIN catalog JOIN domain

Thanks for your attention

yargray avatar Jul 31 '15 19:07 yargray

Looks like this would solve the mentioned issue (#86). Any chance that this will get merged?

frigus02 avatar Oct 31 '15 12:10 frigus02

I am very sorry I haven't had the time to look at this yet. I can't promise anything, but I hope I will have some free time "soon" to look at it :) Again, sorry for the delay.

BoD avatar Oct 31 '15 12:10 BoD