File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ public struct SwiftLanguage: Language {
336336 }
337337 }
338338 }
339- writer. write ( line: " ) " )
339+ writer. write ( line: " ) { " )
340340
341341 writer. indent ( )
342342
Original file line number Diff line number Diff line change @@ -88,6 +88,25 @@ public struct Row: ~Copyable {
8888 return try Value ( row: self , optionallyAt: column)
8989 }
9090
91+ /// Decodes the struct embeeded at the start index as the `Value` type.
92+ @inlinable public func embedded< Value: RowDecodableWithAdapters > (
93+ at column: Int32 ,
94+ as _: Value . Type = Value . self,
95+ adapters: Value . Adapters
96+ ) throws ( OtterError) -> Value {
97+ return try Value ( row: self , startingAt: column, adapters: adapters)
98+ }
99+
100+ /// Decodes the struct embeeded at the start index as the `Value` type
101+ /// if it exists
102+ @inlinable public func optionallyEmbedded< Value: RowDecodableWithAdapters > (
103+ at column: Int32 ,
104+ as _: Value . Type = Value . self,
105+ adapters: Value . Adapters
106+ ) throws ( OtterError) -> Value ? {
107+ return try Value ( row: self , optionallyAt: column, adapters: adapters)
108+ }
109+
91110 /// Whether or not the column has a non null table at the column index
92111 @inlinable public func hasValue( at column: Int32 ) -> Bool {
93112 sqlite3_column_type ( sqliteStatement, column) != SQLITE_NULL
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ extension Adapters {
9898 public var uint : UIntDatabaseValueAdapter { UIntDatabaseValueAdapter ( ) }
9999 public var float : FloatDatabaseValueAdapter { FloatDatabaseValueAdapter ( ) }
100100 @available ( macOS 11 . 0 , * )
101+ @available ( iOS 14 . 0 , * )
101102 public var float16 : Float16DatabaseValueAdapter { Float16DatabaseValueAdapter ( ) }
102103 public var uuid : UUIDDatabaseValueAdapter { UUIDDatabaseValueAdapter ( ) }
103104 public var decimal : DecimalDatabaseValueAdapter { DecimalDatabaseValueAdapter ( ) }
You can’t perform that action at this time.
0 commit comments