File tree Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ func withBlob(block: Blob -> ()) {
154154 let length = 1
155155 let buflen = Int ( length) + 1
156156 let buffer = UnsafeMutablePointer < ( ) > . alloc ( buflen)
157- memcpy ( buffer, " 4 " , UInt ( length) )
157+ memcpy ( buffer, " 4 " , length)
158158 block ( Blob ( bytes: buffer, length: length) )
159159 buffer. dealloc ( buflen)
160160}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import Foundation
2727/// A connection (handle) to a SQLite database.
2828public final class Database {
2929
30- internal var handle = COpaquePointer . null ( )
30+ internal var handle : COpaquePointer = nil
3131
3232 /// Whether or not the database was opened in a read-only state.
3333 public var readonly : Bool { return sqlite3_db_readonly ( handle, nil ) == 1 }
Original file line number Diff line number Diff line change @@ -173,6 +173,10 @@ public extension Database {
173173
174174}
175175
176- private func asValue< A: Value > ( value: Binding ? ) -> A {
176+ private func asValue< A: Value > ( value: Binding ) -> A {
177177 return A . fromDatatypeValue ( value as! A . Datatype ) as! A
178178}
179+
180+ private func asValue< A: Value > ( value: Binding ? ) -> A {
181+ return asValue ( value!)
182+ }
Original file line number Diff line number Diff line change @@ -768,7 +768,7 @@ public struct Row {
768768 }
769769 public func get< V: Value > ( column: Expression < V ? > ) -> V ? {
770770 func valueAtIndex( idx: Int ) -> V ? {
771- if let value = values [ idx] as? V . Datatype { return ( V . fromDatatypeValue ( value) as! V ) }
771+ if let value = self . values [ idx] as? V . Datatype { return ( V . fromDatatypeValue ( value) as! V ) }
772772 return nil
773773 }
774774
@@ -821,8 +821,7 @@ public struct QueryGenerator: GeneratorType {
821821 private lazy var columnNames : [ String : Int ] = {
822822 var ( columnNames, idx) = ( [ String: Int] ( ) , 0 )
823823 column: for each in self . query. columns ?? [ Expression < ( ) > ( literal: " * " ) ] {
824- // FIXME: rdar://19769314 // split(each.expression.SQL) { $0 == "." }
825- let pair = split ( each . expression. SQL, { $0 == " . " } )
824+ let pair = split ( each . expression. SQL) { $0 == " . " }
826825 let ( tableName, column) = ( pair. count > 1 ? pair. first : nil , pair. last!)
827826
828827 func expandGlob( namespace: Bool ) -> Query -> ( ) {
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ internal let SQLITE_TRANSIENT = sqlite3_destructor_type(COpaquePointer(bitPatter
2828/// A single SQL statement.
2929public final class Statement {
3030
31- private var handle = COpaquePointer . null ( )
31+ private var handle : COpaquePointer = nil
3232
3333 private let database : Database
3434
You can’t perform that action at this time.
0 commit comments