 			throw DBError.queryFailed
 		}
 		var projects: [Project] = []
+		assert(results.rowCount >= 0)
 		for row in 0..<results.rowCount {
 			let project = Project(id: try Rc2DAO.value(columnName: "id", results: results, row: row),
 								  version: try Rc2DAO.value(columnName: "version", results: results, row: row),

			throw ModelError.dbError
		}
		projects.forEach { wspaceDict[$0.id] = [] }
		for row in 0..<result.rowCount {
			let wspace = try workspace(from: result, row: row)
			wspaceDict[wspace.projectId]!.append(wspace)

			throw DBError.queryFailed
		}
		var wspaces: [Workspace] = []
		assert(results.rowCount >= 0)
		for row in 0..<results.rowCount {
			let wspace = try workspace(from: results, row: row)
			wspaces.append(wspace)
