Initializer

init(node:forRecordTypes:attribute:matchType:queryValues:returnAttributes:maximumResults:)

Creates a query object with provided parameters.

Declaration

init(node inNode: ODNode!, forRecordTypes inRecordTypeOrList: Any!, attribute inAttribute: String!, matchType inMatchType: ODMatchType, queryValues inQueryValueOrList: Any!, returnAttributes inReturnAttributeOrList: Any!, maximumResults inMaximumResults: Int) throws

Parameters

inNode

The node to query.

inRecordTypeOrList

The type or types of record to query. Can be an NSString object for a single type or an NSArray object containing NSString objects for multiple types.

inAttribute

The name of the attribute to query.

inMatchType

The type of query.

inQueryValueOrList

The value or values to query in the attribute. Can be an NSString object or an NSData object for a single value, or an NSArray containing NSString and NSData objects for multiple values.

inReturnAttributeOrList

The attribute or attributes to be returned from the query. Can be an NSString object for a single attribute or an NSArray object containing NSString objects for multiple attributes. Passing nil is equivalent to passing kODAttributeTypeStandardOnly.

inMaximumResults

The maximum number of values to return.

outError

An error reference for error details. Can be nil.

Return Value

The initialized query.

Discussion