-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSQL.java
More file actions
35 lines (26 loc) · 773 Bytes
/
Copy pathSQL.java
File metadata and controls
35 lines (26 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.code.advancedsql;
import com.code.advancedsql.query.IQuery;
import com.code.advancedsql.table.Table;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public abstract class SQL implements ISQL {
protected Connection connection = null;
protected boolean connected = false;
@Override
public Connection getConnection() {
return connection;
}
@Override
public boolean isConnected() {
return connected;
}
@Override
public Table table(String name) {
return new Table(this, name);
}
@Override
public PreparedStatement prepare(IQuery query) throws SQLException {
return this.connection.prepareStatement(query.toQuery());
}
}