MentDB Weak Smart Earth Tool
Weak AI, Interoperability and Software Development
Transaction
Whenever you run MQL commands, you are in a micro transaction.
If one of your orders returns an error, all your micro transaction is rollbacked.
The storage system is ACID.
commit
Description
To commit the current transaction
admin
word create duck en;<br>commit;<br>word create rabbit en;<br>exception (1) ("here a rollback ...");
mentdb
1: here a rollback ...
admin
node show W[duck]
mentdb
{<br> "fl": {<br> "en": {<br> "ltl": "TH[77]",<br> "ftl": "TH[77]"<br> }<br> },<br> "w": 1,<br> "k": "W[duck]"<br>}
admin
node show W[rabbit]
mentdb
Sorry, the node 'W[rabbit]' does not exist.
rollback
Description
To rollback the current transaction
admin
word create wolf en;<br>commit;<br>word create panda en;<br>rollback;
mentdb
Rollback done.
admin
node show W[wolf]
mentdb
{<br> "fl": {<br> "en": {<br> "ltl": "TH[78]",<br> "ftl": "TH[78]"<br> }<br> },<br> "w": 1,<br> "k": "W[wolf]"<br>}
admin
node show W[panda]
mentdb
Sorry, the node 'W[panda]' does not exist.
transaction logs <limit>
Description
To show the log block list to replay
Parameters
limit: The limit value - integer >= 0 - required
admin
word create hippo en;<br>env set var "[transaction_logs]" (transaction logs 10;);<br>[transaction_logs]
mentdb
[<br> "1\tTO_OVERWRITE_COUNTER_INDEX\tIndexFileId:651\tCounter:4",<br> "2\tTO_SET_OLD_INDEX_BLOCK\tIndexFileId:651\tIndexPosition:104\tDataFileId:-1\tDataPosition:-1",<br> "3\tTO_DELETE_BLOCK\tDataFileId:0\tPosition:1589248",<br> "4\tTO_REWRITE_UNUSED\tDataFileId:0\tPosition:1589248",<br> "5\tTO_DELETE_BLOCK\tDataFileId:0\tPosition:1589504",<br> "6\tTO_REWRITE_UNUSED\tDataFileId:0\tPosition:1589504",<br> "7\tTO_OVERWRITE_COUNTER_INDEX\tIndexFileId:651\tCounter:5",<br> "8\tTO_SET_OLD_INDEX_BLOCK\tIndexFileId:651\tIndexPosition:104\tDataFileId:0\tDataPosition:1589504",<br> "9\tTO_DELETE_UNUSED\tDataFileId:0\tUnusedLength:8",<br> "10\tTO_REWRITE_BLOCK\tDataFileId:0\tPosition:1589504\tNextPosition:-1\tData:W1siV1toaXBwb10iLDAsMTU4OTI0OF1d \tSize:32"<br>]
auto commit set <bool>
Description
To set the auto commit mode
Parameters
bool: The boolean (true|false) - boolean - required
admin
auto commit set false;
mentdb
1
auto commit
Description
To get the auto commit mode