Skip to content

Commit 8a9559b

Browse files
committed
fix: finalize @p naming migration in MSSQLConnection
1 parent 94347f3 commit 8a9559b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/CosmoMSSQL/MSSQLConnection.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,15 +563,15 @@ public final class MSSQLConnection: SQLDatabase, AdvancedSQLDatabase, @unchecked
563563
try await execute(sql, binds)
564564
}
565565

566-
/// Replace `?` positional placeholders with `@param1`, `@param2`, ... (SQL Server sp_executesql style).
567-
/// If the SQL already uses `@p` or `@param` style, it is returned unchanged.
566+
/// Replace `?` positional placeholders with `@p1`, `@p2`, ... (SQL Server sp_executesql style).
567+
/// If the SQL already uses `@p` or `@p` style, it is returned unchanged.
568568
static func convertPlaceholders(_ sql: String) -> String {
569569
guard sql.contains("?") else { return sql }
570570
var result = ""
571571
var index = 1
572572
for ch in sql {
573573
if ch == "?" {
574-
result += "@param\(index)"
574+
result += "@p\(index)"
575575
index += 1
576576
} else {
577577
result.append(ch)

0 commit comments

Comments
 (0)