You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you very much for your fantastic library.. it helps me a lot.
Right now I am developing an app that was made using phonegap and now I have the work to migrate the app to Swift 3.
The app has this "migrationStore" where before launching the app it gathers all the information that was on the local database and uses it to generate a new CoreData model database..
Until now was working just fine.
This was the init process and an example of a method (previously working fine):
private init(){
if PHONEGAP_MIGRATION {
db = SQLiteDB.sharedInstance("file__0.localstorage")
// db = SQLiteDB.openRO(path: "file__0.localstorage")
}
}
public func getLocalStorageUrl() -> String{
if PHONEGAP_MIGRATION {
var url = [SQLRow]()
url = db!.query("SELECT value FROM itemtable WHERE key = ?", parameters: [URL_FIELD])
for v in url{
if let value = v["value"]{
return value.asString().stringByReplacingOccurrencesOfString("\"", withString: "", options: NSStringCompareOptions.LiteralSearch, range: nil).stringByReplacingOccurrencesOfString("\0", withString: "", options: NSStringCompareOptions.LiteralSearch, range: nil)
}
}
return NTXConfiguration.sharedInstance.serverUrl
return ""
}
I am having problems to use the init() method using swift 3
How can I open a database using a file name (string)?
Thank you so much
Regards
The text was updated successfully, but these errors were encountered:
I am not sure if this is a question that can be answered via a GitHub issue - especially since this is not really an issue with SQLiteDB :) You might want to e-mail me about this. But basically, if you want to specify a specific table name, look at the DB_NAME variable. Also note that now there is no SQLRow class since that was removed sometime back - you just get a dictionary back as the results of the query.
You might also want to take a look at the sample code since that works with the new changes and that should give you an idea as to how the usage works.
If you still have questions, please e-mail me since doing this via GitHub is not going to work well :)
Hello Fahim!,
First of all thank you very much for your fantastic library.. it helps me a lot.
Right now I am developing an app that was made using phonegap and now I have the work to migrate the app to Swift 3.
The app has this "migrationStore" where before launching the app it gathers all the information that was on the local database and uses it to generate a new CoreData model database..
Until now was working just fine.
This was the init process and an example of a method (previously working fine):
I am having problems to use the init() method using swift 3
How can I open a database using a file name (string)?
Thank you so much
Regards
The text was updated successfully, but these errors were encountered: