⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 t_qualifiertest.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
                   null, ScanController.NA,                    q3,                   null, ScanController.NA,                   6, 16, init_order))        {            ret_val = false;        }        //        //  +---------------------------------------------------------+        //  |pred  |start|key|stop |key|rows returned |rows locked    |        //  |      |value|op |value|op |              |(serialization)|        //  +------+-----+---+-----+---+--------------+---------------+        //  |x <= 5|null |   |{5}  |GT |{1,1} .. {5,6}|first .. {5,6} |        //  +-----------------------------------------+---------------+        progress("qual scan (x <= 5)");        qual_col1.setValue(5);        Qualifier q4[][] =         {            {                new QualifierUtil(0, qual_col1,                                Orderable.ORDER_OP_LESSOREQUALS,                                 false, true, true)            }        };        if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                    q4,                   null, ScanController.NA,                   8, 11, init_order))        {            ret_val = false;        }        //        //  +---------------------------------------------------------+        //  |pred  |start|key|stop |key|rows returned |rows locked    |        //  |      |value|op |value|op |              |(serialization)|        //  +------+-----+---+-----+---+--------------+---------------+        // 	|x < 5 |null |   |{5}  |GE |{1,1} .. {4,6}|first .. {4,6} |        //  +-----------------------------------------+---------------+        progress("qual scan (x < 5)");        qual_col1.setValue(5);        Qualifier q5[][] =         {            {                new QualifierUtil(0, qual_col1,                                Orderable.ORDER_OP_LESSTHAN,                                 false, true, true)            }        };        if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                    q5,                   null, ScanController.NA,                   5, 11, init_order))        {            ret_val = false;        }        //  +------------------------------------------------------------------+        //  |pred             |start|key|stop |key|rows returned|rows locked   |        //  |                 |value|op |value|op |             |(serialized)  |        //  +-----------------+------+--+-----+--+--------------+--------------+	    //  |x >= 5 and x <= 7|{5},  |GE|{7}  |GT|{5,2} .. {7,1}|{4,6} .. {7,1}|        // 	+------------------------------------------------------------------+        progress("qual scan (x >= 5 and x <= 7)");        qual_col1.setValue(5);        qual_col2.setValue(7);        Qualifier q6[][] = {            {                new QualifierUtil(0, qual_col1,                            Orderable.ORDER_OP_LESSTHAN,                             true, true, true),                new QualifierUtil(0, qual_col2,                            Orderable.ORDER_OP_LESSOREQUALS,                             false, true, true)            }        };        if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q6,                   null, ScanController.NA,                   5, 16, init_order))        {            ret_val = false;        }        // passing qualifier in q6[0][0], q6[0][1] should evaluate same as         // passing in q6[0][0], q6[1][0]        //  +------------------------------------------------------------------+        //  |pred             |start|key|stop |key|rows returned|rows locked   |        //  |                 |value|op |value|op |             |(serialized)  |        //  +-----------------+------+--+-----+--+--------------+--------------+	    //  |x >= 5 and x <= 7|{5},  |GE|{7}  |GT|{5,2} .. {7,1}|{4,6} .. {7,1}|        // 	+------------------------------------------------------------------+        progress("qual scan (x >= 5 and x <= 7)");        qual_col1.setValue(5);        qual_col2.setValue(7);        Qualifier q6_2[][] = {            {                new QualifierUtil(0, qual_col1,                            Orderable.ORDER_OP_LESSTHAN,                             true, true, true)            },            {                new QualifierUtil(0, qual_col2,                            Orderable.ORDER_OP_LESSOREQUALS,                             false, true, true)            }        };        if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q6_2,                   null, ScanController.NA,                   5, 16, init_order))        {            ret_val = false;        }        //  +------------------------------------------------------------------+        //  |pred             |start|key|stop |key|rows returned|rows locked   |        //  |                 |value|op |value|op |             |(serialized)  |        //  +-----------------+------+--+-----+--+--------------+--------------+	    //  |x = 5 and y > 2  |{5,2} |GT|{5}  |GT|{5,4} .. {5,6}|{5,2} .. {9,1}|        // 	+------------------------------------------------------------------+        progress("qual scan (x = 5 and y > 2)");        qual_col1.setValue(5);        qual_col2.setValue(2);        Qualifier q7[][] = {            {                new QualifierUtil(0, qual_col1,                            Orderable.ORDER_OP_EQUALS,                             false, true, true),                new QualifierUtil(1, qual_col2,                            Orderable.ORDER_OP_LESSOREQUALS,                             true, true, true)            }        };        if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q7,                   null, ScanController.NA,                   2, 17, init_order))        {            ret_val = false;        }        //  +------------------------------------------------------------------+        //  |pred             |start|key|stop |key|rows returned|rows locked   |        //  |                 |value|op |value|op |             |(serialized)  |        //  +-----------------+------+--+-----+--+--------------+--------------+        // 	|x = 5 and y >= 2 | {5,2}|GE| {5} |GT|{5,2} .. {5,6}|{4,6} .. {9,1}|        // 	+------------------------------------------------------------------+        progress("qual scan (x = 5 and y >= 2)");        qual_col1.setValue(5);        qual_col2.setValue(2);        Qualifier q8[][] = {            {                new QualifierUtil(0, qual_col1,                            Orderable.ORDER_OP_EQUALS,                             false, true, true),                new QualifierUtil(1, qual_col2,                            Orderable.ORDER_OP_LESSTHAN,                             true, true, true)            }        };        if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q8,                   null, ScanController.NA,                   3, 16, init_order))        {            ret_val = false;        }        //  +------------------------------------------------------------------+        //  |pred             |start|key|stop |key|rows returned|rows locked   |        //  |                 |value|op |value|op |             |(serialized)  |        //  +-----------------+------+--+-----+--+--------------+--------------+        // 	|x = 5 and y < 5  | {5}  |GE|{5,5}|GE|{5,2} .. {5,4}|{4,6} .. {5,4}|        // 	+------------------------------------------------------------------+        progress("qual scan (x = 5 and y < 5)");        qual_col1.setValue(5);        qual_col2.setValue(5);        Qualifier q9[][] = {            {                 new QualifierUtil(0, qual_col1,                            Orderable.ORDER_OP_EQUALS,                             false, true, true),                new QualifierUtil(1, qual_col1,                            Orderable.ORDER_OP_LESSTHAN,                             false, true, true)            }        };        if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q9,                   null, ScanController.NA,                   2, 16, init_order))        {            ret_val = false;        }        //  +------------------------------------------------------------------+        //  |pred             |start|key|stop |key|rows returned|rows locked   |        //  |                 |value|op |value|op |             |(serialized)  |        //  +-----------------+------+--+-----+--+--------------+--------------+        // 	|x = 2            | {2}  |GE| {2} |GT|none          |{1,1} .. {1,1}|        // 	+------------------------------------------------------------------+        progress("qual scan (x = 2)");        qual_col1.setValue(2);        Qualifier q10[][] = {            {                new QualifierUtil(0, qual_col1,                                Orderable.ORDER_OP_EQUALS,                                 false, true, true)            }        };        if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q10,                   null, ScanController.NA,                   0, 0, init_order))        {            ret_val = false;        }        //  +------------------------------------------------------------------+        //  |pred            |start|key|stop |key|rows returned |rows locked   |        //  |                |value|op |value|op |              |(serialized)  |        //  +----------------+-----+---+-----+-- +--------------+--------------+        // 	|x >= 5 or y = 6 | null|   | null|   |{4,6} .. {9,1}|{1,1} .. {9,1}|        // 	+------------------------------------------------------------------+        progress("qual scan (x >= 5) or (y = 6)");        qual_col1.setValue(5);        qual_col2.setValue(6);        Qualifier q11[][] =  new Qualifier[2][];        q11[0] = new Qualifier[0];        q11[1] = new Qualifier[2];        q11[1][0] =                 new QualifierUtil(                        0, qual_col1,                        Orderable.ORDER_OP_GREATEROREQUALS,                         false, true, true);        q11[1][1] =                 new QualifierUtil(                        1, qual_col2,                        Orderable.ORDER_OP_EQUALS,                         false, true, true);                if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q11,                   null, ScanController.NA,                   7, 15, init_order))        {            ret_val = false;        }        //  +------------------------------------------------------------------+        //  |pred            |start|key|stop |key|rows returned |rows locked   |        //  |                |value|op |value|op |              |(serialized)  |        //  +----------------+-----+---+-----+-- +--------------+--------------+        // 	|(x = 1 or y = 1 or y = 6)|        // 	|     and        |        // 	|(x > 5 or y = 1)|        // 	|     and        |        // 	|(x = 9 or x = 7)|null |   | null|   |{7,1} .. {9,1}|{1,1} .. {9,1}|        // 	+------------------------------------------------------------------+        progress("qual scan (x = 1 or y = 1 or y = 6) and (x > 5 or y = 1) and (x = 9 or x = 7)");        qual_col1.setValue(1);        qual_col2.setValue(1);        qual_col3.setValue(6);        qual_col4.setValue(5);        qual_col5.setValue(1);        qual_col6.setValue(9);        qual_col7.setValue(7);        Qualifier q12[][] = new Qualifier[4][];        q12[0] = new Qualifier[0];        q12[1] = new Qualifier[3];        q12[2] = new Qualifier[2];        q12[3] = new Qualifier[2];        q12[1][0] =             new QualifierUtil(                    0, qual_col1,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q12[1][1] =             new QualifierUtil(                    1, qual_col2,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q12[1][2] =             new QualifierUtil(                    1, qual_col3,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q12[2][0] =             new QualifierUtil(                    0, qual_col4,                    Orderable.ORDER_OP_GREATERTHAN,                     false, true, true);        q12[2][1] =             new QualifierUtil(                    1, qual_col5,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q12[3][0] =             new QualifierUtil(                    0, qual_col6,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q12[3][1] =             new QualifierUtil(                    0, qual_col7,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);                if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q12,                   null, ScanController.NA,                   2, 20, init_order))        {            ret_val = false;        }        //  +------------------------------------------------------------------+        //  |pred            |start|key|stop |key|rows returned |rows locked   |        //  |                |value|op |value|op |              |(serialized)  |        //  +----------------+-----+---+-----+-- +--------------+--------------+        // 	|(y = 4 or y = 1)|        // 	|     and        |        // 	|(x = 1 or x = 4 or x= 9)|        // 	|     and        |        // 	|(z = 15 or z = 14)|null |   | null|   |{4,4} .. {4,4}| ALL        |        // 	+------------------------------------------------------------------+        progress("qual scan (x = 1 or x = 4 or x= 9) and (y = 4 or y = 1) and (z = 15 or z = 14)");        qual_col1.setValue(4);        qual_col2.setValue(1);        qual_col3.setValue(1);        qual_col4.setValue(4);        qual_col5.setValue(9);        qual_col6.setValue(15);        qual_col7.setValue(14);        Qualifier q13[][] = new Qualifier[4][];        q13[0] = new Qualifier[0];        q13[1] = new Qualifier[2];        q13[2] = new Qualifier[3];        q13[3] = new Qualifier[2];        q13[1][0] =             new QualifierUtil(                    1, qual_col1,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q13[1][1] =             new QualifierUtil(                    1, qual_col2,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q13[2][0] =             new QualifierUtil(                    0, qual_col4,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q13[2][1] =             new QualifierUtil(                    0, qual_col5,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q13[2][2] =             new QualifierUtil(                    0, qual_col3,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q13[3][0] =             new QualifierUtil(                    2, qual_col6,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);        q13[3][1] =             new QualifierUtil(                    2, qual_col7,                    Orderable.ORDER_OP_EQUALS,                     false, true, true);                if (!t_scan(tc, conglomid, openscan_template, fetch_template,                   null, ScanController.NA,                   q13,                   null, ScanController.NA,                   1, 14, init_order))        {            ret_val = false;        }        tc.commit();        progress("Ending t_testqual");        return(ret_val);    }	private static boolean fail(String msg)        throws T_Fail	{        throw T_Fail.testFailMsg("T_QualifierTest failure: " + msg);	}	private void progress(String msg)	{		this.init_out.println("T_QualifierTest progress: " + msg);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -