Rxdb React

Types

Types

DBProviderProps

DBProvider props - must provide either config OR db, not both

type DBProviderProps = { children: ReactNode; onError?: (error: Error) => void; fallback?: ReactNode; } & ({ config: RxDBConfig; db?: never; } | { db: RxDatabase; config?: never; })

CancelablePromise

Second variable in array is a function that can be invoked to cancel the promise.

type CancelablePromise = [Promise<T>, () => void]

RxDatabaseBaseExtended

type RxDatabaseBaseExtended = RxDatabaseBase<Internals, Options, import("/Users/sthornock/code/epic/epic-flowstate/node_modules/rxdb/dist/types/index").CollectionsOfDatabase, unknown> & { newCollections$?: Subject<CollectionRecord>; }

Override

type Override = Omit<T, keyof R> & R

QueryConstructor

type QueryConstructor = (collection: RxCollection<T>) => AnyRxQuery<T> | undefined

ResultMap

type ResultMap = Map<string, any>

AnyQueryResult

type AnyQueryResult = DeepReadonly<T>[] | RxDocument<T>[]

RxQueryResult

type RxQueryResult = { result: AnyQueryResult<T>; isFetching: boolean; isExhausted: boolean; pageCount: number; currentPage: number | undefined; fetchPage: (page: number) => void; fetchMore: () => void; resetList: () => void; }

RxQueryResultJSON

type RxQueryResultJSON = Omit<RxQueryResult<T>, "result"> & { result: DeepReadonly<T>[]; }

RxQueryResultDoc

type RxQueryResultDoc = Omit<RxQueryResult<T>, "result"> & { result: RxDocument<T>[]; }

PaginationMode

Traditional: Results are split into pages, starts by rendering the first page and total pageCount is returned, allowing for requesting results of any specific page. Requires pageSize to be defined

Infinite: First page of results is rendered, allowing for gradually requesting more. Requires pageSize to be defined

type PaginationMode = "Traditional" | "Infinite"

ObservableReturningQuery

type ObservableReturningQuery = RxQuery<T, Map<string, any>, {}, unknown> | RxQuery<T, RxDocument<T> | null, {}, unknown> | RxQuery<T, RxDocument<T>[], {}, unknown>

AnyRxQuery

type AnyRxQuery = RxQuery<T, Map<string, any>, {}, unknown> | RxQuery<T, RxDocument<T> | null, {}, unknown> | RxQuery<T, RxDocument<T>[], {}, unknown>
Previous
Interfaces