You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/05/21 14:36:02 UTC

[GitHub] [shardingsphere] kimmking commented on issue #5727: The int(or bigint) value is null, but jpa with shardingsphere-jdbc returns zero.

kimmking commented on issue #5727:
URL: https://github.com/apache/shardingsphere/issues/5727#issuecomment-632121535


   Hi, @shooray 
   We can't modify this method return type, case it defined by JDBC(java.sql.ResultSet):
   
   ```
   /**
        * Retrieves the value of the designated column in the current row
        * of this <code>ResultSet</code> object as
        * an <code>int</code> in the Java programming language.
        *
        * @param columnIndex the first column is 1, the second is 2, ...
        * @return the column value; if the value is SQL <code>NULL</code>, the
        * value returned is <code>0</code>
        * @exception SQLException if the columnIndex is not valid;
        * if a database access error occurs or this method is
        *            called on a closed result set
        */
       int getInt(int columnIndex) throws SQLException;
   
       /**
        * Retrieves the value of the designated column in the current row
        * of this <code>ResultSet</code> object as
        * a <code>long</code> in the Java programming language.
        *
        * @param columnIndex the first column is 1, the second is 2, ...
        * @return the column value; if the value is SQL <code>NULL</code>, the
        * value returned is <code>0</code>
        * @exception SQLException if the columnIndex is not valid;
        * if a database access error occurs or this method is
        *            called on a closed result set
        */
       long getLong(int columnIndex) throws SQLException;
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org