mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Statement arguments are generally non optional
This commit is contained in:
1 parent
f018c7f823
commit
aa6f55d72f
17 files changed
+95
-130
No files matched your search
@@ -49,10 +49,9 @@ public struct SQLExpressionLiteral : SQLExpression {
|
||||
/// SQLExpressionLiteral("1 + 2")
|
||||
/// SQLExpressionLiteral("? + ?", arguments: [1, 2])
|
||||
/// SQLExpressionLiteral(":one + :two", arguments: ["one": 1, "two": 2])
|
||||
public init(_ sql: String, arguments: StatementArguments? = nil) {
|
||||
// TODO: make arguments non optional
|
||||
public init(_ sql: String, arguments: StatementArguments = StatementArguments()) {
|
||||
// TODO: force sql parameter name: fetchCursor(db, sql:...)
|
||||
self.init(SQLLiteral(sql: sql, arguments: arguments ?? .init()))
|
||||
self.init(SQLLiteral(sql: sql, arguments: arguments))
|
||||
}
|
||||
|
||||
/// [**Experimental**](http://github.com/groue/GRDB.swift#what-are-experimental-features)
|
||||
|
||||
Reference in new issue
Block a user