[#7591] Refactor calls to DefaultExecuteContext.register() to use ResourceManagingScope.autoFree() instead
This commit is contained in:
parent
0999465dff
commit
bcd684dabb
@ -91,16 +91,12 @@ public class BlobBinding implements Binding<byte[], byte[]> {
|
||||
|
||||
@Override
|
||||
public final void set(BindingSetStatementContext<byte[]> ctx) throws SQLException {
|
||||
Blob blob = newBlob(ctx.configuration(), ctx.value());
|
||||
DefaultExecuteContext.register(blob);
|
||||
ctx.statement().setBlob(ctx.index(), blob);
|
||||
ctx.statement().setBlob(ctx.index(), ctx.autoFree(newBlob(ctx.configuration(), ctx.value())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void set(BindingSetSQLOutputContext<byte[]> ctx) throws SQLException {
|
||||
Blob blob = newBlob(ctx.configuration(), ctx.value());
|
||||
DefaultExecuteContext.register(blob);
|
||||
ctx.output().writeBlob(blob);
|
||||
ctx.output().writeBlob(ctx.autoFree(newBlob(ctx.configuration(), ctx.value())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -91,16 +91,12 @@ public class ClobBinding implements Binding<String, String> {
|
||||
|
||||
@Override
|
||||
public final void set(BindingSetStatementContext<String> ctx) throws SQLException {
|
||||
Clob clob = newClob(ctx.configuration(), ctx.value());
|
||||
DefaultExecuteContext.register(clob);
|
||||
ctx.statement().setClob(ctx.index(), clob);
|
||||
ctx.statement().setClob(ctx.index(), ctx.autoFree(newClob(ctx.configuration(), ctx.value())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void set(BindingSetSQLOutputContext<String> ctx) throws SQLException {
|
||||
Clob clob = newClob(ctx.configuration(), ctx.value());
|
||||
DefaultExecuteContext.register(clob);
|
||||
ctx.output().writeClob(clob);
|
||||
ctx.output().writeClob(ctx.autoFree(newClob(ctx.configuration(), ctx.value())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1349,8 +1349,6 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1787,6 +1785,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.output().writeBytes(value);
|
||||
@ -3535,6 +3534,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.output().writeString(value);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user