Package org.teiid.query.sql.symbol

Examples of org.teiid.query.sql.symbol.XMLSerialize


      assertEquals(DataTypeManager.DefaultDataClasses.STRING, f.getArg(3).getType());
    }
   
    @Test public void testXMLSerialize() throws Exception {
      String sql = "xmlserialize(DOCUMENT '<a/>' as clob)"; //$NON-NLS-1$
      XMLSerialize xs = (XMLSerialize)getExpression(sql);
      assertEquals(DataTypeManager.DefaultDataClasses.CLOB, xs.getType());
    }
View Full Code Here


      assertEquals(DataTypeManager.DefaultDataClasses.CLOB, xs.getType());
    }

    @Test(expected=QueryResolverException.class) public void testXMLSerialize_1() throws Exception {
      String sql = "xmlserialize(DOCUMENT 1 as clob)"; //$NON-NLS-1$
      XMLSerialize xs = (XMLSerialize)getExpression(sql);
      assertEquals(DataTypeManager.DefaultDataClasses.CLOB, xs.getType());
    }
View Full Code Here

        query.setFrom(new From(Arrays.asList(xt)));
        helpTest(sql, "SELECT * FROM XMLTABLE(XMLNAMESPACES(NO DEFAULT), '/' COLUMNS x FOR ORDINALITY, y date DEFAULT {d'2000-01-01'} PATH '@date') AS x", query);
    }
   
    @Test public void testXmlSerialize() throws Exception {
      XMLSerialize f = new XMLSerialize();
      f.setDocument(true);
      f.setExpression(new ElementSymbol("x"));
      f.setTypeString("CLOB");
      helpTestExpression("xmlserialize(document x as CLOB)", "XMLSERIALIZE(DOCUMENT x AS CLOB)", f);
    }
View Full Code Here

      f.setWellFormed(true);
      helpTestExpression("xmlparse(document x wellformed)", "XMLPARSE(DOCUMENT x WELLFORMED)", f);
    }
   
    @Test public void testXmlSerialize1() throws Exception {
      XMLSerialize f = new XMLSerialize();
      f.setExpression(new ElementSymbol("x"));
      f.setTypeString("CLOB");
      helpTestExpression("xmlserialize(x as CLOB)", "XMLSERIALIZE(x AS CLOB)", f);
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.symbol.XMLSerialize

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.