Project

General

Profile

« Previous | Next » 

Revision 2069

Added by Matt Jones about 20 years ago

Created new printExtendedSQL function that can get the extended
return fields using only xml_nodes and not xml_index. One
step closer to eliminating the dependence ofn xml_index.

View differences:

QuerySpecificationTest.java
96 96
    public void testPrintSQL()
97 97
    {
98 98
        try {
99
            System.out.println("----------------------");
99 100
            QuerySpecification qspec = new QuerySpecification(xml, 
100 101
                    MetaCatUtil.getOption("saxparser"), 
101 102
                    MetaCatUtil.getOption("accNumberSeparator"));
102
            System.out.println(qspec.printSQL(true));
103
            System.out.println(qspec.printSQL(false));
103 104
        } catch (IOException e) {
104 105
            fail(e.getMessage());
105 106
        }
......
111 112
    public void testPrintExtendedSQL()
112 113
    {
113 114
        try {
115
            System.out.println("----------------------");
114 116
            Hashtable controlPairs = new Hashtable();
115 117
            QuerySpecification qspec = new QuerySpecification(xml, 
116 118
                    MetaCatUtil.getOption("saxparser"), 
117 119
                    MetaCatUtil.getOption("accNumberSeparator"));
118
            System.out.println(qspec.printExtendedSQL("n.1.1, n.2.2", controlPairs));
120
            System.out.println(
121
                    qspec.printExtendedSQL("'obfs.45337', 'obfs.45338', 'obfs.45346'", 
122
                            controlPairs, false));
119 123
        } catch (IOException e) {
120 124
            fail(e.getMessage());
121 125
        }

Also available in: Unified diff