servicenow.community.sql
Class DatabaseWriter
java.lang.Object
servicenow.community.sql.DatabaseWriter
public class DatabaseWriter
- extends java.lang.Object
Contains the JDBC connection for an SQL database.
- Author:
- LewisGF
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatabaseWriter
public DatabaseWriter(java.util.Properties props)
throws PumperException,
java.io.IOException,
org.jdom2.JDOMException,
java.sql.SQLException
- Throws:
PumperException
java.io.IOException
org.jdom2.JDOMException
java.sql.SQLException
initialize
public java.sql.Connection initialize()
throws java.sql.SQLException
- Connect to the database.
Set the timezone to GMT.
Set the date format to YYYY-MM-DD
- Throws:
java.sql.SQLException
connection
public java.sql.Connection connection()
commit
public void commit()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
sqlGenerator
public SqlGenerator sqlGenerator()
autocreate
public boolean autocreate()
tableWriter
public TableWriter tableWriter(GlideTable glidetable)
throws java.sql.SQLException,
PumperException,
java.io.IOException,
org.jdom2.JDOMException
- Throws:
java.sql.SQLException
PumperException
java.io.IOException
org.jdom2.JDOMException
tableWriter
public TableWriter tableWriter(GlideTable glidetable,
java.lang.String sqlTableName,
Metrics metrics)
throws java.sql.SQLException,
PumperException,
java.io.IOException,
org.jdom2.JDOMException
- Throws:
java.sql.SQLException
PumperException
java.io.IOException
org.jdom2.JDOMException
executeStatement
public void executeStatement(java.lang.String sqlCommand)
throws java.sql.SQLException
- Throws:
java.sql.SQLException