示例#1
0
 public void testLstmtMultilineArgs() throws ZException, ZQLException {
   ZQL zql = new ZQL("test hello\nworld");
   List<Z> zList = zql.compile();
   assertEquals(1, zList.size());
   Z q = zList.get(0);
   assertEquals("select *\nfrom () a\nlimit hello\nworld;", q.getQuery());
   q.release();
 }
示例#2
0
 public void testLstmtSimple() throws ZException, ZQLException {
   ZQL zql = new ZQL("test");
   List<Z> zList = zql.compile();
   assertEquals(1, zList.size());
   Z q = zList.get(0);
   assertEquals("select *\nfrom () a\nlimit ;", q.getQuery());
   q.release();
 }
示例#3
0
 public void testLstmtParamErb() throws ZException, ZQLException {
   ZQL zql = new ZQL("test(limit=<%='20'%>)");
   Z q = zql.compile().get(0);
   assertEquals("select *\nfrom () a\nlimit 20;", q.getQuery());
 }