Skip to content

Commit ab91f20

Browse files
author
Michele Longhi
committed
Documentation on objectClass property and init method
1 parent 31414ba commit ab91f20

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Diff for: CloudBoost/CloudSearch.swift

+17-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,27 @@ public class CloudSearch {
1717
var from: Int?
1818
var size: Int?
1919
var sort = [AnyObject]()
20-
public var objectClass: CloudObject.Type = CloudObject.self
2120

2221
var searchFilter: SearchFilter?
2322
var searchQuery: SearchQuery?
2423

24+
///
25+
/// CloudObject subclass to be used to construct objects fetched with the `.search` method
26+
/// Usage:
27+
/// 1. Declare your own CloudObject subclass
28+
/// 2. Initialize a CloudSearch passing your subclass type as a parameter or set the objectClass property
29+
/// 3. Call the .search method
30+
///
31+
public var objectClass: CloudObject.Type = CloudObject.self
32+
33+
/// Instantiate a new QuerySearch object
34+
///
35+
/// - parameters:
36+
/// - tableName: Name of the table on the backend
37+
/// - searchQuery: An SearchQuery object for the criteria of the search (optional)
38+
/// - searchFiler: An SearchFilter object with the filtering options of the search (optional)
39+
/// - objectClass: The type of object to be returned (must be a subclass of CloudObject); is optional and if omitted will be created CloudObject instances
40+
///
2541
public init(tableName: String,
2642
searchQuery: SearchQuery? = nil,
2743
searchFilter: SearchFilter? = nil,

0 commit comments

Comments
 (0)