LCQuery

public class LCQuery : NSObject, NSCopying, NSCoding

Query

  • The application this query belong to.

    Declaration

    Swift

    public let application: LCApplication
  • The class name of the object.

    Declaration

    Swift

    public let objectClassName: String
  • The limit on the number of objects to return.

    Declaration

    Swift

    public var limit: Int?
  • The number of objects to skip before returning.

    Declaration

    Swift

    public var skip: Int?
  • The query result whether include ACL.

    Declaration

    Swift

    public var includeACL: Bool?
  • If this property is a non-nil value, query will always use it as where condition, default is nil.

    Declaration

    Swift

    public var whereString: String?
  • The ordered keys.

    Declaration

    Swift

    public var orderedKeys: String?
  • The included keys.

    Declaration

    Swift

    public var includedKeys: Set<String>
  • The selected keys.

    Declaration

    Swift

    public var selectedKeys: Set<String>
  • Initialization.

    Declaration

    Swift

    public init(
        application: LCApplication = .default,
        className: String)

    Parameters

    application

    The application this query belong to, default is LCApplication.default.

    className

    The name of the class which will be queried.

  • Undocumented

    Declaration

    Swift

    public func copy(with zone: NSZone?) -> Any
  • Undocumented

    Declaration

    Swift

    public required init?(coder aDecoder: NSCoder)
  • Undocumented

    Declaration

    Swift

    public func encode(with aCoder: NSCoder)
  • Constraint for key.

    See more

    Declaration

    Swift

    public enum Constraint
  • Add a constraint for key.

    Declaration

    Swift

    public func whereKey(_ key: String, _ constraint: Constraint)

    Parameters

    key

    The key will be constrained.

    constraint

    See Constraint.

  • Add a constraint for key.

    Throws

    LCError

    Declaration

    Swift

    public func `where`(_ key: String, _ constraint: Constraint) throws

    Parameters

    key

    The key will be constrained.

    constraint

    See Constraint.

  • Performs a logical AND operation on an array of one or more expressions of query.

    Throws

    LCError

    Declaration

    Swift

    public class func and(_ queries: [LCQuery]) throws -> LCQuery

    Parameters

    queries

    An array of one or more expressions of query.

    Return Value

    A new LCQuery.

  • Performs a logical AND operation on self and the query.

    Throws

    LCError

    Declaration

    Swift

    public func and(_ query: LCQuery) throws -> LCQuery

    Parameters

    query

    The query.

    Return Value

    A new LCQuery.

  • Performs a logical OR operation on an array of one or more expressions of query.

    Throws

    LCError

    Declaration

    Swift

    public class func or(_ queries: [LCQuery]) throws -> LCQuery

    Parameters

    queries

    An array of one or more expressions of query.

    Return Value

    A new LCQuery.

  • Performs a logical OR operation on self and the query.

    Throws

    LCError

    Declaration

    Swift

    public func or(_ query: LCQuery) throws -> LCQuery

    Parameters

    query

    The query.

    Return Value

    A new LCQuery.

  • The constants used to specify interaction with the cached responses.

    See more

    Declaration

    Swift

    public enum CachePolicy

Find

Get First

Get

Count