File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,13 @@ extension PostgresRandomAccessRow: RandomAccessCollection {
178
178
}
179
179
return self [ index]
180
180
}
181
+
182
+ /// Checks if the row contains a cell for the given column name.
183
+ /// - Parameter column: The column name to check against
184
+ /// - Returns: `true` if the row contains this column, `false` if it does not.
185
+ public func contains( _ column: String ) -> Bool {
186
+ self . lookupTable [ column] != nil
187
+ }
181
188
}
182
189
183
190
extension PostgresRandomAccessRow {
@@ -286,8 +293,8 @@ extension PostgresRow {
286
293
287
294
@available ( * , deprecated, message: """
288
295
This call is O(n) where n is the number of cells in the row. For random access to cells
289
- in a row create a PostgresRandomAccessCollection from the row first and use its subscript
290
- methods.
296
+ in a row create a PostgresRandomAccessRow from the row first and use its subscript
297
+ methods. (see `makeRandomAccess()`)
291
298
""" )
292
299
public func column( _ column: String ) -> PostgresData ? {
293
300
guard let index = self . lookupTable [ column] else {
You can’t perform that action at this time.
0 commit comments