-
Notifications
You must be signed in to change notification settings - Fork 150
FAQs
-
How do I create a blank SQLite database?
You can use something like the SQLite Manager extension for Firefox. Or, you can use any of the commonly available SQLite front end tools such as:
-
Do you plan to add support for SQLite's bind API methods?
No. Currently, there are no plans to add support for the bind methods since you can easily create an SQL statement with variables by simply creating a String with the appropriate variable values inserted where necessary. For example:
let name = "John" let sql = "SELECT * FROM clients WHERE name='\(name)'"
-
But what about strings with single quotes in them, like
John's Name
? How can you insert them viaSQLiteDB
without using the bind API calls?That's what the
esc
method inSQLiteDB
is for :) That method returns a quoted and escaped string - so you don't have to even enclose the resulting string in quotes like in the above example. Here's an example:let db = SQLiteDB.sharedInstance() let name = db.esc("John's Name") let sql = "SELECT * FROM clients WHERE name=\(name)"
-
Can you explain the Swift functionality/code that you've used in SQLiteDB?
I released SQLiteDB so that it can be of use to others who are facing the same issues in interfacing with SQLite databases using Swift. But unfortunately, I do not have the time to explain Swift functionality to you. Please go through the relevant Apple documentation such as this.
-
Nothing's working after the latest Xcode 6 beta! What do I do?
Since Swift is still heavily under development by Apple, things will change and this can result in things breaking. I will be fixing SQLiteDB to comply with the latest Apple changes as soon as I can. So first check if I've actually pushed in some changes since the last time first :)
If I haven't fixed the issues yet, please be patient. I'll fix them as soon as I can.