Sterling does not support transactions currently and I'm not sure if it will in the future - again, the idea is to fill a gap and find a balance between something extremely lightweight for serialization versus a fully relational database with clustered indexes,
atomic transactions, etc.
It's not entirely true that Sterling stores everything in memory. It actually persists all data changes to the disk. It's only the indexes and keys that are stored in memory, and those are persisted with flush. So there is no way currently to rollback a
change. I would suggest deserializing two copies of the target object and make your modifications then null or revert to the original if you want to rollback. I.E.:
var rollbackObj = SterlingDatabase.Load<MyClass>(1);
var modifiedObj = SterlingDatabase.Load<MyClass>(1);
... do stuff ...
OOPS! I need to rollback ...
... or I don't ...
rollbackObj = modifiedObj;