Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajustar persistencia de campos CLOB cuando existen valores null #190

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Ajustar persistencia de campos CLOB cuando existen valores null y
diferentes de null en los campos CLOB
stalincalderon committed May 14, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 5a1fd68d01e2351fbb5fb37ee95f774a1d2db4cb
3 changes: 2 additions & 1 deletion src/main/java/org/replicadb/manager/OracleManager.java
Original file line number Diff line number Diff line change
@@ -177,13 +177,14 @@ public int insertDataToTable(ResultSet resultSet, int taskId) throws SQLExceptio
break;
case Types.CLOB:
Clob clobData = resultSet.getClob(i);
//ps.setClob(i, clobData);
if (clobData != null)
{
//Se establece los datos del campo CLOB como un objeto java.io.Reader
ps.setClob(i, clobData.getCharacterStream());
clobData.free();
}
else//si el dato es null en el campo CLOB, se setea directamente el clobData
ps.setClob(i, clobData);
break;
case Types.BOOLEAN:
ps.setBoolean(i, resultSet.getBoolean(i));