XCode 12.5.1
As title, I got an error.
And I use Carthage to install SQLite.swift.
SQLite.swift version is 0.13.0
carfile here:
github "stephencelis/SQLite.swift"
import Foundation
import SQLite
import SQLCipher
let db = try…
I have a query with a column that should be aliased
When I try to alias the column, return nil.
this is my code :
func show() {
let cat_table = Table("cat")
let id = Expression("id")
let cat_text =…
I have a question about sqlite query.
May I use one query string to query my sqlite to get my data?
Now I use three query string and it's like so complex
It only one query string will match and get the user data.
Have any idea to fix it.
var…
So I was able to do a tutorial to create one table but when I try to create another one, it doesn't show up in the DB Browser for SQLite which makes me think that it is not created.
Is there a way to make multiple tables within the same DB…
How do I make my classes comply with the Value Protocol for SQLite.swift so I can add them directly to my database. I have made all of them "Codable" but they need to conform to the Value protocol.
Attempt to conform to Value protocol
These are the…
I am continuing the conversion of a number of my apps from SQLite.sift to GRDB.swift.
I converted my structs to add Codable, FetchableRecord so as to have them work better with GRDB. This was suggested in a reply to my first post on this…
I'm trying to convert several of my apps to use GRDB.swift. Does anybody have or know where I can find a file to get me started? I've read over most of the GRDB docs but I'm not getting it. Below is a sample scenario.
This I was able to convert from…
I am using sqlite.swift
When I include this in my pod file:
pod 'SQLite.swift/SQLCipher', '~> 0.12.2'
Is SQLCipher still compatible with SQLite.swift?
Do I need additional pod statements to import SQLCipher and SQLite or just this one line?
XCode…
I'm attempting to open an SQLite3 database in my SwiftUI code, to access the file path within the bundle, I'm using the following function;
let path = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
…
I have a bulk insert method that attempts to insert an array of items within a transaction. However, I have custom errors I throw based on the values being passed in. For example, strings can not be empty (which is a valid String value for…
I have created a database in one view controller and I would like to open it and access it in another view controller. I was wondering how to open up a existing database from one view controller in another view controller. I intend to open up the…
My question is if there's any performance difference between:
SELECT * FROM mytable
vs
select * from mytable
yes, the whole question is about using reserved words in upper case for better legibility
I want to create database when i access the app for the first time.
As you know, Swift has an AppDelegate.swift class with @UIApplicationMain, and it means main() class.
If i want to create database when i first access the app and not the next…
I have a query similar to the following that I'd like to perform on an sqlite database:
SELECT name
FROM table
WHERE name LIKE "%John%"
ORDER BY (CASE WHEN name = "John" THEN 1 WHEN name LIKE "John%" THEN 2 ELSE 3 END),name LIMIT 10
I'd like to…
I am using stephencelis/SQLite.swift and try to attach 2 databases at runtime:
ATTACH DATABASE \'(databasePath.Local)\' AS LOCAL_USER_DB;
//
// DatabaseWrapper.swift
// ...
//
import UIKit
import SQLite
class DatabaseWrapper {
// MARK: -…