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
2 answers

How to create a Type-Safe custom function in SQLite.swift?

I would like to create a simple distance function to order objects while fetched from a SQLite database in Swift2. I’m using the awesome SQLite.swift framework. With the following I could fetch the nearest objects: db.createFunction("distance") {…
Csaba
  • 104
  • 1
  • 7
1
vote
1 answer

Swift 2 SQLite.swift module reference

Since I have updated to Xcode 7 and swift 2, I'm getting this errors: No type named 'Query' in module 'SQLite' Use of undeclared type 'Database' using this code: let table:SQLite.Query init(db:Database){ table = db["BucketType"] } I'm using…
1
vote
1 answer

Where to place blocks of code

I am attempting to implement the code as displayed in the example. For example, when I place this in the app delegate: import SQLite let db = Database("path/to/db.sqlite3") let users = db["users"] let id = Expression("id") let name =…
Eric LaRue
  • 25
  • 3
1
vote
1 answer

Test Driven Development in Swift

I'm playing around a bit in Swift and after installing some external frameworks I decided that before I go any further with this project I'll write some tests. I first imported my model class into my test class : import XCTest import Company class…
Glenn
  • 2,808
  • 2
  • 24
  • 30
1
vote
1 answer

add json-based data into a sqlite database using swiftyJSON and sqlite.swift

Please bear with me this is my first swift project, I'm not yet up to speed with the syntax/language. I retrieve data from a web service using AlamoFire and parse it using SwiftyJson. Then I want to insert it into a local SQLite database using…
Glenn
  • 2,808
  • 2
  • 24
  • 30
1
vote
0 answers

using SQLite with externial database

i wanted to ask about the ability of using SQLite with SQL' database from my server , so would be able to insert data to my server from my app .. and if not , what is the alternatives for this by swift language ?
MostfaE
  • 11
  • 2
1
vote
1 answer

Sqlite.swift live search

I want to do a live search on the DB. Lets say I want to search by companies and I have the following info on a column named companies. Facebook FastCompany Facebook Google Microsoft I have a textfield that has calls a function on editchanged. …
danielsalare
  • 335
  • 3
  • 14
1
vote
1 answer

SQLite.swift: Use XCGLogger

I'm using SQLite.swift library in my iOS project. Now I'm logging SQLite sentences using db.trace(println) as suggested in the documentation, but I want to use the XCGLogger library with something like log.info(). Somebody knows how to do it?
Alex Bibiano
  • 633
  • 1
  • 6
  • 19
1
vote
0 answers

SQLite.Swift Expression to Int64

I am trying to create a game integrated to game center at the same time stores data to sqlite. I am using sqlite.swift for my sqlite functionalities. I need to submit a score to game center (scoring type-Integer) and that score is stored in my db…
1
vote
0 answers

Speed up UISearchController with threads

I have a Greek dictionary app that searches tens of thousands of word entries from Sqlite to fill a UITableView. I'm encountering many of the same problems outlined here (keyboard lag as search text changes & needing to abort search and rerun if…
empedocle
  • 1,862
  • 1
  • 14
  • 25
1
vote
0 answers

SQLite.swift unknown type name 'NS_ASSUME_NONNULL_BEGIN'

I'm using SQLite.swift. There's an error "Unknown type name 'NS_ASSUME_NONNULL_BEGIN'" when I build the project. What I do: create a demo project 'SqlDemo' under SqlDemo/, create Podfile use_frameworks! source…
suyugo
  • 111
  • 1
  • 6
1
vote
1 answer

iOS Swift: SQLite.swift Error - Header not found

After following the installation instructions here: https://github.com/stephencelis/SQLite.swift i get following error on building the project: unextended-module.modulemap Header not…
Jasper
  • 8,440
  • 31
  • 92
  • 133
1
vote
1 answer

Docs for the latest version of SQLite.swift

After updating Xcode to 6.3 today I finally was able to totally remove sqlite.swift and reinstall it. And after having fixed about 50 errors caused by something changing I am down to about 15 errors remaining and all of them have something to do…
Wayne Fulcher
  • 741
  • 1
  • 11
  • 21
1
vote
1 answer

Cannot Truncate and Drop Tables in SQLite

I have used SQLite.swift plugin to drop tables and truncate the tables, but it does not work in device. The code can be executed by simulator, but not ios devices: for row in db.prepare("SELECT name FROM sqlite_master WHERE type='table'…
Jacky Shek
  • 953
  • 1
  • 11
  • 35
1
vote
3 answers

update method not recognise after Int64 conversion

Since you updated the library to Int64 I can't compile my code anymore. I keep getting problems with update methods like this: let id = Expression("id") let categoryId = Expression("categoryId") let languageId =…
user2496373
  • 105
  • 2
  • 8