# \#sqlite

**URL:** https://forums.swift.org/tag/sqlite/179.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [Passing String and Data sequences to sqlite\_carray\_bind](https://forums.swift.org/t/passing-string-and-data-sequences-to-sqlite-carray-bind/89832)

<div class="topic-metadata">

**Author:** [@prathameshk](https://forums.swift.org/u/prathameshk)\
**Replies:** 3\
**Last updated:** [October 3, 2026, 8:51am UTC](https://forums.swift.org/t/passing-string-and-data-sequences-to-sqlite-carray-bind/89832 "2026-10-03T08:51:34Z")

</div>

I'm trying to work with sqlite\_carray\_bind from the sqlite library. Here is what I have working for binding a sequence of strings: func bind\<S: Sequence\<String\>\>(strings: S, to statement: OpaquePointer?, at index: Int3…

---

## [SwiftQL](https://forums.swift.org/t/swiftql/82441)

<div class="topic-metadata">

**Author:** [@lukevanin](https://forums.swift.org/u/lukevanin)\
**Replies:** 1\
**Last updated:** [October 1, 2025, 3:34am UTC](https://forums.swift.org/t/swiftql/82441 "2025-10-01T03:34:06Z")

</div>

SwiftQL lets you write SQL queries using familiar type-safe Swift syntax: let statement = sql { schema in let person = schema.table(Person.self) Select(person) From(person) Where(person.na…

---

## [SQLiteData 1.0: An alternative to SwiftData with CloudKit sync and sharing](https://forums.swift.org/t/sqlitedata-1-0-an-alternative-to-swiftdata-with-cloudkit-sync-and-sharing/82211)

<div class="topic-metadata">

**Author:** [@stephencelis](https://forums.swift.org/u/stephencelis)\
**Replies:** 5\
**Last updated:** [September 25, 2025, 8:02pm UTC](https://forums.swift.org/t/sqlitedata-1-0-an-alternative-to-swiftdata-with-cloudkit-sync-and-sharing/82211 "2025-09-25T20:02:55Z")

</div>

This week we released SQLiteData 1.0, an alternative to SwiftData that provides familiar tools to build apps with complex persistence and query needs, all powered by SQLite: It allows you to model your data types as c…

---

## [iOS Simulator: App data directory changes on every run (container path stable)](https://forums.swift.org/t/ios-simulator-app-data-directory-changes-on-every-run-container-path-stable/82011)

<div class="topic-metadata">

**Author:** [@solo](https://forums.swift.org/u/solo)\
**Replies:** 1\
**Last updated:** [September 8, 2025, 4:33pm UTC](https://forums.swift.org/t/ios-simulator-app-data-directory-changes-on-every-run-container-path-stable/82011 "2025-09-08T16:33:19Z")

</div>

Normally, I can grab my app’s SQLite database from the Simulator by navigating into the container, then into the app’s Documents directory, and opening it in DB Browser. Up until now, the container path itself has alway…

---

## [SQL-Kit, sqlite and pragma commands](https://forums.swift.org/t/sql-kit-sqlite-and-pragma-commands/71570)

<div class="topic-metadata">

**Author:** [@RussBaz](https://forums.swift.org/u/RussBaz)\
**Replies:** 0\
**Last updated:** [May 2, 2024, 8:33am UTC](https://forums.swift.org/t/sql-kit-sqlite-and-pragma-commands/71570 "2024-05-02T08:33:28Z")

</div>

UPDATE: Scratch this topic because simply restarting fixed the issue. But does anyone know if the SQLite-kit support WAL2? Hi everyone. I am sending a pragma command to the SQLite after booting the server, but when I m…

---

## [No such module 'SQLite3' on Linux?](https://forums.swift.org/t/no-such-module-sqlite3-on-linux/66827)

<div class="topic-metadata">

**Author:** [@calebhailey](https://forums.swift.org/u/calebhailey)\
**Replies:** 7\
**Last updated:** [September 30, 2023, 8:10pm UTC](https://forums.swift.org/t/no-such-module-sqlite3-on-linux/66827 "2023-09-30T20:10:41Z")

</div>

Hi there y'all :wave: this is my first post on these forums, but not my first time visiting. I've been learning Swift over the past 6+ months and spending a lot of time on the swift.org reference docs, Apple's Swift lang…

---

## [How do I run a checkpoint on a core data sqlite file?](https://forums.swift.org/t/how-do-i-run-a-checkpoint-on-a-core-data-sqlite-file/65060)

<div class="topic-metadata">

**Author:** [@Chris](https://forums.swift.org/u/Chris)\
**Replies:** 0\
**Last updated:** [May 18, 2023, 8:44pm UTC](https://forums.swift.org/t/how-do-i-run-a-checkpoint-on-a-core-data-sqlite-file/65060 "2023-05-18T20:44:27Z")

</div>

I have a swift program that reads a series of CSV files into core data. Once that is complete I save the view content to persistent store with moc.save. After this call I would like to be able to run a checkpoint from …

---

## [Database error when testing on device](https://forums.swift.org/t/database-error-when-testing-on-device/62765)

<div class="topic-metadata">

**Author:** [@NovatoSwift](https://forums.swift.org/u/NovatoSwift)\
**Replies:** 21\
**Last updated:** [February 24, 2023, 10:23am UTC](https://forums.swift.org/t/database-error-when-testing-on-device/62765 "2023-02-24T10:23:06Z")

</div>

Hello everyone. I have the following problem. I have an application that queries a database in sqlite. When I run the app in xcode on my mac I give it the path to the database to make it work. So far so good. But when I …

---

## [Sqlite\_exec callback function and double indirection](https://forums.swift.org/t/sqlite-exec-callback-function-and-double-indirection/62838)

<div class="topic-metadata">

**Author:** [@Keith23](https://forums.swift.org/u/Keith23)\
**Replies:** 4\
**Last updated:** [January 28, 2023, 11:47pm UTC](https://forums.swift.org/t/sqlite-exec-callback-function-and-double-indirection/62838 "2023-01-28T23:47:27Z")

</div>

Sqlite\_exec callback function in Swift This is about the sqlite\_exec(…) callback function in Swift and double indirection operators The code presented here shows a test program that passes SQL statements to Sqlite. The…

---

## [How to have SQLite as a dependency for a Swift Package that can used in Swift Playgrounds 4?](https://forums.swift.org/t/how-to-have-sqlite-as-a-dependency-for-a-swift-package-that-can-used-in-swift-playgrounds-4/62298)

<div class="topic-metadata">

**Author:** [@mrtksn](https://forums.swift.org/u/mrtksn)\
**Replies:** 0\
**Last updated:** [December 30, 2022, 11:42am UTC](https://forums.swift.org/t/how-to-have-sqlite-as-a-dependency-for-a-swift-package-that-can-used-in-swift-playgrounds-4/62298 "2022-12-30T11:42:10Z")

</div>

Hi, I have a package which is using SQLite3 but It is using the SQLite C code as dependency. Unfortunately it looks like this is not supported by Swift Playgrounds 4. A bit of search is confirming it: Adding package…

---

## [How to decode a JSON String which uses Integer values as Boolean, alternatively can I force SQLite to use true/false instead of 1/0 as Bool](https://forums.swift.org/t/how-to-decode-a-json-string-which-uses-integer-values-as-boolean-alternatively-can-i-force-sqlite-to-use-true-false-instead-of-1-0-as-bool/60925)

<div class="topic-metadata">

**Author:** [@mrtksn](https://forums.swift.org/u/mrtksn)\
**Replies:** 8\
**Last updated:** [October 20, 2022, 4:22am UTC](https://forums.swift.org/t/how-to-decode-a-json-string-which-uses-integer-values-as-boolean-alternatively-can-i-force-sqlite-to-use-true-false-instead-of-1-0-as-bool/60925 "2022-10-20T04:22:21Z")

</div>

I'm using SQLite with Swift to store some JSON in a table column. I convert a Codable object into a JSON String and store it in the "json" column in my "data" table. id name json 1 item1 {"status" : true} 2 it…

---

## [Dflat v0.4.0](https://forums.swift.org/t/dflat-v0-4-0/52638)

<div class="topic-metadata">

**Author:** [@liuliu](https://forums.swift.org/u/liuliu)\
**Replies:** 0\
**Last updated:** [October 6, 2021, 7:41pm UTC](https://forums.swift.org/t/dflat-v0-4-0/52638 "2021-10-06T19:41:21Z")

</div>

This has been a while in making. See the full release note: Release v0.4.0 · liuliu/dflat · GitHub Highlight: Can generate compatible code with Apollo GraphQL. Thus, a Dflat object can be generated based on GraphQL sc…

---

## [GRDB on MacCatalyst - SQL Select works on iPad not on Mac for same DB](https://forums.swift.org/t/grdb-on-maccatalyst-sql-select-works-on-ipad-not-on-mac-for-same-db/49430)

<div class="topic-metadata">

**Author:** [@Paul-TM](https://forums.swift.org/u/Paul-TM)\
**Replies:** 3\
**Last updated:** [June 10, 2021, 9:03am UTC](https://forums.swift.org/t/grdb-on-maccatalyst-sql-select-works-on-ipad-not-on-mac-for-same-db/49430 "2021-06-10T09:03:26Z")

</div>

Hi, We have ported an iPad app which runs well using GRDB on a SQLCipher database. When we run on a Mac the exact same database (even MD5 checked for binary compatibility) has issues with SQL queries that run fine on i…

---

## [Strings passed to SQLite C API are often incorrect](https://forums.swift.org/t/strings-passed-to-sqlite-c-api-are-often-incorrect/43473)

<div class="topic-metadata">

**Author:** [@JetForMe](https://forums.swift.org/u/JetForMe)\
**Replies:** 6\
**Last updated:** [January 1, 2021, 10:19am UTC](https://forums.swift.org/t/strings-passed-to-sqlite-c-api-are-often-incorrect/43473 "2021-01-01T10:19:23Z")

</div>

I’m baffled by what's going on here. It's 0542 and I'm exhausted, so it’s probably something stupid. I’ve written a super-simple wrapper around SQLite. In it, I have methods to convert UUID to string, and bind it to col…

---

## [How to create columns dynamically based on the codable object in sqlite](https://forums.swift.org/t/how-to-create-columns-dynamically-based-on-the-codable-object-in-sqlite/35000)

<div class="topic-metadata">

**Author:** [@shankarmadeshvaran](https://forums.swift.org/u/shankarmadeshvaran)\
**Replies:** 1\
**Last updated:** [April 1, 2020, 12:41pm UTC](https://forums.swift.org/t/how-to-create-columns-dynamically-based-on-the-codable-object-in-sqlite/35000 "2020-04-01T12:41:29Z")

</div>

Hi. I have to develop a common SQLite related Create, Read, Update, Delete Operation function which is accessed throughout the project. I have used an open source SQLite.swift library to create and connect with the DB. B…

---

## [Beginner Question: iOS/Swift apps database/SQL options?](https://forums.swift.org/t/beginner-question-ios-swift-apps-database-sql-options/30932)

<div class="topic-metadata">

**Author:** [@JamesH](https://forums.swift.org/u/JamesH)\
**Replies:** 2\
**Last updated:** [November 19, 2019, 10:26pm UTC](https://forums.swift.org/t/beginner-question-ios-swift-apps-database-sql-options/30932 "2019-11-19T22:26:24Z")

</div>

Hi all, I'm just starting out learning Swift, so I'm looking to find the best way to use a database in an app that I am looking to develop that needs to store and summarize financial data… I can easily create the databa…

---

## [Detect Changes to a Column](https://forums.swift.org/t/detect-changes-to-a-column/29778)

<div class="topic-metadata">

**Author:** [@mazz](https://forums.swift.org/u/mazz)\
**Replies:** 3\
**Last updated:** [November 5, 2019, 4:59pm UTC](https://forums.swift.org/t/detect-changes-to-a-column/29778 "2019-11-05T16:59:44Z")

</div>

ValueObservation seems to detect changes that would impact fetchAll() but when I change a column attribute, the observer callback from ValueObservation does not fire. For example, I have a MbyCourse with a Bool archived …
