I want to create SELECT statement:
SELECT substr(fileNameWithSuffix, 1, length(fileNameWithSuffix) - length(suffix))
AS fileName FROM someTable
However SQLite.swift seems to only allow fixed length parameter in substring.
Declaration of substring…
I try to use the SQLite.swift Lib, but I'm getting an error during an INSERT:
Error Domain=SQLite.Result Code=0 "(null)"
I've setup a Database class (DBContact is a simple struct):
import SQLite
class SQLiteDatabase {
var db : Connection;
let…
When my iOS app starts, I want to connect to a local SQLite database using SQLite.swift and then show the user a list of items that are stored in the database. Making the database connection can throw. If connecting fails then I want to show the…
I'm developping an iOS application which use an SQLite database and I use the SQLite.swift library (https://github.com/stephencelis/SQLite.swift).
I'm trying to migrate my application in Swift 3, so I changed my library to use the branch…
I followed the SQLite.Swift manual installation process exactly (https://github.com/stephencelis/SQLite.swift), but a red warning appears at "import SQLite".
OSX (10.11.6)
XCode 7.3.1
Question
Do I need to create and include a header file?
Reference…
So SQLite.swift is quite awesome. I have it tracing my SQL queries using:
db.trace { SQL in
print(SQL)
}
It works fine. However, I'd like to add SQL execution time as well on the output.
Any ideas how to do that?
I am using Swift SQLite. I want to retrieve 'flights' in groups switch their 'departureDate'
if let flightQuery = self.flightQuery, let dataBase = self.db {
let flightGroupByDepartureDate = flightQuery.group(self.departureDate)
…
I'm using Stephen Celis iOS lib for handling SQLite3 databases, here is the github link.
Taking the example on the git :
try db.transaction {
let rowid = try db.run(users.insert(email <- "betty@icloud.com"))
try db.run(users.insert(email <-…
I manually installed the SQLite.swift library in my project, following the instructions in the documentation. But there the library will only be linked. It's running fine in the emulator and I am able to upload it to iTunes connect. When I want to…
Is there a way to join tables from more than two SQLite databases with SQLite.Swift? The documentation only has examples from the same database.
Note to the duplicate gurus: This is not about how to join tables in SQlite from different databases.…
I am using 5 SQLite.swift tables in my code. The first table is used to store location data :
DataModel:
typealias Location = (
latitude: Double,
longitude: Double,
timestamp: String,
speed: Double,
direction:…
Just installed SQLite.swift from cocoapods in my Xcode project and I get an error when trying to build stating Header "/usr/include/sqlite3.h" not found. Therefore I get an error stating could not build Objective-C module 'SQLite3'.
Am I just doing…
I had the previous question here about database location.
What different between store database in different locations in iOS?
I'm confused in copying pre-seeded database to the writable location.
Now, every time I run and build my app, the in-use…
I have downloaded SQLite.swift and get this error:
Playground execution failed: /var/folders/43/nc3kf6y17dbfdn14crfmcdjh0000gn/T/./lldb/2060/playground2.swift:1:8: error: no such module 'SQLite'
import SQLite
I also note that SQLite.swift has a…
This method was working while I was using Swift 1.2. But now, I had to update to Xcode and I had to switch my language to Swift 2. This is the method from swift 1.2 which I used well ;
static func findById(idToFind : Int64) -> T? {
let query =…