de.fuberlin.wiwiss.d2rq.sql
Class SQLScriptLoader
java.lang.Object
de.fuberlin.wiwiss.d2rq.sql.SQLScriptLoader
public class SQLScriptLoader
- extends Object
Reads SQL statements from a file or other source.
Statements must end with semicolon and must end
at the end of a line. Lines starting
with -- are considered comments and are ignored.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLScriptLoader
public SQLScriptLoader(Reader in,
Connection conn)
loadFile
public static void loadFile(File file,
Connection conn)
throws FileNotFoundException,
SQLException
- Loads a SQL script from a file and executes it.
- Throws:
FileNotFoundException
SQLException
loadURI
public static void loadURI(URI url,
Connection conn)
throws IOException,
SQLException
- Loads a SQL script from a URL and executes it.
- Throws:
IOException
SQLException
execute
public void execute()
throws SQLException
- Throws:
SQLException