-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathITable.java
More file actions
108 lines (91 loc) · 3.23 KB
/
Copy pathITable.java
File metadata and controls
108 lines (91 loc) · 3.23 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package advancedsql.table;
import advancedsql.ISQL;
import advancedsql.query.*;
import java.sql.SQLException;
import java.util.Map;
public interface ITable {
/**
* @return Table name.
*/
String getName();
/**
* @return SQL object.
*/
ISQL getSQL();
/**
* Check if the table exists.
* @return true if table exists.
* @throws SQLException Exception when something goes wrong.
*/
boolean exists() throws SQLException;
/**
* Generate a SELECT query.
* Remember to execute the query after you specify the parameters.
* @return A Select object that allows you to specify the parameters of your query.
*/
Select select();
/**
* Generate a SELECT query.
* Remember to execute the query after you specify the parameters.
* @param columns Array of columns that you want to select.
* @return A Select object that allows you to specify the parameters of your query.
*/
Select select(String[] columns);
/**
* Create table.
* Set the columns type that you want to create and then execute the query.
* Remember to execute the query after you specify the parameters.
* @return A Create object that allows you to specify the parameters of your query.
*/
Create create();
/**
* Alter the table.
* Remember to execute the query after you specify the parameters.
* @return An Alter object that allows you to specify the parameters of your query.
*/
Alter alter();
/**
* Insert a row into the table.
* Remember to execute the query after you specify the parameters.
* @return An Insert object that allows you to specify the parameters of your query.
*/
Insert insert();
/**
* Insert a row into the table.
* Remember to execute the query after you specify the parameters.
* @param fields Columns and values to insert.
* @return An Insert object that allows you to specify the parameters of your query.
*/
Insert insert(Map<String, Object> fields);
/**
* Update rows from the table.
* Remember to execute the query after you specify the parameters.
* @return An Update object that allows you to specify the parameters of your query.
*/
Update update();
/**
* Update rows from the table.
* Remember to execute the query after you specify the parameters.
* @param fields Columns and values to update.
* @return An Update object that allows you to specify the parameters of your query.
*/
Update update(Map<String, Object> fields);
/**
* Delete rows from the table.
* Remember to execute the query after you specify the parameters.
* @return An Delete object that allows you to specify the parameters of your query.
*/
Delete delete();
/**
* Empty the table.
* Remember to execute the query after you specify the parameters.
* @return A Truncate object that allows you to specify the parameters of your query.
*/
Truncate truncate();
/**
* Delete the table.
* Remember to execute the query after you specify the parameters.
* @return A Drop object that allows you to specify the parameters of your query.
*/
Drop drop();
}