firestore.DocumentBuilder class

Podpis:

export declare class DocumentBuilder<Path extends string> 

Konstruktorzy

Konstruktor Modyfikatory Opis
(konstruktor)(triggerResource, opcje) Konstruuje nową instancję klasy DocumentBuilder

Metody

metoda Modyfikatory Opis
onCreate(obsługa) Odpowiadaj tylko na utworzone dokumenty.
onDelete(obsługa) Odpowiadaj tylko na usunięcia dokumentów.
onUpdate(program obsługi) Odpowiadaj tylko na aktualizacje dokumentów.
onWrite(obsługa) Odpowiadaj na wszystkie zapisy dokumentów (tworzenie, aktualizowanie lub usuwanie).

firestore.DocumentBuilder.(konstruktor)

Konstruuje nową instancję klasy DocumentBuilder

Podpis:

constructor(triggerResource: () => string, options: DeploymentOptions);

Parametry

Parametr Typ Opis
wyzwalaczZasób () => ciąg
opcje Opcje wdrożenia

firestore.DocumentBuilder.onCreate()

Odpowiadaj tylko na utworzone dokumenty.

Podpis:

onCreate(handler: (snapshot: QueryDocumentSnapshot, context: EventContext<ParamsOf<Path>>) => PromiseLike<any> | any): CloudFunction<QueryDocumentSnapshot>;

Parametry

Parametr Typ Opis
treser (migawka: QueryDocumentSnapshot , kontekst: EventContext <ParamsOf<Path>>) => PromiseLike<dowolny> | każdy

Zwroty:

Funkcja chmury < QueryDocumentSnapshot >

firestore.DocumentBuilder.onDelete()

Odpowiadaj tylko na usunięcia dokumentów.

Podpis:

onDelete(handler: (snapshot: QueryDocumentSnapshot, context: EventContext<ParamsOf<Path>>) => PromiseLike<any> | any): CloudFunction<QueryDocumentSnapshot>;

Parametry

Parametr Typ Opis
treser (migawka: QueryDocumentSnapshot , kontekst: EventContext <ParamsOf<Path>>) => PromiseLike<dowolny> | każdy

Zwroty:

Funkcja chmury < QueryDocumentSnapshot >

firestore.DocumentBuilder.onUpdate()

Odpowiadaj tylko na aktualizacje dokumentów.

Podpis:

onUpdate(handler: (change: Change<QueryDocumentSnapshot>, context: EventContext<ParamsOf<Path>>) => PromiseLike<any> | any): CloudFunction<Change<QueryDocumentSnapshot>>;

Parametry

Parametr Typ Opis
treser (zmiana: zmiana < QueryDocumentSnapshot >, kontekst: EventContext <ParamsOf<Path>>) => PromiseLike<dowolny> | każdy

Zwroty:

Funkcja chmury < Zmień < QueryDocumentSnapshot >>

firestore.DocumentBuilder.onWrite()

Odpowiadaj na wszystkie zapisy dokumentów (tworzenie, aktualizowanie lub usuwanie).

Podpis:

onWrite(handler: (change: Change<DocumentSnapshot>, context: EventContext<ParamsOf<Path>>) => PromiseLike<any> | any): CloudFunction<Change<DocumentSnapshot>>;

Parametry

Parametr Typ Opis
treser (zmiana: zmiana < Migawka dokumentu >, kontekst: EventContext <ParamsOf<Path>>) => PromiseLike<dowolny> | każdy

Zwroty:

Funkcja chmury < Zmień < Migawka dokumentu >>