Skip to content

martinkruusement/limitless-qldb-client-sublime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

THE MISSING QLDB Client for Sublime Text

Warning

  • For dev/test environment use only.
  • It allows you to run ANY currently selected text as an actual database query.
  • Against your current authenticated AWS profile
  • [ WITHOUT CONFIRMATION ]
  1. Select command.
  2. Run it.
  3. Results show up in a side panel.

img

Prerequisites:

  • QLDB Shell
brew tap aws/tap # Add AWS as a Homebrew tap
brew install qldbshell
  • Valid AWS Credentials (this plugin doesn't provide a way to log in to AWS, it assumes you're already authenticated with a valid profile and sufficient permissions.)

Sample ion.conf in project root:

sample 
{
  default_ledger: "DEVORTESTLEDGERNAME",
  region: "region-name-1",
  ui: {
    auto_commit: true,
    prompt: "⚛$LEDGER⚛$REGION⚛$ACTIVE_TRANSACTION ",
    format: "table",
    edit_mode: "Vi",
    display_welcome: false,
    display_ctrl_signals: false,
    display_query_metrics: false,
    terminator_required: false  
  }
}

Installation instructions:

  • This plugin has no safeguards to protect you from damaging your database if you accidentally run the wrong query.
  • If you know what you're doing, you also already know how to install it.



Quantum Ledger Blockchain
Crypto Database admin workflow

...with DJ Controllers?

Warning

  • It will try to run whatever active selection as a real query.
  • WITHOUT CONFIRMATION!
  • Seriously. Do not drop your prod tables.

Map this command to a MIDI controller:

"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" --command execute_qldb_query

img

screenshot from BetterTouchTool

You can map another button to bring up your common-queries.sql file with frequently needed commands so you don't have to manually type them in and accidentally drop your tables again.

And set a filter for BetterTouchTool to only allow triggering this shortcut if ST has your project actively open in the foreground with the cursor in the that file.

TODOS:

  • Actually respect ion.config values, currently you'll need them hardcoded in plugin.py
  • Support for multiple selections - running multiple queries does work but only if it's a single continuous selection.
  • Migrate to immudb before AWS kills off QLDB in a few months 🤷‍♂️

About

Run AWS Quantum Ledger queries from Sublime Text 4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages