@@ -15,23 +15,23 @@ public struct SwiftLanguage: Language {
1515
1616 public var boolName : String { " Bool " }
1717
18- public var builtinCoders : Set < String > {
18+ public var builtinAdapters : Set < String > {
1919 [
20- " BoolDatabaseValueCoder " ,
21- " Int8DatabaseValueCoder " ,
22- " Int16DatabaseValueCoder " ,
23- " Int32DatabaseValueCoder " ,
24- " Int64DatabaseValueCoder " ,
25- " UInt8DatabaseValueCoder " ,
26- " UInt16DatabaseValueCoder " ,
27- " UInt32DatabaseValueCoder " ,
28- " UInt64DatabaseValueCoder " ,
29- " UIntDatabaseValueCoder " ,
30- " FloatDatabaseValueCoder " ,
31- " Float16DatabaseValueCoder " ,
32- " UUIDDatabaseValueCoder " ,
33- " DecimalDatabaseValueCoder " ,
34- " DateDatabaseValueCoder " ,
20+ " BoolDatabaseValueAdapter " ,
21+ " Int8DatabaseValueAdapter " ,
22+ " Int16DatabaseValueAdapter " ,
23+ " Int32DatabaseValueAdapter " ,
24+ " Int64DatabaseValueAdapter " ,
25+ " UInt8DatabaseValueAdapter " ,
26+ " UInt16DatabaseValueAdapter " ,
27+ " UInt32DatabaseValueAdapter " ,
28+ " UInt64DatabaseValueAdapter " ,
29+ " UIntDatabaseValueAdapter " ,
30+ " FloatDatabaseValueAdapter " ,
31+ " Float16DatabaseValueAdapter " ,
32+ " UUIDDatabaseValueAdapter " ,
33+ " DecimalDatabaseValueAdapter " ,
34+ " DateDatabaseValueAdapter " ,
3535 ]
3636 }
3737
@@ -72,9 +72,9 @@ public struct SwiftLanguage: Language {
7272 migrations: [ String ] ,
7373 tables: [ GeneratedModel ] ,
7474 queries: [ ( String ? , [ GeneratedQuery ] ) ] ,
75- coders : [ String ]
75+ adapters : [ String ]
7676 ) throws -> String {
77- // Note: For now just going to ignore the `coders `
77+ // Note: For now just going to ignore the `adapters `
7878 // Kotlin will need that info which is why it exists.
7979 // Swift having less finegrained namespaces makes it
8080 // so it can just do module level lookups for the type.
@@ -496,10 +496,10 @@ public struct SwiftLanguage: Language {
496496 writer. write ( " row.embedded(at: start + " , index. description, " ) " )
497497 case . optional( . model) :
498498 writer. write ( " row.optionallyEmbedded(at: start + " , index. description, " ) " )
499- case let . encoded( _, _, coder ) :
500- writer. write ( " row.value(at: start + " , index. description, " , using: " , coder , " .self) " )
501- case let . optional( . encoded( _, _, coder ) ) :
502- writer. write ( " row.optionalValue(at: start + " , index. description, " , using: " , coder , " .self) " )
499+ case let . encoded( _, _, adapter ) :
500+ writer. write ( " row.value(at: start + " , index. description, " , using: " , adapter , " .self) " )
501+ case let . optional( . encoded( _, _, adapter ) ) :
502+ writer. write ( " row.optionalValue(at: start + " , index. description, " , using: " , adapter , " .self) " )
503503 default :
504504 fatalError ( " Invalid field type \( field. typeName) \( field. type) " )
505505 }
@@ -639,7 +639,7 @@ public struct SwiftLanguage: Language {
639639
640640 private func bind( binding: GeneratedQuery . Binding ) {
641641 switch binding {
642- case let . value( index, name, owner, coder ) :
642+ case let . value( index, name, owner, adapter ) :
643643 writer. write ( line: " try statement.bind(value: " )
644644
645645 if let owner {
@@ -648,8 +648,8 @@ public struct SwiftLanguage: Language {
648648
649649 writer. write ( name, " , to: " , index. description)
650650
651- if let coder {
652- writer. write ( " , using: " , coder , " .self " )
651+ if let adapter {
652+ writer. write ( " , using: " , adapter , " .self " )
653653 }
654654
655655 writer. write ( " ) " )
0 commit comments