Code example for Statement

Methods: setQueryTimeout

0
	 
	public SqliteHelper(File f) throws ClassNotFoundException, SQLException{
    	Class.forName("org.sqlite.JDBC");
		connection = DriverManager.getConnection("jdbc:sqlite:" + f.getAbsolutePath());
		statement = connection.createStatement();
		statement.setQueryTimeout(30);
	} 
	 
	public List<String> getTables() throws SQLException{
		ResultSet rs = statement.executeQuery(SQL_TABLES);
		List<String> ret = new LinkedList<String>();
		while(rs.next()){
			ret.add(rs.getString(1));
		} 
		return(ret);
	} 
	 
	public List<String> getTableColumnNames(String tableName) throws SQLException{
		ResultSet rs = statement.executeQuery("PRAGMA table_info(" + tableName + ")");
		List<String> ret = new LinkedList<String>();
		while(rs.next()){