Initial commit
[squelch.git] / src / main / java / net / jaekl / squelch / stmt / Stmt.java
1 package net.jaekl.squelch.stmt;
2
3 import java.io.IOException;
4 import java.io.PrintWriter;
5 import java.sql.Connection;
6 import java.sql.SQLException;
7
8 /**
9  * Abstract base class for all statements (e.g., Insert, Create, Delete, Describe)
10  */
11
12 public abstract class Stmt {
13         // Returns true iff. line represents an instance of this statement type
14         abstract public boolean handles(String line);
15         
16         // Execute line as a statement of this type
17         abstract public int exec(Connection conn, PrintWriter pw, String line) throws IOException, SQLException;
18 }