@@ -13,51 +13,51 @@ public static void main(String[] args) throws Exception {
1313 CCJSqlParserManager parserManager = new CCJSqlParserManager ();
1414
1515 /*
16- * String longQuery = new String(
17- * "select * from ( SELECT intermediate.id as id , intermediate.date as " +
18- * "date FROM ( SELECT DISTINCT ( id ) FROM ( SELECT " +
19- * "wct_workflows.workflow_id as id , wct_transaction.date as date FROM " +
20- * "wct_audit_entry , wct_transaction , wct_workflows WHERE " +
21- * "( wct_audit_entry.privilege = 'W' or wct_audit_entry.privilege = " +
22- * "'C' ) and wct_audit_entry.outcome = 't' and " +
23- * "wct_audit_entry.transaction_id = wct_transaction.transaction_id and " +
24- * "wct_transaction.user_id = 164 and wct_audit_entry.object_id = " +
25- * "wct_workflows.active_version_id ))) UNION SELECT wct_workflows.workflow_id as " +
26- * "id , wct_transaction.date as date FROM wct_audit_entry , " +
27- * "wct_transaction , wct_workflows WHERE ( wct_audit_entry.privilege = " +
28- * "'W' or wct_audit_entry.privilege = 'C' ) and wct_audit_entry.outcome " +
29- * "= 't' and wct_audit_entry.transaction_id = " +
30- * "wct_transaction.transaction_id and wct_transaction.user_id = 164 and " +
31- * "afdf= ( select wct_audit_entry.object_id from wct_audit_entry , " +
32- * "wct_workflow_archive where wct_audit_entry.object_id = " +
33- * "wct_workflow_archive.archive_id and wct_workflows.workflow_id = " +
34- * "wct_workflow_archive.workflow_id ) " +
35- * "UNION SELECT wct_workflows.workflow_id " +
36- * "as id , wct_transaction.date as date FROM wct_audit_entry , " +
37- * "wct_transaction , wct_workflows WHERE ( wct_audit_entry.privilege = " +
38- * "'W' OR wct_audit_entry.privilege = 'E' OR wct_audit_entry.privilege = " +
39- * "'A' ) and wct_audit_entry.outcome = 't' and " +
40- * "wct_audit_entry.transaction_id = wct_transaction.transaction_id and " +
41- * "wct_transaction.user_id = 164 and wct_audit_entry.object_id = " +
42- * "wct_workflows.workflow_id UNION SELECT * FROM interm2 , wct_workflow_docs WHERE " +
43- * "interm2.id = wct_workflow_docs.document_id ORDER BY id , date DESC ");
16+ * String longQuery = new String(
17+ * "select * from ( SELECT intermediate.id as id , intermediate.date as " +
18+ * "date FROM ( SELECT DISTINCT ( id ) FROM ( SELECT " +
19+ * "wct_workflows.workflow_id as id , wct_transaction.date as date FROM " +
20+ * "wct_audit_entry , wct_transaction , wct_workflows WHERE " +
21+ * "( wct_audit_entry.privilege = 'W' or wct_audit_entry.privilege = " +
22+ * "'C' ) and wct_audit_entry.outcome = 't' and " +
23+ * "wct_audit_entry.transaction_id = wct_transaction.transaction_id and " +
24+ * "wct_transaction.user_id = 164 and wct_audit_entry.object_id = " +
25+ * "wct_workflows.active_version_id ))) UNION SELECT wct_workflows.workflow_id as " +
26+ * "id , wct_transaction.date as date FROM wct_audit_entry , " +
27+ * "wct_transaction , wct_workflows WHERE ( wct_audit_entry.privilege = " +
28+ * "'W' or wct_audit_entry.privilege = 'C' ) and wct_audit_entry.outcome " +
29+ * "= 't' and wct_audit_entry.transaction_id = " +
30+ * "wct_transaction.transaction_id and wct_transaction.user_id = 164 and " +
31+ * "afdf= ( select wct_audit_entry.object_id from wct_audit_entry , " +
32+ * "wct_workflow_archive where wct_audit_entry.object_id = " +
33+ * "wct_workflow_archive.archive_id and wct_workflows.workflow_id = " +
34+ * "wct_workflow_archive.workflow_id ) " +
35+ * "UNION SELECT wct_workflows.workflow_id " +
36+ * "as id , wct_transaction.date as date FROM wct_audit_entry , " +
37+ * "wct_transaction , wct_workflows WHERE ( wct_audit_entry.privilege = " +
38+ * "'W' OR wct_audit_entry.privilege = 'E' OR wct_audit_entry.privilege = " +
39+ * "'A' ) and wct_audit_entry.outcome = 't' and " +
40+ * "wct_audit_entry.transaction_id = wct_transaction.transaction_id and " +
41+ * "wct_transaction.user_id = 164 and wct_audit_entry.object_id = " +
42+ * "wct_workflows.workflow_id UNION SELECT * FROM interm2 , wct_workflow_docs WHERE " +
43+ * "interm2.id = wct_workflow_docs.document_id ORDER BY id , date DESC ");
4444 */
4545 String longQuery = "select * from k where ID > 4" ;
4646
4747 /*
48- * String longQuery = "select * from ( SELECT intermediate.id as id , intermediate.date as "
49- * + "date FROM ( SELECT DISTINCT ( id ) FROM ( SELECT " +
50- * "wct_workflows.workflow_id as id , wct_transaction.date as date FROM " +
51- * "wct_audit_entry , wct_transaction , wct_workflows WHERE " +
52- * "( wct_audit_entry.privilege = 'W' or wct_audit_entry.privilege = " + "'C' ))))";
48+ * String longQuery = "select * from ( SELECT intermediate.id as id , intermediate.date as "
49+ * + "date FROM ( SELECT DISTINCT ( id ) FROM ( SELECT " +
50+ * "wct_workflows.workflow_id as id , wct_transaction.date as date FROM " +
51+ * "wct_audit_entry , wct_transaction , wct_workflows WHERE " +
52+ * "( wct_audit_entry.privilege = 'W' or wct_audit_entry.privilege = " + "'C' ))))";
5353 */
5454 /*
55- * String longQuery = "select * from d WHERE " +
56- * "( wct_audit_entry.privilege = 'W' or wct_audit_entry.privilege = " +
57- * "'C' ) and wct_audit_entry.outcome = 't' and " +
58- * "wct_audit_entry.transaction_id = wct_transaction.transaction_id and " +
59- * "wct_transaction.user_id = 164 and wct_audit_entry.object_id = " +
60- * "wct_workflows.active_version_id ";
55+ * String longQuery = "select * from d WHERE " +
56+ * "( wct_audit_entry.privilege = 'W' or wct_audit_entry.privilege = " +
57+ * "'C' ) and wct_audit_entry.outcome = 't' and " +
58+ * "wct_audit_entry.transaction_id = wct_transaction.transaction_id and " +
59+ * "wct_transaction.user_id = 164 and wct_audit_entry.object_id = " +
60+ * "wct_workflows.active_version_id ";
6161 */
6262 StringReader stringReader = new StringReader (longQuery );
6363 Statement statement = parserManager .parse (stringReader );
0 commit comments