Comments (6)
yep, it would be great.
I was just started over with your wrapper and I'm stuck because I can't see something to get blob columns.
May be I'm gonna write by myself the implementation and pull over here
from squeal.
might it helps.
do you think is better to return NSData or [Bytes]?
public func blobValue(columnName:String) -> Bool? {
if let columnIndex = indexOfColumnNamed(columnName) {
return boolValueAtIndex(columnIndex)
} else {
return nil
}
}
public func blobValueAtIndex(columnIndex:Int) -> NSData? {
if sqliteStatement == nil {
return nil
}
let blobPtr = sqlite3_column_blob(sqliteStatement, Int32(columnIndex))
let blobSize = sqlite3_column_bytes(sqliteStatement, Int32(columnIndex))
let blob = NSData(bytes: blobPtr, length: Int(blobSize))
return blob
}
from squeal.
I would think NSData for now, because most Objective-C libraries use it. But that's a question I asked myself as well.
How have other Swift libraries worked with byte arrays?
from squeal.
nope!
from squeal.
Thanks @progeny ! There was a bit more work needed to support NULL and empty blobs, plus some work to bind BLOBs.
But BLOBs work now, and I hope it helps!
from squeal.
Thank you very much!
Inviato da iPhone
Il giorno 14/set/2014, alle ore 20:56, Christian Niles [email protected] ha scritto:
Thanks @progeny ! There was a bit more work needed to support NULL and empty blobs, plus some work to bind BLOBs.
But BLOBs work now, and I hope it helps!
—
Reply to this email directly or view it on GitHub.
from squeal.
Related Issues (20)
- Missing required module 'sqlite_3_osx HOT 2
- Issue with Xcode 6.3 - Swift 1.2 HOT 1
- Some typos in "README.md"
- "execute" with parameters. HOT 1
- Launch app using Squeal on my device HOT 1
- Can't put Database in another folder as App HOT 3
- Xcode 6.3.1: App using Squeal crashes when run on device, but works in emulator HOT 1
- Failed to Code Sign Squeal-iOS HOT 4
- Swift 2.0 Compatibility HOT 8
- Swift 2 query method equivalent HOT 5
- Documentation Swift 2 HOT 2
- Missing required module 'sqlite3_ios' HOT 1
- Insert or replace
- Cannot compile with whole module optimization
- Creating Database on Disk Issue HOT 1
- Swift3 under Xcode 8 HOT 2
- Swift 3 error: duplicate symbol _SQUEAL_TRANSIENT
- swift-2.3 branch: fails to do archive for generic ios devices
- Any chance of codable support being introduced to the library? HOT 2
- Migration: Table already exists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from squeal.