Android sqlite database query with the columns needed taken from a String[]


I have string array with columns I want to select:



String[] columns = {"col1", "col2", "col3"};


The columns might change in the future, but will always be a subset
of available columns.



I cannot find a SQLiteDatabase API that lets me pass
this array as columns. The only solution I have so far is to just
string join the columns with , as separator and add it
into my query string and perform a rawQuery.



Is there a better solution?



EDIT



The query is a JOIN query.


- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow