Commit graph

23 commits

Author SHA1 Message Date
Leon Mika aae3c419db Fixed dependencies and CI/CD pipelines
Some checks failed
ci / build (push) Has been cancelled
2025-04-29 20:04:44 +10:00
Leon Mika ceb064a346 Upgraded to Risor 1.4.0 2024-03-03 08:34:41 +11:00
Leon Mika 7ca0cf6982
Converted scripting language Tamarin to Risor (#55)
- Converted Tamarin script language to Risor
- Added a "find" and "merge" method to the result set script type.
- Added the ability to copy the table of results to the pasteboard by pressing C
- Added the -q flag, which will run a query and display the results as a CSV file on the command line
- Upgraded Go to 1.21 in Github actions
- Fix issue with missing limits
- Added the '-where' switch to the mark
- Added the 'marked' function to the query expression.
- Added a sampled time and count on the right-side of the mode line
- Added the 'M' key binding to toggle the marked items
- Started working on tab completion for 'sa' and 'da' commands
- Added count and sample time to the right-side of the mode line
- Added Ctrl+V to the prompt to paste the text of the pasteboard with all whitespace characters trimmed
- Fixed failing unit tests
2023-10-06 15:27:06 +11:00
Leon Mika 733e59ec95
Issue 47: Query expression planner now recognises GSIs (#48)
The query expression planner now recognises GSIs, and will use them if the expression can be executed as a query over an index.
2023-02-17 09:17:22 +11:00
Leon Mika 7caf905c82
Added sub references to the query expression (#46)
These are the `thing[subref]` construct. Subrefs can either be a string or an integer.

At the moment, multiple sub references, such as `thing[1][2][3]` doesn't work. This is because the SDK does not properly handle this when creating the actual expression.
2023-02-16 21:57:40 +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 b51c13dfb1
Issue 32: Fixed some TODOs in query expressions
- Fixed the gaps in conjunctions, disjunctions, and equality operator for expression value evaluation.
- Fixed the issue in which '^=' was treated as two separate tokens, it's now a single token.
2022-10-11 22:16:20 +11:00
Leon Mika f373a3313a
A few bug-fixes and maintenance tasks (#30)
- Fixed a bug which was not properly detecting whether MacOS was in light mode.
- Fixed a bug which was breaking filtering with the table-selection mode.
- Upgraded bubble-tea.
2022-10-04 13:01:53 +11:00
Leon Mika 90ec88d360 issue-10: copy item to clipboard
Added key binding to copy selected, or marked, items to clipboard.
2022-08-20 10:41:32 +10:00
Leon Mika 716adbdce5 Changes made as part of merge 2022-07-14 21:25:27 +10:00
Leon Mika 54fab1b1c3 dynamo-query: started working on queries 2022-06-21 13:37:07 +10:00
Leon Mika 41af399215 A few various changes
- Fixed the '-local' flag to accept host and port
- Added a '-debug' flag to accept a file to write debug log messages
- Added some logic which will force the dark background flag on if MacOS is in dark mode
2022-06-16 22:00:25 +10:00
Leon Mika e5a7b82a63 Prompt user for primary and secondary key for new items 2022-06-09 20:33:19 +10:00
Leon Mika 0b745a6dfa ssm-browse: new utility to browse SSM parameters
This is more of an exercise to work out how best to use controllers
2022-03-29 08:41:27 +11:00
Leon Mika 6ac22aad1f Checkpoint commit
Have got a basic table select model working.  Now will try to setup modal models to support prompts and confirmations
2022-03-27 08:48:34 +11:00
Leon Mika 30dbc4eefe sqs-browse: added notion of workspaces in sqs-browse
Also added a tool to generate test tables
2022-03-24 15:44:57 +11:00
Leon Mika cecdbafabb sqs-browse: started working on put commands 2022-03-24 12:54:32 +11:00
Leon Mika cff059e160 sqs-browse: started working on tests 2022-03-23 22:02:46 +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
Leon Mika 1969504611 sqs-browse: Added dynamo-browse
Added another tool for browsing DynamoDB tables
2022-03-23 11:56:33 +11:00
Leon Mika 5d1f4c78f4 sqs-browse: new tool
Started working on a new tool to poll and browse an SQS queue.  This is built using a TUI framework
2022-03-23 08:58:42 +11:00
Leon Mika e070505490 Implemented the sqs-drain 2022-02-18 15:28:00 +11:00
Leon Mika 4112cfc31f Started working on tool to drain SQS queue 2022-02-18 01:44:12 +00:00