property<DartType> method Null safety

PropertyQuery<DartType> property<DartType>(
  1. QueryProperty<T, DartType> prop
)

Use the same query conditions but only return a single property (field).

Note: currently doesn't support QueryBuilder.order and always returns results in the order defined by the ID property.

var results = query.property(tInteger).find();

Implementation

PropertyQuery<DartType> property<DartType>(QueryProperty<T, DartType> prop) {
  final result = PropertyQuery<DartType>._(
      C.query_prop(_ptr, prop._model.id.id), prop._model.type);
  reachabilityFence(this);
  if (prop._model.type == OBXPropertyType.String) {
    result._caseSensitive = InternalStoreAccess.queryCS(_store);
  }
  return result;
}