Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    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 database.run("SELECT photos.ts FROM photos WHERE photos.id = '(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 db.run(users.update(email <- "alice@me.com"))
    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/Jathena.app/JathenaDB.sqlite-wal) - 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.
    Ravi Bastola
    Hello all, I am a newbie in swift and iOS, how can I implement codable and sqlite in conjunction with each other.
    Clement Tong
    Hello all, just wandering how to implement

    update if exists, create if not.

    I tried implementing it with update, if failed, in the catch, create. However, this method does not work well as it just updates the whole database instead of apppending to it.
    how to store [Int64] in database?
    Hey guys, help me! How to clear a table and return the ID to zero ??
    Hello, can anyone help me to find out how to write a swift migration file for sqlite?
    Hello, i'm currently having an issue with sqlit3, which is being used by flutter, inside a swift application
    I'm getting the error [logging] BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use: ....../Cache.db
    anybody here know how to fix it?
    Alex Nguyen
    do you guys know how to open a prepopulated database file from document picker? (I'm opening a mbtiles file - a kind of sqlite map database)
    Tony Kara
    Hello everyone, i am using stephencelis/SQLite.swift, i tried modifying my tables and got this error, "[logging] table users has no column named city in "INSERT INTO "users" ("name", "email", "city", "age") VALUES (?, ?, ?, ?)"
    The operation couldn’t be completed. (SQLite.Result error 0.)". Please note that this was working with three values before and i added a new value which is city after which i started getting this error. my table column is below.
    if (!UserDefaults.standard.bool(forKey: "is_db_created")) {
                // if not, then create the table
                try db.run(users.create { (t) in
                    t.column(id, primaryKey: true)
                    t.column(email, unique: true)
                // set the value to true, so it will not attempt to create the table again
                UserDefaults.standard.set(true, forKey: "is_db_created")
    shahzad jafar
    Hi, can please provide me an example for using commitHook and implementation of callback. Thanks in advance.
    Feridun Takis
    i cant find information about collation on tables.