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

FEATURE REQUEST: Support for SQL Views #32

Closed
dennyh89 opened this issue Aug 20, 2014 · 4 comments
Closed

FEATURE REQUEST: Support for SQL Views #32

dennyh89 opened this issue Aug 20, 2014 · 4 comments

Comments

@dennyh89
Copy link

Hi again.
Another topic i recently came across is the support for SQL Views. I need to define a View to easily merge/Join some tables for simple usage in Lists with a CursorAdapter. Therefore i had to change the genrated classes and i think it would be possible to support Views out of the box.

What we need to use a View:
-a Type property for each .json file indicating if this is a table or a view
-Selection
-Cursor
-Columns
-SQL_CREATE -> i currently added it in the OpenHelperCallbacks class, but i think it would be nicer to add the views directly in the DatabaseHelper, e.g. with defining a method:
public String getStatementFor in the OpenHelperCallbacks Interface/class
-additional URI for the View and the appropriate Mappings in the Contentprovider itself, alternatively the possibility to define and Extension class to add this kind of URIs

Would be nice to discuss it with you.
Regards.

@BoD
Copy link
Owner

BoD commented Aug 20, 2014

Hi!

Yes that sounds useful and reasonably feasible without too much difficulty I think :)

@jjkavalam
Copy link

Hi @BoD, @dennyh89, if the support for SQL VIEW has not made its way yet, I will be happy to create a PR.

@BoD
Copy link
Owner

BoD commented Sep 25, 2017

To be honest... Now that Room has been released, my motivation to continue to maintain this tool is very low. It looks to me that ContentProviders have been unofficially deprecated.

I will probably make this official on the README.

@jjkavalam
Copy link

@BoD I really appreciate. Just checked out room and it's amazing!

Only concern if it's available to older Android versions. If not a switch over from content providers may not be possible yet ?

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

No branches or pull requests

3 participants