Skip to content

Instantly share code, notes, and snippets.

@ChristianKienle
Created December 25, 2014 11:46
Show Gist options
  • Select an option

  • Save ChristianKienle/2ec32307c127990f5965 to your computer and use it in GitHub Desktop.

Select an option

Save ChristianKienle/2ec32307c127990f5965 to your computer and use it in GitHub Desktop.
import Foundation
public class Statement {}
public protocol Bindable {
func bindTo(statement:Statement, atIndex:Int32) -> Bool
}
public enum UpdateResult {
case Success
}
public class Database {
func executeUpdate<T: Bindable>(query:String, arguments:[T]) -> UpdateResult {
return .Success
}
}
println("Hello, World!")
let db = Database()
db.executeUpdate("Hello", arguments: Array<Bindable>())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment