1.0.1 • Published 1 month ago

@rbxts/transact v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

🤝 Transaction 🤝

Transaction will allow you to conduct secure transactions using Transact, Rollback methods.

Example

A code snippet showing how to set up and use Transaction.

class TestEntity implements ITransactEntity {
	public Init() {
		print("Init");
	}
	
	public async Transact() {
		print("Manipulating the data");
		print("Data saving");
	}

	public async Rollback() {
		print("Here you can roll back the data to its original state");
	}

	public End() {
		print("End");
	}
}

const transaction = new Transaction([new TestEntity(), new TestEntity()]);
const transact = transaction.Transact().expect();
print(transact.StatusCodes);
1.0.1

1 month ago

1.0.0

1 month ago