Relate given transaction to affected documents

Is there a way to relate a given transaction to documents affected by said transaction (e.g. by transaction ID)?

Hey @stef you can use CURRENT_TIMESTAMP within a transaction, which will exactly match the system time of that transaction, e.g. see XTDB Play

You can then use that system timestamp to join across as many tables as needed to find all affected documents (rows) based on the xt$system_from column. You can enumerate the tables using INFORMATION_SCHEMA, e.g. SELECT * FROM INFORMATION_SCHEMA.TABLES

1 Like

Thanks!

Figured the transaction timestamp might be one way.

1 Like