You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Manish Khettry (JIRA)" <ji...@apache.org> on 2007/06/08 19:53:26 UTC

[jira] Created: (DERBY-2794) Document ansi trim functionality

Document ansi trim functionality
--------------------------------

                 Key: DERBY-2794
                 URL: https://issues.apache.org/jira/browse/DERBY-2794
             Project: Derby
          Issue Type: Sub-task
          Components: Documentation
            Reporter: Manish Khettry


Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.

There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.


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


[jira] Updated: (DERBY-2794) Document ansi trim functionality

Posted by "Manish Khettry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manish Khettry updated DERBY-2794:
----------------------------------

    Attachment: trim_doc

A first cut at the ansi trim functionality.

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>         Attachments: trim_doc
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Resolved: (DERBY-2794) Document ansi trim functionality

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren resolved DERBY-2794.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.0.0
       Derby Info:   (was: [Patch Available])

I committed an updated version, based on Army's comments, with a few minor modifications (the reference manual appears to use bullets rather than 1.2.3 or A.B.) with revision: http://svn.apache.org/viewvc?view=rev&rev=547716


> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-2794.diff, ref-single.html, rreftrimfunc.html, trim_doc, trim_v2.txt
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Commented: (DERBY-2794) Document ansi trim functionality

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505049 ] 

Myrna van Lunteren commented on DERBY-2794:
-------------------------------------------

Now I *have* tested the examples, and the two examples using 'NULL' return an error for me with ij:

ij> VALUES TRIM(NULL from '  derby ');
ERROR 42X01: Syntax error: Encountered "NULL" at line 1, column 13.
ij> VALUES TRIM(' ' from NULL);
ERROR 42X01: Syntax error: Encountered "NULL" at line 1, column 22.

Is that a bug in the example & text or in the functionality?

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>         Attachments: DERBY-2794.diff, ref-single.html, rreftrimfunc.html, trim_doc
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Updated: (DERBY-2794) Document ansi trim functionality

Posted by "A B (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

A B updated DERBY-2794:
-----------------------

    Affects Version/s: 10.3.0.0

Thank you, Myrna.

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>    Affects Versions: 10.3.0.0
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-2794.diff, ref-single.html, rreftrimfunc.html, trim_doc, trim_v2.txt
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Commented: (DERBY-2794) Document ansi trim functionality

Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513551 ] 

Øystein Grøvlen commented on DERBY-2794:
----------------------------------------

I feel the introduction in the documentation is bit confusing:

"TRIM is a function that returns its first string argument with leading and/or trailing pad characters removed.  The second argument indicates whether leading, or trailing, or both leading and trailing pad characters should be removed. The third argument specifies the pad character that is to be removed."

If argument is to mean parameter, there is only one argument as far as I can see.  This argument is comprised of up to three variable parts.

If argument is to mean variable part of the parameter, there are three types of arguments, but the numbering is confusing.  The first argument is not necessarily the source.  It is the last argument that is the source.

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>    Affects Versions: 10.3.0.0
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-2794.diff, ref-single.html, rreftrimfunc.html, trim_doc, trim_v2.txt
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Updated: (DERBY-2794) Document ansi trim functionality

Posted by "Manish Khettry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manish Khettry updated DERBY-2794:
----------------------------------

    Derby Info: [Patch Available]

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>         Attachments: trim_doc
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Commented: (DERBY-2794) Document ansi trim functionality

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514014 ] 

Myrna van Lunteren commented on DERBY-2794:
-------------------------------------------

I changed the text to the following:

"TRIM is a function that takes a character expression and returns that expression with leading and/or trailing pad characters removed. Optional parameters indicate whether leading, or trailing, or both leading and trailing pad characters should be removed, and specify the pad character that is to be removed."

revision 557783 to trunk.

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>    Affects Versions: 10.3.0.0
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-2794.diff, ref-single.html, rreftrimfunc.html, trim_doc, trim_v2.txt
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Updated: (DERBY-2794) Document ansi trim functionality

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-2794:
--------------------------------------

    Attachment: ref-single.html
                rreftrimfunc.html
                DERBY-2794.diff

I'm attaching a patch that adds the contents of the doc,.I expanded some of the details so I could understand the syntax.

I have not tested the examples.

Also, I have a question: what does the first sentence of the explanation mean: '
If the trim specification { LEADING | TRAILING | BOTH } is not specified, it defaults to false.

What is it that defaults to false?

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>         Attachments: DERBY-2794.diff, ref-single.html, rreftrimfunc.html, trim_doc
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Updated: (DERBY-2794) Document ansi trim functionality

Posted by "A B (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

A B updated DERBY-2794:
-----------------------

    Attachment: trim_v2.txt

Hi Myrna, thank you for working on this.  I'm attaching a newer version of the doc suggestions that builds on Manish's suggestions but (hopefully) makes things a bit more clear.  My apologies for not getting to this sooner...

> Is that a bug in the example & text or in the functionality?

That's a bug in the example; the _v2 changes as I have attached them show how to make the statements execute without error...

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>         Attachments: DERBY-2794.diff, ref-single.html, rreftrimfunc.html, trim_doc, trim_v2.txt
>
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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


[jira] Assigned: (DERBY-2794) Document ansi trim functionality

Posted by "Manish Khettry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manish Khettry reassigned DERBY-2794:
-------------------------------------

    Assignee: Manish Khettry

> Document ansi trim functionality
> --------------------------------
>
>                 Key: DERBY-2794
>                 URL: https://issues.apache.org/jira/browse/DERBY-2794
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Manish Khettry
>            Assignee: Manish Khettry
>
> Several examples can be found in the junit test (AnsiTrimTest). The unit test is in java/testing/org/apache/derbyTesting/functionTests/tests/lang.
> There is also the documentation from the ANSI spec which Dag had posted in a comment in DERBY-1623.

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