23 package org.sleuthkit.autopsy.coreutils;
25 import java.sql.Connection;
26 import java.sql.DriverManager;
27 import java.sql.ResultSet;
28 import java.sql.SQLException;
29 import java.sql.Statement;
30 import java.util.logging.Level;
59 }
catch (ClassNotFoundException ex) {
60 throw new SQLException(ex);
62 conn = DriverManager.getConnection(
sUrl);
64 statement.setQueryTimeout(STMT_EXEC_TIMEOUT_SECS);
75 public void executeStmt(String sqlStatement)
throws SQLException {
87 public void executeStmt(String[] sqlStatements)
throws SQLException {
88 for (String stmt : sqlStatements) {
104 public ResultSet
executeQry(String sqlStatement)
throws SQLException {
105 return statement.executeQuery(sqlStatement);
120 }
catch (SQLException ex) {
121 logger.log(Level.WARNING,
"Unable to close connection to SQLite DB at " +
sUrl, ex);
154 public final void init(String driver, String url)
throws SQLException {
174 throw new SQLException(
"Driver and or databse URl not initialized");
179 }
catch (ClassNotFoundException ex) {
180 throw new SQLException(ex);
182 conn = DriverManager.getConnection(
sUrl);
void executeStmt(String[] sqlStatements)
ResultSet executeQry(String sqlStatement)
static final int STMT_EXEC_TIMEOUT_SECS
SQLiteDBConnect(String driver, String url)
final void init(String driver, String url)
Connection getConnection()
void executeStmt(String sqlStatement)
synchronized static Logger getLogger(String name)
static final Logger logger