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

Myrna van Lunteren updated DERBY-2255:
--------------------------------------

    Attachment: DERBY-2255_6.diff

Attaching another patch.

This patch tries to figure out if a singlelinecomment just read is actually 
part of a statement started earlier.
If it is, it prints the continuation prompt ('>'). If it is not part of a 
statement it prints the ij prompt ('ij>').

I had alternatively thought of not providing any prompt after a single line 
comment, but I found myself wondering what ij was up to (we now get a prompt in 
all other situations).

If someone could review this and indicate if this is acceptable?

My one concern is that normally, if you start a second named connection for 
example, 'as me', the prompt turns into: ij (me)> for a new statement, instead 
of ij>.
Before the first patch, the next line would not get a prompt.
Now, (as with the first patch) you will see a > prompt, or (this patch) if the 
statement was a single line comment, you will see an ij> prompt on the next 
line. That is, you will not see the named connection.

I've run a number of tests, but it seems our tests are not affected by 
this...So, only interactively do you see a difference. I can not imagine how 
that could break anyone's application.

The only incompatibility I can think of is that if before you used to try out a 
statement interactively and then cut-and-paste into a script, you may now have 
to remove some prompt characters...


> ij should indicate that it is waiting for more input in a multi-line 
> interactive statement.
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2255
>                 URL: https://issues.apache.org/jira/browse/DERBY-2255
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 10.2.2.0
>            Reporter: Anders Morken
>            Assignee: Anders Morken
>            Priority: Trivial
>         Attachments: DERBY-2255-1.diff, DERBY-2255-2.diff, derby-2255-3.diff, 
> DERBY-2255_4.diff, DERBY-2255_6.diff
>
>
> Many users have been confused by the lack of response from ij when they 
> forget to end a statement with a semicolon, and believe that Derby is taking 
> its sweet time answering their query, while ij is simply waiting for more 
> input.
> This issue tries to address this by adding a short "> " prompt to the next 
> line after a newline has been entered by the user without ending the 
> statement with a semicolon.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to