Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Readline for NuoManager

DZone's Guide to

Readline for NuoManager

· Database Zone
Free Resource

Learn how to create flexible schemas in a relational database using SQL for JSON.

You may already be familiar with a tool called rlwrap. If you aren't, you should check it out. It's a nifty tool. On Unix-like systems, it provides readline functionality for commands that lack it. 

Our nuodbmgr is one such command. If you spend any time managing NuoDB domains in an ad-hoc fashion and you're a fan of the command-line, then you can make your life a little easier and save yourself some keystrokes. First, installrlwrap either with your distribution's package manager, or from the source available at the above link. Next, create a file containing a completion word list:

~/.manager-completions
administrator allowNonDurable apply archive capture categories config create database databases dbFile dbname domain echo graceful help host hostname hosts initialize license licenseFile log manage memory monitor name newHost options password pid process processes property quiesce remove restart set show shutdown sm start status summary targetVersion te trace unquiesce unset user value verify version

Feel free to edit this file however you like, for example, by adding your domain or database name to the list. Now, when you invoke the NuoDB Manager, prefix the command with rlwrap:

rlwrap -r -f ~/.manager-completions nuodbmgr --user domain --password mySecret --broker localhost

The -f option will pre-fill the in-memory completion word list with the words in the supplied file. The -r flag will cause any words that appear as input or output during your nuodbmgr session to be added to the in-memory list for use during that session. One caveat to note is that rlwrap is not context sensitive, so it's perfectly happy to suggest localhost as a NuoDB Manager command (which it is not). Happy hacking!

Create flexible schemas using dynamic columns for semi-structured data. Learn how.

Topics:

Published at DZone with permission of Seth Proctor, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}