Comments (8)
Hi Christian,
This appears to be more than can be accomplished with casual edits. I'm hopeful you can rally the internal inertia to push this through the Xcode 7 compiler. Let me know if I can in anyway assist.
from squeal.
Sure. I'd expected to make much bigger Swift 2.0 changes, but perhaps I can get something that compiles out soon and then slowly update the project later.
from squeal.
Hi Christian,
Might toi mâle an initial release thaïs week-end?
Brian
Sent from my iPhone
On Jun 17, 2015, at 9:36 PM, Christian Niles [email protected] wrote:
Sure. I'd expected to make much bigger Swift 2.0 changes, but perhaps I can get something that compiles out soon and then slowly update the project later.
—
Reply to this email directly or view it on GitHub.
from squeal.
Working on it now. Hope to also include Carthage support and remove the module map.
from squeal.
There is now a Swift 2-compatible version in the swift2 branch.
As of today it doesn't support many of the new features of swift 2. For example, throwing errors.
I'll add those soon, but the current commit should more or less work with existing codebases.
from squeal.
Thank you,
Will give it a try and get back to you.
Brian
On Jun 27, 2015, at 7:50 PM, Christian Niles [email protected] wrote:
There is now a Swift 2-compatible version in the swift2 branch.
As of today it doesn't support many of the new features of swift 2. For example, throwing errors.
I'll add those soon, but the current commit should more or less work with existing codebases.
—
Reply to this email directly or view it on GitHub.
from squeal.
Hi,
I can't make query with Swift 2.0 branch:
let statement = try database.prepareSelectFrom(database.name, columns: nil, whereExpr: "\(COLUMN_MAC) = ?", groupBy: nil, having: nil, orderBy: nil, limit: nil, offset: nil, parameters: ["\(mac)"])
for row in database.selectFrom(dbName, statement) ) { ..}
What would be the proper way of making a query in Swift 2.0 branch?
Thank you!
from squeal.
@ulusoyca The for-loop style was removed because it made error handling awkward.
Instead, use a while loop:
let statement = try database.prepareSelectFrom("people", whereExpr: "email = ?", parameters: [email])
while try statement.next() {
let personId = statement.int64Value('id')
// ...
}
There's also a helper method that takes a block, and returns an array or whatever you want:
// returns a [String]
let results = try database.selectFrom("people", columns:["email"]) { $0.stringValueAtIndex(0) ?? "" }
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 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.