Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Robert La Ferla
    Solved: I found that the create function on Table has an ifNotExists argument. public func create(_ query: QueryType, temporary: Bool = false, ifNotExists: Bool = false) -> String
    but I don't understand QueryType and what I need to construct and pass in for the query type. Example??
    Robert La Ferla
    Any way to turn on sql statement logging?
    Robert La Ferla
    #if DEBUG
        db.trace { print($0) }
    try true) { t in /* ... */ })
    suhail par
    Hey , i was about to deploy my app on the ipad (iOS v. 9.3.5) which uses SQLite . I am getting bugs like Use of undeclared type 'Connection' . I think SQLite is not working when i run on this device
    The target ios version is 9.0
    it runs on the simulator which is v 9.0
    Evgeniy Kalyada
    Hi! Can you help me? Where I can find examples for encryption database? - deprecated. How I can connect cipher form official web site? Somebody have a examples?
    Evgeniy Kalyada
    SQLCipher does not work on Carthage? How Do I can enable cipher in Carthage?
    Evgeniy Kalyada
    Anybody knows?
    try db.scalar(users.count) returns some garbage, is there a way to turn it into an Int
    never mind Im retarded

    Hi, I'm new to SQLite.swift, but i'm getting this error sometimes2018-04-09 20:58:56.729955+0800 Sudoku[406:17869] [logging] BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode linked while in use: /private/var/mobile/Containers/Data/Application/A3091E4F-37BB-40B2-8384-1FA3339DD032/Documents/mysqldb.sqlite

    2018-04-09 20:58:58.556336+0800 Sudoku[406:17857] [logging] BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use: <unresolvable path>

    Any one could help me on this? thanks
    Hi Can anyone help me how to use connection.interrupt(). I have to break select * from X query after certain timeout time. Its crashing in below method-
    extension FailableIterator {
    public func next() -> Element? {
    return try! failableNext()
    Hi all
    how to integrate sqlite with swift 4 project
    Hello All
    I want to achieve below things in SQLite.swift
    "ATTACH DATABASE \'(mainPath)' AS partial
    INSERT OR REPLACE INTO partial.("google_api_logs") SELECT * FROM main.("google_api_logs")
    Describe the error
    Morning, guys! Anyone here? :)
    Konstantinos N.
    why we cant create table from a class ?
    Giora Vered
    Hi all, this question was probably asked before. Why it is not possible to set more than one primaryKey?
    Hey guys - I have column defined this way "on" BOOLEAN DEFAULT true. I'm seeing a crash on iOS 11.4 when i access the value
    Fatal error: 'try!' expression unexpectedly raised an error: Unexpected null value for column "on": file /SQLite.swift/Sources/SQLite/Typed/Query.swift
    not sure why the column is returning as NULL when the default should be true. Is there a way to check this ?
    Natanel Niazoff
    Hi all. Should I be calling Connection methods like prepare asynchronously together with a callback handler? I've seen others just call the methods synchronously and updating UI.
    I am getting an error with let all = Array(try db.prepare(users)). The error is Cannot invoke 'prepare' with an argument list of type '(Table)'. Is there any pointers for how to fix this?
    Hello everyone, I really need help, I try to create table but I need to do it with a loop, does anyone have an idea (pretty new to dev)
    Jone Wang
    Hi. Does anyone know why second time connect output unsupported file format (code: 1) on ubuntu.Erenow I only select/write data.
    Jone Wang
    Now fix that problem with new Connection before every execute.
    fix it yourself
    Shahar Hadas

    hi, wondering if there's a quick fix or workaround in getting the library working in the latest Xcode via the SPM - as it gives this error when trying to write the code to insert records as : "Ambiguous reference to member '<-'" ... there's an issue on it as well: stephencelis/SQLite.swift#958

    but no updates

    Alexander Kvamme
    Hey guys anyone know a better way to get the first row of a table? let row = try"SELECT photos.ts FROM photos WHERE = '(id)'").compactMap({ $0 })[0]
    can i use codable to update specific values
    Shankar Madeshvaran
    I have model class which conforms to codable and I successfully endcoded the json and stored in local variable and I need to store that values into SQLite
    Shankar Madeshvaran
    It also has array of dictionaries and I need to know to how to store array of dictionaries and how to access them as array of dictionaries
    Hey guys, If I am trying to set a value in my table using this: try <- ""))
    How do I verify that it saved to the actual database? I tried opening my .db file after and it doesn't look like the value updated, but when I read it from the DB in xcode, it reads back the changed value... do i have to somehow save the database with the new changes? Very new to SQLite, so I apologize if that made absolutely no sense
    Shankar Madeshvaran
    I need to access an entire row of the table by filtering distinct column value. Anyone help with the query for this type of filter?
    Hey guys. I have a problem. I copy db.sqlite into the project. I tried to connect and get data from db.sqlite but it is now working on a real device.
    It is worked on a simulator.
    -06-26 00:39:36.760313+0900 Jathena[664:203505] [logging-persist] os_unix.c:43353: (0) open(/private/var/containers/Bundle/Application/34641138-0C18-4BE2-AB73-D3FC5305D5B0/ - Undefined error: 0
    2020-06-26 00:39:36.760340+0900 Jathena[664:203505] [logging-persist] unable to open database file in "SELECT * FROM "ZSUBJECTS""
    The operation couldn’t be completed. (SQLite.Result error 0.)
    2020-06-26 00:40:10.508716+0900 Jathena[664:203505] Can't end BackgroundTask: no background task exists with identifier 1 (0x1), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.