Questions tagged [sqlite.swift]

A third-party, type-safe, Swift-language layer over SQLite.

A third-party, type-safe, Swift-language layer over SQLite.

Related tags:

,

References:

252 questions
1
vote
1 answer

How to use 'SQLite' (the wrapper on github) in a Command Line Tool?

I'm successfully using the great Swift wrapper for sqlite from https://github.com/stephencelis/SQLite.swift in a Cocoa application. But when I try to use the wrapper in a Command Line Tool project and follow the same detailed installation steps I…
Klaas
  • 22,394
  • 11
  • 96
  • 107
0
votes
0 answers

In SQLIte POD, DB operation main/background thread

could someone confirm that in SQLite POD https://github.com/stephencelis/SQLite.swift, DB operation used main thread or background thread. If it is used main thread then kindly provide the solution how can I use background thread for the same My app…
0
votes
0 answers

@import error while building sqlite.swift in Xcode

I am new to iOS development. I am working on developing an app which saves data into a sqlite.swift db and I have added the SQLite framework to the targets and linked the required libraries as per the manual installation process of…
0
votes
0 answers

SwiftUI - Update Array of objects in parent view model (Binding Issue) - Code works until you switch Tabs

I need some help with this question please. I am using SQLite.swift to store data in DB, I would like to fetch data only once when the application starts as it's a heavy operation. I need to be able to update / delete items from the user fields…
Wael
  • 489
  • 6
  • 19
0
votes
0 answers

The operation couldn’t be completed. (SQLite.Result error 0.)

I am running into sporadic issues in production with SQLite.Swift where calls return the following SQLite.Result: "The operation couldn’t be completed. (SQLite.Result error 0.)". A quick web search shows that others have been encountering that…
pleasereset
  • 210
  • 2
  • 9
0
votes
0 answers

Joining a Virtual Table (FTS) and a regular Table takes a lot of time to execute using sqlite.swift

I'm trying to join query between my Cars regular Table and my Makers Virtual Table for FTS This is the makers Virtual Table let markersTable = VirtualTable("makers") let idColumn = Expression("id") let name = Expression("name") let…
FelipeOliveira
  • 759
  • 8
  • 21
0
votes
0 answers

Cannot convert value of type 'Table' to expected argument type 'String'

I'm suddenly getting two errors here with SQLite.swift that don't seem to make any sense given the circumstances. I had the same way of doing things working just now but now it's saying it expects a String argument? Nothing here takes a String…
Alper
  • 3,424
  • 4
  • 39
  • 45
0
votes
1 answer

Why do I get SQLite.swift error when inserting Int64 values?

As part of a migration effort, I am creating a SQLite DB for the first time. Based on the example documentation from the site SQLite.swift documentation I am creating an Insert statement and then running it to insert the record. I get the following…
Mozahler
  • 4,958
  • 6
  • 36
  • 56
0
votes
2 answers

Querying data from multiple tables into a custom struct in SQLite.swift

I have a database that has the tables "Orders" and "OrderDetails" and a custom struct Order that I want to query data from these tables into. I understand how to query data from a singular table in SQLite.swift from am confused on how to query from…
JonGrimes20
  • 115
  • 9
0
votes
1 answer

Establishing a Read-Write connection to a database in SQLite.swift

I'm working a project where I need to use a SQLite database to read, create , and edit different objects. I thought I had established the connection properly but, it turns out I had only established a read only connection. How do I modify this code…
JonGrimes20
  • 115
  • 9
0
votes
1 answer

Why doesn't Xcode / SQLite.swift recognize my .db file as a database?

I'm using SQLite.swift to run queries on a .db file in my Xcode project, and I keep receiving "code: 26 -- file is not a database" when I try to connect to the database from the documents folder on the device. When I use the file path to the .db…
0
votes
2 answers

When testing a Swift/SwiftUI app on iPad, Xcode doesn't transfer SQLite database

I'm new to all this, but I've managed to finish coding my first simple Swift/SwiftUI App. It includes a SQlite DB that I've pre-populated with my data, and I manage it using SQLite.swift. The app is working fine using the iPad simulator in XCode. I…
randombits
  • 21
  • 3
0
votes
1 answer

Where to store a SQLite DB connection with iOS?

I create a SQLite connection with SQLite.swift but I'm not sure where to store the DB connection so I can use it during the duration that a user has the app open across various views. Is using UserDefaults here an appropriate case? Or…
Paul
  • 1,101
  • 1
  • 11
  • 20
0
votes
1 answer

Cannot create sqlite file with SQLite.swift "cannot open file at line..."

I'm attempting to create a sqlite DB file within my iOS project. I'm using the code as documented for R/W let path = NSSearchPathForDirectoriesInDomains( .documentDirectory, .userDomainMask, true ).first! let db = try…
Paul
  • 1,101
  • 1
  • 11
  • 20
0
votes
2 answers

SQLite.Swift - Querying an existing Db table

I am just now learning about SQLite.swift and was reading the documentation on it. I am trying to query an existing table that I already have but do not know how to do this. In the documentation it shows how to Query a table that is created (shown…
NBera
  • 329
  • 1
  • 3
  • 13