Commit graph

9 commits

Author SHA1 Message Date
Leon Mika 54a120342e
Added command history (#45)
* Added command line history to the command, query and filter prompts.
* Added query planning debugging to the log.
* Fixed bug in query expression which was not treating true and false as boolean literals.
* Fixed a bug in the query planning logic which was incorrectly determine that an expression of the form sort_key ^= "string", with no partition key, could be executed as a query instead of a scan.
2023-01-26 21:46:31 +11:00
Leon Mika c89b09447c
Initial version of scripting (#40)
* scripting: added service and controller for scripting

* scripting: have got prompts working

Scripts are now running in a separate go-routine.  When a prompt is encountered, the
script is paused and the user is prompted for input.  This means that the script no
longer needs to worry about synchronisation issues.

* scripting: started working on the session methods

* scripting: added methods to get items and attributes

* scripting: have got loading of scripts working

These act more like plugins and allow defining new commands.

* scripting: have got script scheduling working

Scripts are now executed on a dedicated goroutine and only one script can run at any one time.

* scripting: added session.set_result_set(rs)

* scripting: upgraded tamarin to 0.14

* scripting: started working on set_value

* tamarin: replaced ad-hoc path with query expressions

* scripting: changed value() and set_value() to attr() and set_attr()

Also added 'delete_attr()'

* scripting: added os.exec()

This method is controlled by permissions which govern whether shellouts are allowed
Also fixed a resizing bug with the status window which was not properly handling status messages with newlines

* scripting: added the session.current_item() method

* scripting: added placeholders to query expressions

* scripting: added support for setting and deleteing items with placeholders

Also refactored the dot AST type so that it support placeholders.  Placeholders are not yet supported
for subrefs yet, they need to be identifiers.

* scripting: made setting the result-set push the current result-set to the backstack

* scripting: started working on byte encoding of attribute values

* scripting: finished attrcodec

* scripting: integrated codec into expression

* scripting: added equals and hashcode to queryexpr

This finally finishes the work required to store queries in the backstack

* scripting: fixed some bugs with the back-stack

* scripting: upgraded Tamarin

* scripting: removed some commented out code
2023-01-10 22:27:13 +11:00
Leon Mika 93ec519127
Issue 24: Added read-only mode (#27)
- Added settings to workspace, and added the read-only mode
- Added the `-ro` field which will launch Dynamo-Browse in read-only mode
- Added the `set ro` to enable read-only mode, and `set rw` to enable read-write mode
2022-09-29 22:10:18 +10:00
Leon Mika 5b6bf1f0ae ctrlret: replaced return types of controllers from tea.Cmd to tea.Msg
This dramatically cuts downs the number of closures.
2022-08-18 21:39:13 +10:00
Leon Mika 809f9adfea Added mode line
Also rescanning will maintain the current query
2022-06-22 11:57:12 +10:00
Leon Mika aa828df3ae Most of the new models have been reimplemented 2022-03-27 23:19:38 +00:00
Leon Mika 5a69e6c954 sqs-browse: remove assumption regarding table keys
Table keys are now retrieved from describe
2022-03-25 08:17:52 +11:00
Leon Mika 43680000a8 sqs-browse: started working on tests for controllers 2022-03-24 08:49:09 +11:00
Leon Mika 7526c095ee sqs-browse: a lot of work to try to keep UI complexity down
Added the notion of controllers and a dispatcher which will queue up operations
2022-03-23 15:40:31 +11:00