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 {
178178 }
179179 return self [ index]
180180 }
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+ }
181188}
182189
183190extension PostgresRandomAccessRow {
@@ -286,8 +293,8 @@ extension PostgresRow {
286293
287294 @available ( * , deprecated, message: """
288295 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()`)
291298 """ )
292299 public func column( _ column: String ) -> PostgresData ? {
293300 guard let index = self . lookupTable [ column] else {
You can’t perform that action at this time.
0 commit comments