summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/org/postgresql/PGStatement.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/PGStatement.java')
-rw-r--r--src/interfaces/jdbc/org/postgresql/PGStatement.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/PGStatement.java b/src/interfaces/jdbc/org/postgresql/PGStatement.java
new file mode 100644
index 00000000000..85fd5a5b85e
--- /dev/null
+++ b/src/interfaces/jdbc/org/postgresql/PGStatement.java
@@ -0,0 +1,26 @@
+package org.postgresql;
+
+import java.sql.Statement;
+import java.sql.SQLException;
+
+public abstract class PGStatement implements Statement {
+ public ObjectPool inusemap_dim1[];
+ public ObjectPool inusemap_dim2[];
+ protected Connection connection;
+
+ public PGStatement(Connection connection){
+ this.connection = connection;
+ inusemap_dim1 = connection.pg_stream.factory_dim1.getObjectPoolArr();
+ inusemap_dim2 = connection.pg_stream.factory_dim2.getObjectPoolArr();
+ }
+
+ public void deallocate(){
+ connection.pg_stream.deallocate(this);
+ }
+
+ public void close() throws SQLException {
+ deallocate();
+ connection.pg_stream.factory_dim1.releaseObjectPoolArr(inusemap_dim1);
+ connection.pg_stream.factory_dim2.releaseObjectPoolArr(inusemap_dim2);
+ }
+}