@@ -19,115 +19,115 @@ public protocol DatabasePrimitive: RowDecodable {
1919 var sqlAny : SQLAny ? { get }
2020
2121 /// Initialize from the row at the column `index`
22- init ( from cursor: OpaquePointer , at index: Int32 ) throws ( PureSQLError )
22+ init ( from cursor: OpaquePointer , at index: Int32 ) throws ( SQLError )
2323
2424 /// Initializes self using the `adapter`
2525 init < Adapter: DatabaseValueAdapter > (
2626 value: Adapter . Value ,
2727 into adapter: Adapter
28- ) throws ( PureSQLError )
28+ ) throws ( SQLError )
2929
3030 /// Bind self to the statement at the given parameter index
31- func bind( to statement: OpaquePointer , at index: Int32 ) throws ( PureSQLError )
31+ func bind( to statement: OpaquePointer , at index: Int32 ) throws ( SQLError )
3232
3333 /// Decode self using the `adapter`
3434 func decode< Adapter: DatabaseValueAdapter > (
3535 from adapter: Adapter
36- ) throws ( PureSQLError ) -> Adapter . Value
36+ ) throws ( SQLError ) -> Adapter . Value
3737}
3838
3939public extension DatabasePrimitive {
40- init ( row: borrowing Row , startingAt start: Int32 ) throws ( PureSQLError ) {
40+ init ( row: borrowing Row , startingAt start: Int32 ) throws ( SQLError ) {
4141 self = try row. value ( at: start)
4242 }
4343}
4444
4545extension String : DatabasePrimitive {
46- @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
46+ @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
4747 guard let ptr = sqlite3_column_text ( cursor, index) else {
48- throw PureSQLError . columnIsNil ( index)
48+ throw SQLError . columnIsNil ( index)
4949 }
5050
5151 self = String ( cString: ptr)
5252 }
5353
54- @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
54+ @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
5555 sqlite3_bind_text ( statement, index, self , - 1 , SQLITE_TRANSIENT)
5656 }
5757
5858 @inlinable public init < Adapter: DatabaseValueAdapter > (
5959 value: Adapter . Value ,
6060 into adapter: Adapter
61- ) throws ( PureSQLError ) {
61+ ) throws ( SQLError ) {
6262 self = try adapter. encodeToString ( value: value)
6363 }
6464
6565 @inlinable public func decode< Adapter: DatabaseValueAdapter > (
6666 from adapter: Adapter
67- ) throws ( PureSQLError ) -> Adapter . Value {
67+ ) throws ( SQLError ) -> Adapter . Value {
6868 try adapter. decode ( from: self )
6969 }
7070
7171 @inlinable public var sqlAny : SQLAny ? { . string( self ) }
7272}
7373
7474extension Int : DatabasePrimitive {
75- @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
75+ @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
7676 self = Int ( sqlite3_column_int64 ( cursor, index) )
7777 }
7878
79- @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
79+ @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
8080 sqlite3_bind_int ( statement, index, Int32 ( self ) )
8181 }
8282
8383 @inlinable public init < Adapter: DatabaseValueAdapter > (
8484 value: Adapter . Value ,
8585 into adapter: Adapter
86- ) throws ( PureSQLError ) {
86+ ) throws ( SQLError ) {
8787 self = try adapter. encodeToInt ( value: value)
8888 }
8989
9090 @inlinable public func decode< Adapter: DatabaseValueAdapter > (
9191 from adapter: Adapter
92- ) throws ( PureSQLError ) -> Adapter . Value {
92+ ) throws ( SQLError ) -> Adapter . Value {
9393 try adapter. decode ( from: self )
9494 }
9595
9696 @inlinable public var sqlAny : SQLAny ? { . int( self ) }
9797}
9898
9999extension Double : DatabasePrimitive {
100- @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
100+ @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
101101 self = sqlite3_column_double ( cursor, index)
102102 }
103103
104- @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
104+ @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
105105 sqlite3_bind_double ( statement, index, self )
106106 }
107107
108108 @inlinable public init < Adapter: DatabaseValueAdapter > (
109109 value: Adapter . Value ,
110110 into adapter: Adapter
111- ) throws ( PureSQLError ) {
111+ ) throws ( SQLError ) {
112112 self = try adapter. encodeToDouble ( value: value)
113113 }
114114
115115 @inlinable public func decode< Adapter: DatabaseValueAdapter > (
116116 from adapter: Adapter
117- ) throws ( PureSQLError ) -> Adapter . Value {
117+ ) throws ( SQLError ) -> Adapter . Value {
118118 try adapter. decode ( from: self )
119119 }
120120
121121 @inlinable public var sqlAny : SQLAny ? { . double( self ) }
122122}
123123
124124extension Data : DatabasePrimitive {
125- @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
125+ @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
126126 let count = Int ( sqlite3_column_bytes ( cursor, index) )
127127 self = Data ( bytes: sqlite3_column_blob ( cursor, index) , count: count)
128128 }
129129
130- @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
130+ @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
131131 _ = withUnsafeBytes {
132132 sqlite3_bind_blob ( statement, index, $0. baseAddress, CInt ( $0. count) , SQLITE_TRANSIENT)
133133 }
@@ -136,29 +136,29 @@ extension Data: DatabasePrimitive {
136136 @inlinable public init < Adapter: DatabaseValueAdapter > (
137137 value: Adapter . Value ,
138138 into adapter: Adapter
139- ) throws ( PureSQLError ) {
139+ ) throws ( SQLError ) {
140140 self = try adapter. encodeToData ( value: value)
141141 }
142142
143143 @inlinable public func decode< Adapter: DatabaseValueAdapter > (
144144 from adapter: Adapter
145- ) throws ( PureSQLError ) -> Adapter . Value {
145+ ) throws ( SQLError ) -> Adapter . Value {
146146 try adapter. decode ( from: self )
147147 }
148148
149149 @inlinable public var sqlAny : SQLAny ? { . data( self ) }
150150}
151151
152152extension Optional : DatabasePrimitive where Wrapped: DatabasePrimitive {
153- @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
153+ @inlinable public init ( from cursor: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
154154 if sqlite3_column_type ( cursor, index) == SQLITE_NULL {
155155 self = nil
156156 } else {
157157 self = try Wrapped ( from: cursor, at: index)
158158 }
159159 }
160160
161- @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( PureSQLError ) {
161+ @inlinable public func bind( to statement: OpaquePointer , at index: Int32 ) throws ( SQLError ) {
162162 if let value = self {
163163 try value. bind ( to: statement, at: index)
164164 } else {
@@ -169,13 +169,13 @@ extension Optional: DatabasePrimitive where Wrapped: DatabasePrimitive {
169169 @inlinable public init < Adapter: DatabaseValueAdapter > (
170170 value: Adapter . Value ,
171171 into adapter: Adapter
172- ) throws ( PureSQLError ) {
172+ ) throws ( SQLError ) {
173173 self = try . some( Wrapped ( value: value, into: adapter) )
174174 }
175175
176176 @inlinable public func decode< Adapter: DatabaseValueAdapter > (
177177 from adapter: Adapter
178- ) throws ( PureSQLError ) -> Adapter . Value {
178+ ) throws ( SQLError ) -> Adapter . Value {
179179 guard let value = self else {
180180 assertionFailure ( " Upstream did not perform nil check " )
181181 throw . unexpectedNil
0 commit comments