public class SqlExecutor
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
SqlExecutor(java.sql.Connection con,
java.lang.String sql,
long maxAttachmentSize,
MessageCollector messages) |
public SqlExecutor(java.sql.Connection con,
java.lang.String sql,
long maxAttachmentSize,
MessageCollector messages)
throws java.sql.SQLException
con - a database connectionsql - an SQL statement which will be used as PreparedStatement, so it may contain '?' parameters.java.sql.SQLExceptionpublic java.lang.String getSql()
public Record executeAndMerge(java.util.List<Value> parameters) throws java.sql.SQLException, java.io.IOException
parameters - the parameters for the SQL (Prepared)statement given in the constructor.java.sql.SQLExceptionjava.io.IOExceptionpublic java.util.Collection<Record> execute(java.util.List<Value> parameters) throws java.sql.SQLException, java.io.IOException
parameters - the parameters for the SQL (Prepared)statement given in the constructor.java.sql.SQLExceptionjava.io.IOExceptionpublic void close()
close in interface java.lang.AutoCloseableprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable