Skip to content
Back

question about functions.

  • 1
  • Databases
  • Functions
  • Users
jesus
29 Feb, 2024, 12:37

Hi,

I have a function that listen to any create event in another collection then grab the data and add it to another collection

The first collection: POS_ORDERS The second collection: ORDERS_PAYMENT_RECORDS

the function event listen to any create in the POS_ORDERS collection then executes, grabbing the data in the document and creating a payment record in the second Collection (ORDERS_PAYMENT_RECORDS) with read permission to the POS userId and the creator of the document userId only.

My question if 2 POS's creates document in the same time same second, does that cause a problem with the function, like creating only one record or missing something??

TL;DR
Developers want to ensure a function in Dart properly handles simultaneous document creations in different collections to avoid issues like missing records. In this specific case, if two POS users create documents at the exact same time, the function should still create separate records in ORDERS_PAYMENT_RECORDS with the necessary permissions.
jesus
29 Feb, 2024, 12:39

I'm using dart as runtime for the function.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more