FirstQueryBehaviour
FirstQueryBehaviour<
TResult,TFallback> = {behaviour:"error"; } | {behaviour:"undefined"; } | {behaviour:"fallback";fallback: () =>TResult|TFallback; }
Defined in: packages/@livestore/common/dist/schema/state/sqlite/query-builder/api.d.ts:156
Type Parameters
Section titled “Type Parameters”TResult
Section titled “TResult”TResult
TFallback
Section titled “TFallback”TFallback
Type Declaration
Section titled “Type Declaration”{ behaviour: "error"; }
behaviour
Section titled “behaviour”behaviour:
"error"
Will error if no matching row was found
{ behaviour: "undefined"; }
behaviour
Section titled “behaviour”behaviour:
"undefined"
Will return undefined if no matching row was found
{ behaviour: "fallback"; fallback: () => TResult | TFallback; }
behaviour
Section titled “behaviour”behaviour:
"fallback"
Will return a fallback value if no matching row was found
fallback()
Section titled “fallback()”fallback: () =>
TResult|TFallback
Returns
Section titled “Returns”TResult | TFallback