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 "Knut Anders Hatlen (JIRA)" <de...@db.apache.org> on 2006/10/12 09:29:36 UTC

[jira] Created: (DERBY-1956) Remove stale code from the statement classes in the client driver

Remove stale code from the statement classes in the client driver
-----------------------------------------------------------------

                 Key: DERBY-1956
                 URL: http://issues.apache.org/jira/browse/DERBY-1956
             Project: Derby
          Issue Type: Improvement
          Components: Network Client
    Affects Versions: 10.3.0.0
            Reporter: Knut Anders Hatlen
         Assigned To: Knut Anders Hatlen
            Priority: Minor
             Fix For: 10.3.0.0


Statement and ParameterMetaData contain flags called escapedProcedureCallWithResult_. These flags might have had a function before, but now they are always false. They are used in many if-statements and make the code harder to read. Removing the flags and the code that is only executed when the flags are true, would simplify the code and make it more maintainable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1956) Remove stale code from the statement classes in the client driver

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1956?page=all ]

Knut Anders Hatlen closed DERBY-1956.
-------------------------------------

    Resolution: Fixed
    Derby Info:   (was: [Patch Available])

Thanks Bryan and Dan for the comments. Committed revision 463565.

> Remove stale code from the statement classes in the client driver
> -----------------------------------------------------------------
>
>                 Key: DERBY-1956
>                 URL: http://issues.apache.org/jira/browse/DERBY-1956
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: 1956.diff, 1956.stat
>
>
> Statement and ParameterMetaData contain flags called escapedProcedureCallWithResult_. These flags might have had a function before, but now they are always false. They are used in many if-statements and make the code harder to read. Removing the flags and the code that is only executed when the flags are true, would simplify the code and make it more maintainable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1956) Remove stale code from the statement classes in the client driver

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1956?page=comments#action_12441775 ] 
            
Knut Anders Hatlen commented on DERBY-1956:
-------------------------------------------

It seems to be there to support a different parameter mapping for statements of this kind:

  CallableStatement cs = c.prepareCall("{ ? = call cos(?) }");

If the flag is true, cs.setDouble(2, Math.PI) puts the parameter value into the first element of the internal parameter array instead of the second element.

It also short-circuits CallableStatement.registerOutParameter() if the parameter index is 1. This could indicate that at some point registerOutParameter() was not needed to register the result parameter.

> Remove stale code from the statement classes in the client driver
> -----------------------------------------------------------------
>
>                 Key: DERBY-1956
>                 URL: http://issues.apache.org/jira/browse/DERBY-1956
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: 1956.diff, 1956.stat
>
>
> Statement and ParameterMetaData contain flags called escapedProcedureCallWithResult_. These flags might have had a function before, but now they are always false. They are used in many if-statements and make the code harder to read. Removing the flags and the code that is only executed when the flags are true, would simplify the code and make it more maintainable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (DERBY-1956) Remove stale code from the statement classes in the client driver

Posted by Daniel John Debrunner <dj...@apache.org>.
Bryan Pendleton (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/DERBY-1956?page=comments#action_12441749 ] 
>             
> Bryan Pendleton commented on DERBY-1956:
> ----------------------------------------
> 
> By looking at the content of the dead code, can you make a guess as to what feature it was in support of?

Cloudscape supported (in a non-standard way) direct calls to Java 
methods as "procedures" with out parameters. The code was very messy, 
trying to determine if a parameter was an IN or OUT parameter on the fly 
was awkward. The code might have been related to that, being able to 
call a Java method that was a "procedure" with out parameters and the 
Java method returned a value, e.g.

  {? = call some.method.inaclass.mymethod(?) }

The code was all replaced by standard SQL procedures and functions.
Dan.



[jira] Commented: (DERBY-1956) Remove stale code from the statement classes in the client driver

Posted by "Bryan Pendleton (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1956?page=comments#action_12441749 ] 
            
Bryan Pendleton commented on DERBY-1956:
----------------------------------------

By looking at the content of the dead code, can you make a guess as to what feature it was in support of?

> Remove stale code from the statement classes in the client driver
> -----------------------------------------------------------------
>
>                 Key: DERBY-1956
>                 URL: http://issues.apache.org/jira/browse/DERBY-1956
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: 1956.diff, 1956.stat
>
>
> Statement and ParameterMetaData contain flags called escapedProcedureCallWithResult_. These flags might have had a function before, but now they are always false. They are used in many if-statements and make the code harder to read. Removing the flags and the code that is only executed when the flags are true, would simplify the code and make it more maintainable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1956) Remove stale code from the statement classes in the client driver

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1956?page=all ]

Knut Anders Hatlen updated DERBY-1956:
--------------------------------------

    Attachment: 1956.diff
                1956.stat

Attaching a patch which removes escapedProcedureCallWithResult_ and all code that is only executed when the flag is true. The patch also removes a couple of methods that became no-ops, and SQLStates and messages that are never used. Derbyall ran cleanly with the changes. The patch is ready for review.

> Remove stale code from the statement classes in the client driver
> -----------------------------------------------------------------
>
>                 Key: DERBY-1956
>                 URL: http://issues.apache.org/jira/browse/DERBY-1956
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: 1956.diff, 1956.stat
>
>
> Statement and ParameterMetaData contain flags called escapedProcedureCallWithResult_. These flags might have had a function before, but now they are always false. They are used in many if-statements and make the code harder to read. Removing the flags and the code that is only executed when the flags are true, would simplify the code and make it more maintainable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1956) Remove stale code from the statement classes in the client driver

Posted by "Bryan Pendleton (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1956?page=comments#action_12441836 ] 
            
Bryan Pendleton commented on DERBY-1956:
----------------------------------------

Thanks Knut Anders and Dan for the clarification. It makes sense to me, and I
think that removing the dead code sounds good.

> Remove stale code from the statement classes in the client driver
> -----------------------------------------------------------------
>
>                 Key: DERBY-1956
>                 URL: http://issues.apache.org/jira/browse/DERBY-1956
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: 1956.diff, 1956.stat
>
>
> Statement and ParameterMetaData contain flags called escapedProcedureCallWithResult_. These flags might have had a function before, but now they are always false. They are used in many if-statements and make the code harder to read. Removing the flags and the code that is only executed when the flags are true, would simplify the code and make it more maintainable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1956) Remove stale code from the statement classes in the client driver

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1956?page=all ]

Knut Anders Hatlen updated DERBY-1956:
--------------------------------------

    Derby Info: [Patch Available]

> Remove stale code from the statement classes in the client driver
> -----------------------------------------------------------------
>
>                 Key: DERBY-1956
>                 URL: http://issues.apache.org/jira/browse/DERBY-1956
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: 1956.diff, 1956.stat
>
>
> Statement and ParameterMetaData contain flags called escapedProcedureCallWithResult_. These flags might have had a function before, but now they are always false. They are used in many if-statements and make the code harder to read. Removing the flags and the code that is only executed when the flags are true, would simplify the code and make it more maintainable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira