forked from paulnguyen/code
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathQueryTool.java
More file actions
31 lines (25 loc) · 785 Bytes
/
QueryTool.java
File metadata and controls
31 lines (25 loc) · 785 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
public class QueryTool {
public class Query {
public QueryResults executeQuery(String query) {
System.out.println( "Executing Query: " + query );
QueryResults resultSet = new QueryResultsImpl() ;
resultSet.fetchData();
return resultSet ;
}
}
public void runTest()
{
Query q = new Query() ;
QueryResults resultSet = q.executeQuery("select * from test");
QueryResultsIterator iter = resultSet.createIterator() ;
while ( !iter.isDone() )
{
System.out.println( iter.currentItem() );
iter.next();
}
}
public static void main(String[] args) {
QueryTool q = new QueryTool() ;
q.runTest() ;
}
}