find method

  1. @override
List<double> find (
  1. {double replaceNullWith}
)
override

Returns values of this property matching the query.

Results are in no particular order. Excludes null values. Set replaceNullWith to return null values as that value.

Implementation

@override
List<double> find({double replaceNullWith}) {
  switch (_type) {
    case OBXPropertyType.Float:
      final valueIfNull = replaceNullWith != null
          ? (allocate<Float>()..value = replaceNullWith)
          : Pointer<Float>.fromAddress(0);
      return _unpack32(_curryWithDefault<OBX_float_array, Float>(
          bindings.obx_query_prop_find_floats, valueIfNull, 'find float32'));
    case OBXPropertyType.Double:
      final valueIfNull = replaceNullWith != null
          ? (allocate<Double>()..value = replaceNullWith)
          : Pointer<Double>.fromAddress(0);
      return _unpack64(_curryWithDefault<OBX_double_array, Double>(
          bindings.obx_query_prop_find_doubles, valueIfNull, 'find float64'));
    default:
      throw Exception(
          'Property query: unsupported type (OBXPropertyType: ${_type})');
  }
}