@@ -57,8 +57,6 @@ public struct SwiftLanguage: Language {
5757 }
5858
5959 public static func file(
60- imports: [ String ] ,
61- databaseName: String ,
6260 migrations: [ String ] ,
6361 tables: [ GeneratedModel ] ,
6462 queries: [ ( String ? , [ GeneratedQuery ] ) ] ,
@@ -70,7 +68,7 @@ public struct SwiftLanguage: Language {
7068 try ImportDeclSyntax ( " import Foundation " )
7169 try ImportDeclSyntax ( " import Feather " )
7270
73- for `import` in imports {
71+ for `import` in options . imports {
7472 try ImportDeclSyntax ( " import \( raw: `import`) " )
7573 }
7674
@@ -92,7 +90,7 @@ public struct SwiftLanguage: Language {
9290 }
9391 }
9492
95- try StructDeclSyntax ( " struct \( raw: databaseName) : Database " ) {
93+ try StructDeclSyntax ( " struct \( raw: options . databaseName) : Database " ) {
9694 " let connection: any Feather.Connection "
9795
9896 try declaration ( for: migrations, options: options)
@@ -105,7 +103,7 @@ public struct SwiftLanguage: Language {
105103 // This is really only used by the macro since it doesnt have file names
106104 // which really wont happen here but still implement it for completeness.
107105 for query in queries {
108- try declaration ( for: query, databaseName: databaseName, options: options)
106+ try declaration ( for: query, databaseName: options . databaseName, options: options)
109107 }
110108 }
111109 }
0 commit comments