11//
22// Language.swift
3- // Feather
3+ // Otter
44//
55// Created by Wes Wickwire on 4/28/25.
66//
@@ -66,7 +66,7 @@ extension Language {
6666 queries: [ ( String ? , [ GeneratedQuery ] ) ]
6767 ) {
6868 let tables = Dictionary ( schema. tables. map { ( $0. key. name, model ( for: $0. value) ) } , uniquingKeysWith: { $1 } )
69- let queries = queries. map { ( $0. map { " \( $0) Queries " } , $1. map { query ( for: $0, tables: tables) } ) }
69+ let queries = queries. map { ( $0. map { " \( $0) Queries " } , $1. map { query ( for: $0, tables: tables) } ) }
7070 return ( Array ( tables. values) , queries)
7171 }
7272
@@ -85,9 +85,9 @@ extension Language {
8585 // question marks for any input.
8686 let sql = statement. sourceSegments. map { segment in
8787 switch segment {
88- case . text( let text) :
88+ case let . text( text) :
8989 return text. description
90- case . rowParam( let param) :
90+ case let . rowParam( param) :
9191 return interpolatedQuestionMarks (
9292 for: statement. parameters. count > 1 ? param. name : " input "
9393 )
@@ -185,7 +185,8 @@ extension Language {
185185 // Output can be mapped to a table struct
186186 if statement. resultColumns. chunks. count == 1 ,
187187 let tableName = firstResultColumns. table,
188- let table = tables [ tableName] {
188+ let table = tables [ tableName]
189+ {
189190 return . model( table)
190191 }
191192
@@ -302,16 +303,16 @@ public enum BuiltinOrGenerated: CustomStringConvertible {
302303
303304 public var description : String {
304305 switch self {
305- case . builtin( let builtin, let isArray, _) :
306+ case let . builtin( builtin, isArray, _) :
306307 isArray ? " [ \( builtin) ] " : builtin
307- case . model( let model) :
308+ case let . model( model) :
308309 model. name
309310 }
310311 }
311312
312313 public func namespaced( to namespace: String ) -> String {
313314 switch self {
314- case . model( let model) where !model. isTable: " \( namespace) . \( self ) "
315+ case let . model( model) where !model. isTable: " \( namespace) . \( self ) "
315316 default : description
316317 }
317318 }
0 commit comments