1 28 29 package com.caucho.amber.expr.fun; 30 31 import com.caucho.amber.query.QueryParser; 32 import com.caucho.amber.type.SqlDateType; 33 import com.caucho.amber.type.Type; 34 import com.caucho.util.CharBuffer; 35 import com.caucho.util.L10N; 36 37 38 41 public class CurrentDateFunExpr extends DateTimeFunExpr { 42 private static final L10N L = new L10N(CurrentDateFunExpr.class); 43 44 47 protected CurrentDateFunExpr(QueryParser parser) 48 { 49 super(parser, "current_date", null, false); 50 } 51 52 public static FunExpr create(QueryParser parser) 53 { 54 return new CurrentDateFunExpr(parser); 55 } 56 57 60 public void generateWhere(CharBuffer cb) 61 { 62 cb.append("current_date"); 63 } 64 65 68 public void generateUpdateWhere(CharBuffer cb) 69 { 70 generateWhere(cb); 71 } 72 73 76 public Type getType() 77 { 78 return SqlDateType.create(); 79 } 80 } 81 | Popular Tags |