Search code examples
operatorslogicbloxlogiql

LogiQL: Use of Transaction ID and Unique Identifiers


I am just getting started with LoqiQL and LogicBlox. While looking at the different operators, I came across the transaction ID and the unique identifiers. What are use cases for these two operators?


Solution

  • These two operators are not very commonly used. Because the identifiers for both the uid p2p and transaction:id are only unique in the lifetime of a database, you can't use them as UUIDs (we'll add that functionality at some point). If you need to export the data and re-import into a different workspace, then you can will get conflicts eventually.

    The transaction identifier can be helpful for debugging issues. For example, in LogiQL you can write a delta rule that records a log of changes to a predicate. Instead of using datetime:now (the resolution might not be sufficient), you can use the transaction id to keep a log of changes per transaction.