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

How to list all tables names #53

Closed
vikashsingh009 opened this issue Nov 13, 2020 · 2 comments
Closed

How to list all tables names #53

vikashsingh009 opened this issue Nov 13, 2020 · 2 comments

Comments

@vikashsingh009
Copy link

Describe the bug
i have issues in listing all tables names from sqlite but it return only 1 tables name
To Reproduce
Steps to reproduce the behavior:

  1. have used Utill sqlite
  2. initiliaze connection
  3. Prepare statement
  4. send select query
    bellow is code i have used
static func getTableInfo(){

do{
let statement :String = "select * from sqlite_master where type='table'"
prepareStatement(mdb?,sql)
}catch{
}
}

static func prepareStatement(mDB: OpaquePointer,statement : String) throws -> OpaquePointer? {
         var statement: OpaquePointer?
         guard sqlite3_prepare_v2(mDB, sql, -1, &statement, nil)
             == SQLITE_OK else {
               var  message = "Error: querySQL prepare failed rc: (returnCodmessage:"
           throw DatabaseHelperError.querySql(message: message)
         }
         return statement
        }
@jepiqueau
Copy link
Collaborator

@vikashsingh009 You have a method getTablesNames in the class UtilsDrop of the iOS plugin

@vikashsingh009
Copy link
Author

@jepiqueau thanks ,works for me

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

2 participants