mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
SE-0242: Synthesize default values for the memberwise initializer
...and more initializers cleanup
This commit is contained in:
1 parent
7614f36bbd
commit
19061934ce
9 files changed
+11
-76
No files matched your search
@@ -3,30 +3,14 @@
|
||||
/// See SQLQueryGenerator for actual SQL generation.
|
||||
struct SQLQuery {
|
||||
var relation: SQLRelation
|
||||
var isDistinct: Bool
|
||||
var expectsSingleResult: Bool
|
||||
var isDistinct: Bool = false
|
||||
var expectsSingleResult: Bool = false
|
||||
var groupPromise: DatabasePromise<[SQLExpression]>?
|
||||
// Having clause is an array of expressions that we'll join with
|
||||
// the AND operator. This gives nicer output in generated SQL:
|
||||
// `(a AND b AND c)` instead of `((a AND b) AND c)`.
|
||||
var havingExpressions: [SQLExpression]
|
||||
var havingExpressions: [SQLExpression] = []
|
||||
var limit: SQLLimit?
|
||||
|
||||
init(
|
||||
relation: SQLRelation,
|
||||
isDistinct: Bool = false,
|
||||
expectsSingleResult: Bool = false,
|
||||
groupPromise: DatabasePromise<[SQLExpression]>? = nil,
|
||||
havingExpressions: [SQLExpression] = [],
|
||||
limit: SQLLimit? = nil)
|
||||
{
|
||||
self.relation = relation
|
||||
self.isDistinct = isDistinct
|
||||
self.expectsSingleResult = expectsSingleResult
|
||||
self.groupPromise = groupPromise
|
||||
self.havingExpressions = havingExpressions
|
||||
self.limit = limit
|
||||
}
|
||||
}
|
||||
|
||||
extension SQLQuery: KeyPathRefining {
|
||||
|
||||
Reference in new issue
Block a user