How to get the count of columns resulting by sqlite executeSql

I am looking to build a common method to get data from sqlite. I am using @ionic-native/sqlite plugin. My method dont know the columns names and also no of columns. becasuse same method can call by different caller (different screen of app) to fetch the data.
The no of rows i can know by resultSet.Rows.length and row object can access by resultSet.Rows.item(i). But how i can know the count of columns and how to access the columns by index. Actually i need to create a array based on these and store the data into to return to caller.

Any idea mates…

If the data you want is all the data you need from your local storage, you can use the .length() method that returns a promise on your storage in SqLite. That way you get the number of columns depending on how many values are stored.

here is my code sample
public ReadQuery(query: string): Promise {
return new Promise(function (resolve, reject) {

        let retValue: Array<Object>;
        document.addEventListener('deviceready', function () {
            this.sqlite = new SQLite();
            this.sqlite.create({
                name: 'test.db',
                location: 'default'
                //, createFromLocation: 1
            })
                .then((db: SQLiteObject) => {

                    //db.open();
                    retValue = [];
                    db.executeSql(query, {})
                        .then((resultSet) => {
                            resolve(resultSet);
                        })
                        .catch(e => alert(e.message));
                }

                )
                .catch(e => alert(e.message));

        })//end of evenlister


    });

} 

in this case, .length() of what object you are refering…