property<PQ extends PropertyQuery> method

PQ property <PQ extends PropertyQuery>(
  1. QueryProperty qp
)

Creates a property query for the given property qp.

Uses the same conditions as this query, but results only include the values of the given property. To obtain results cast the returned PropertyQuery to a specific type.

var q = query.property(tInteger) as IntegerPropertyQuery;
var results = q.find()

Alternatively call a type-specific function.

var q = query.integerProperty(tInteger);

Implementation

PQ property<PQ extends PropertyQuery>(QueryProperty qp) {
  if (OBXPropertyType.Bool <= qp._type && qp._type <= OBXPropertyType.Long) {
    return IntegerPropertyQuery(_cQuery, qp._propertyId, qp._type) as PQ;
  } else if (OBXPropertyType.Float == qp._type ||
      qp._type == OBXPropertyType.Double) {
    return DoublePropertyQuery(_cQuery, qp._propertyId, qp._type) as PQ;
  } else if (OBXPropertyType.String == qp._type) {
    return StringPropertyQuery(_cQuery, qp._propertyId, qp._type) as PQ;
  } else {
    throw Exception(
        'Property query: unsupported type (OBXPropertyType: ${qp._type})');
  }
}