I've been using SQLite.swift lately to build my app database.
And I'm defining all my INTEGER columns with a Int64 type, like the documentation explains.
But every once in a while I need that Int64 to be just Int.
So my question is, if I do…
Project builds fine in Xcode 8.2.1, but in 8.3b2 the pod SQLite.swift produces >18 issues like:
Swift Compiler Error
Build a shadowed submodule 'Darwin.POSIX.basic'
module.modulemap
Errors appear to relate to redefinition of basic types such…
Regarding the magnificent and amazing SQLite.swift, I'm wondering
You have an app in the app store, v7. There's an upgrade to v8. User X does upgrade v7 to v8 using the app store.
Say in v8, we have slightly changed one of the sql tables, perhaps…
This is only question I've asked (so far) that doesn't need much/any explanation.
I had got as far as this with solving it:
each class might have an initialiseTable() kind of like function which would be called when the DB schema is…
i'm using Sqlite.swift
when i restart app in simulator, i want to remove existing database and make new database. (because of initializing database... i change the database column a lot.)
but there is warning message.
[logging] BUG IN CLIENT OF…
The SQLite.swift documentation says about executing arbitrary SQL:
let stmt = try db.prepare("SELECT id, email FROM users")
for row in stmt {
for (index, name) in stmt.columnNames.enumerate() {
print ("\(name)=\(row[index]!)")
//…
I want to update the column of a row if the row already exists, but if it doesn't exist yet then I want to insert a new row.
Related questions
This type of question is popular for SQL in general
UPDATE if exists else INSERT in SQL Server…
I'm trying to do a bulk insert with SQLite Swift. However, I'm not 100% sure if my code is correct.
The Swift code I've settled on (because it delivered the best performance timewise) is:
do {
try DB.transaction { () -> Void in
for index in…
I am retrieving all the values of column formname to a titleLabel in a cell of a tableview, but unfortunately I am facing these two errors
Call can throw, but it is not marked with 'try' and the error is not handled
and this
Call can throw, but…
I have a table with three columns.
_id (primary key) word (unique) frequency
In SQLite.swift I create the table like this
try db.run( userDictionary.create(ifNotExists: true) {t in
t.column(wordId, primaryKey: true)
t.column(word,…
I'm trying to use SQLite.swift's Codable functionality to insert a row, but am getting the following error message:
Swift.EncodingError.Context(codingPath: [], debugDescription: "Top-level
MyEnum encoded as number JSON fragment.", underlyingError:…
For debugging purposes I am trying to get a simple list of the column names in my SQLite table. I am using the SQLite.swift framework.
My question is more specific than How to get a list of column names on sqlite3 / iPhone? so I am creating a new…
I am manually adding the SQLite.swift subproject to my project. As the directions indicated, I copied the .xcodeproj file to my project. This allows me see all the source files (unlike this SO question).
Everything seemed like it was working fine.…