mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
splittingRowAdapters(columnCounts:), ScopeAdapter(nestedScopes:), RowConvertible?(leftJoinedRow:), TableMapping.numberOfSelectedColumns(_:), support for nested codable records
This commit is contained in:
1 parent
3bdfdaa40a
commit
288144f347
10 files changed
+603
-162
No files matched your search
@@ -74,6 +74,16 @@ extension AllColumns : SQLSelectable {
|
||||
allColumns.qualifier = qualifier
|
||||
return allColumns
|
||||
}
|
||||
|
||||
/// [**Experimental**](http://github.com/groue/GRDB.swift#what-are-experimental-features)
|
||||
///
|
||||
/// :nodoc:
|
||||
public func columnCount(_ db: Database) throws -> Int {
|
||||
guard let qualifier = qualifier else {
|
||||
fatalError("Can't compute number of columns without a qualifier")
|
||||
}
|
||||
return try db.columnCount(in: qualifier.tableName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,4 +113,8 @@ struct SQLAliasedExpression : SQLSelectable {
|
||||
func qualified(by qualifier: SQLTableQualifier) -> SQLAliasedExpression {
|
||||
return SQLAliasedExpression(expression.qualified(by: qualifier), alias: alias)
|
||||
}
|
||||
|
||||
func columnCount(_ db: Database) throws -> Int {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user