You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mikhail Stepura (JIRA)" <ji...@apache.org> on 2014/05/11 00:13:52 UTC

[jira] [Updated] (CASSANDRA-7172) cqlsh: Accept and execute CQL statement(s) from command-line parameter

     [ https://issues.apache.org/jira/browse/CASSANDRA-7172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Stepura updated CASSANDRA-7172:
---------------------------------------

    Attachment: CASSANDRA-2.0-7172.patch

Patch to accept a statement via "-e"

> cqlsh: Accept and execute CQL statement(s) from command-line parameter
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-7172
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7172
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>            Reporter: PJ
>            Assignee: Mikhail Stepura
>            Priority: Trivial
>              Labels: cqlsh
>             Fix For: 2.0.9, 2.1 rc1
>
>         Attachments: CASSANDRA-2.0-7172.patch
>
>
> I don't know if there is a workaround for this, but currently, if I want to dump the output of a statement into a file, I need to save the statements into another file and pass it as input to cqlsh. Something like:
> $ cqlsh -f [statement_file] > [output_file]
> I am aware of the existence of the cqlsh CAPTURE command but it doesn't work for everything (particularly, for cqlsh-only commands like DESCRIBE)
> To solve this, I propose that you add an "-e" parameter to cqlsh that accepts a valid CQL statement to execute. This is exactly the same as MySQL CLI's "-e" parameter: http://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html#option_mysql_execute



--
This message was sent by Atlassian JIRA
(v6.2#6252)