Menu

#412 command-line version

SQuirreL
closed
General (118)
5
2018-01-23
2010-12-07
Anonymous
No

I don't believe this feature is available and I did not find it in the request list. I was just thinking it could be useful and fairly easy to have a command-line only version of squirrel that would resemble that of mysql for instance with an extra parameter to specify the rdbms. I actually use something like that I created myself, you would enter something like:

squirrel -r myrdbms -h myhost -P myport -u myusername -p mypassword [mydatabase] # the rdbms must be configured properly via the visual way first
> -- prompt from which you can send SQL queries (expected to be valid syntax for the rdbms though)
> -- quit or exit

I don't see any difficulties there, I guess it's just taking request 783059 (http://sourceforge.net/tracker/index.php?func=detail&aid=783059&group_id=28383&atid=393417) a bit further. I'll wait for comments first and then hopefully will try writting a plug-in for it.

Discussion

  • Masoud

    Masoud - 2010-12-22

    I could use this feature too. I'd like to be able to give squirrel to someone and be able to run it from my program (if squirrel is installed on their system) and have squirrel start with that particular database already open.

    I'm coding in java and could compile squirrel separately, but that's a lot of work, and I wouldn't get the updates!

     
  • Nobody/Anonymous

    That looks very helpfull for environments with no GUI

     
  • jfinighan

    jfinighan - 2012-12-20

    This would be invaluable for me. With SQuirreL installed, and aliases already setup, it would be great to be able to run a batch file that:
    Opens SQuirreL
    Attaches to the specified Alias, using a username and password supplied
    Runs SQL contained in a specified text file
    Sends any error messages to a sepcified text file
    Closes SQuirreL

    I am not a SQuirreL developer, but very happy to be testing . . .

     
  • brettmoan

    brettmoan - 2015-10-23

    I'd also be very intrested. Rob, have you done much with this?

     
  • xkb

    xkb - 2017-09-11

    +1

    In heterogeneous environments it would come in extremely handy for Devops (deployment of DDL, DCL, DML scripts)
    ...provided a rich log upon sql instructions submitted could be generated.

     
  • Gerd Wagner

    Gerd Wagner - 2018-01-23

    The latest snapshot 20180121_2226 (as well as future snapshots and versions) contains a Command Line Interface (CLI) for Linux/Unix and Windows. Part of the CLI is based on Java 9's JShell and thus requires Java 9.
    For details have a look at the squirrelcli directory of your installation.

     
  • Gerd Wagner

    Gerd Wagner - 2018-01-23
    • status: open --> closed
    • Group: --> SQuirreL
     

Log in to post a comment.