Read PDF of tech challenge. To run, type go run main.go
Type each command in command line. Hit ENTER after each. Commands are case-insensitive.
See sample screen output. See software tests.
SET [name] [value]
- Sets name in the database to given value. Name and value are case-sensitive strings with no spaces.
GET [name]
- Prints value for given name. If value not in database, prints NULL
DELETE [name]
- Deletes name/value pair from database
COUNT [value]
- Returns number of names with given value assigned to them. If value not assigned anywhere, prints 0
END
- Exits database
?
- Prints list of commands
BEGIN
- Begins new transaction
ROLLBACK
- Rolls back most recent transaction. If no transaction to rollback, prints TRANSACTION NOT FOUND.
COMMIT
- Commits all open transactions. May not ROLLBACK after COMMIT.