Giter VIP home page Giter VIP logo

Comments (8)

appsird avatar appsird commented on September 22, 2024

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.

nerdyc avatar nerdyc commented on September 22, 2024

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.

appsird avatar appsird commented on September 22, 2024

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.

nerdyc avatar nerdyc commented on September 22, 2024

Working on it now. Hope to also include Carthage support and remove the module map.

from squeal.

nerdyc avatar nerdyc commented on September 22, 2024

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.

appsird avatar appsird commented on September 22, 2024

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.

ulusoyca avatar ulusoyca commented on September 22, 2024

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.

nerdyc avatar nerdyc commented on September 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.