package com.gmail.jafelds.ppedits.testing;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.gmail.jafelds.ppedits.SQLite;
/**
* @author wolfhome
*
*/
public class SongTest
{
/**
* @param args
* @throws ClassNotFoundException If the driver isn't included.
* @throws SQLException If something bad happens with the SQLite.
*/
public static void main(String[] args)
throws ClassNotFoundException, SQLException
{
Class.forName("org.sqlite.JDBC");
SQLite sqlite = new SQLite("pumpproedits.db");
ResultSet rs = sqlite.getSongs();
while (rs.next())
{
System.out.print("Song name = " + rs.getString("name"));
System.out.print(" — Song id = " + rs.getInt("id"));
System.out.println(" — Measures = " + rs.getInt("measures"));
}
rs.close();
}
}