1 2 12 package com.versant.core.jdbc.sql.exp; 13 14 import com.versant.core.util.CharBuf; 15 import com.versant.core.jdbc.sql.SqlDriver; 16 17 20 public class ExistsSelectExp extends SelectExp { 21 22 public ExistsSelectExp() { 23 } 24 25 public String toString() { 26 return super.toString(); 27 } 28 29 public SqlExp createInstance() { 30 return new ExistsSelectExp(); 31 } 32 33 40 public void appendSQLImp(SqlDriver driver, CharBuf s, SqlExp leftSibling) { 41 s.append("exists ("); 42 super.appendSQLImp(driver, s, leftSibling); 43 s.append(')'); 44 } 45 46 49 protected void finishSelectList(CharBuf s, int start) { 50 int n = s.size() - start; 51 if (n <= 7) { 52 s.append('1'); 53 } else { 54 s.setSize(n - 2); } 56 } 57 58 } 59 60 | Popular Tags |