A simple key/value DB implementation in python / Learning exercise with persistence and write-ahead-logging.
SET <name> <value>- Set the variable name to the value value. Neither variable names nor values can contain spaces.
GET <name> - Get current value for a variable. Note that the context of the value for the variable is dependent on the transaction scope.
BEGIN - Start a transaction that will only be written to the database if issued the COMMIT command. Variables within a transaction will shadow their corresponding variables in the parent scope. In the case of an exit or crash, every command that is issued within a BEGIN clause will be persisted to the pending.txt file to be replayed if wanted. Successive transactions are indented to better display the depth.
COMMIT-Save the currently set variables to database. Note that when issuing this command, it will commit the values of the last transaction currently in.
ROLLBACK - Discard current transaction and rollback to previously defined values in the parent transaction.
- only accepts
inttype for values - no concurrency
- limited command set
- lots of other stuffs
- All commands persisted to a simple
.sdbfile - All commands issued within a transaction persisted to
pending.txt- Simple write-ahead logging implementation
- Prompts user to re-load any pending transactions on program crash










