24 ms·
These are async functions - which means they happen after the data is already in the database. They basically act like a producer/consumer pipeline. Triggers h
by Illniyar 9y ago
These are async functions - which means they happen after the data is already in the database. They basically act like a producer/consumer pipeline.
Triggers happen before the data is saved - which lets you change the request (or other data in the db) before it is saved or abort the request.
Without it even trivial operations become hard - such as add a column from other places in the database, incermenting counters/cached aggregates, authorization that isn't role/access based, etc...
- sampl 9y agoAh, gotcha. I think I’ve been getting by with Firebase transactions for counters and db rules for complex authorization. Firebase doesn’t have columns. Can you share a specific use case that’s difficult to accomplish in FB?