Example usage for org.hibernate.dialect.function NoArgSQLFunction NoArgSQLFunction

List of usage examples for org.hibernate.dialect.function NoArgSQLFunction NoArgSQLFunction

Introduction

In this page you can find the example usage for org.hibernate.dialect.function NoArgSQLFunction NoArgSQLFunction.

Prototype

public NoArgSQLFunction(String name, Type returnType, boolean hasParenthesesIfNoArguments) 

Source Link

Document

Constructs a NoArgSQLFunction

Usage

From source file:com.allinfinance.hibernate.dialect.OracleDialect.java

License:Open Source License

public OracleDialect() {
    super();//from   www .  j  a  v a 2s .c  o  m
    registerColumnType(Types.BIT, "number(1,0)");
    registerColumnType(Types.BIGINT, "number(19,0)");
    registerColumnType(Types.SMALLINT, "number(5,0)");
    registerColumnType(Types.TINYINT, "number(3,0)");
    registerColumnType(Types.INTEGER, "number(10,0)");
    registerColumnType(Types.CHAR, "char(1 char)");
    registerColumnType(Types.VARCHAR, 4000, "varchar2($l char)");
    registerColumnType(Types.VARCHAR, "long");
    registerColumnType(Types.FLOAT, "float");
    registerColumnType(Types.DOUBLE, "double precision");
    registerColumnType(Types.DATE, "date");
    registerColumnType(Types.TIME, "date");
    registerColumnType(Types.TIMESTAMP, "timestamp");
    registerColumnType(Types.VARBINARY, 2000, "raw($l)");
    registerColumnType(Types.VARBINARY, "long raw");
    registerColumnType(Types.NUMERIC, "number($p,$s)");
    registerColumnType(Types.BLOB, "blob");
    registerColumnType(Types.CLOB, "clob");
    /** shen_antonio. */
    registerHibernateType(Types.CHAR, Hibernate.STRING.getName());

    getDefaultProperties().setProperty(Environment.USE_STREAMS_FOR_BINARY, "true");
    getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE);

    registerFunction("abs", new StandardSQLFunction("abs"));
    registerFunction("sign", new StandardSQLFunction("sign", Hibernate.INTEGER));

    registerFunction("acos", new StandardSQLFunction("acos", Hibernate.DOUBLE));
    registerFunction("asin", new StandardSQLFunction("asin", Hibernate.DOUBLE));
    registerFunction("atan", new StandardSQLFunction("atan", Hibernate.DOUBLE));
    registerFunction("cos", new StandardSQLFunction("cos", Hibernate.DOUBLE));
    registerFunction("cosh", new StandardSQLFunction("cosh", Hibernate.DOUBLE));
    registerFunction("exp", new StandardSQLFunction("exp", Hibernate.DOUBLE));
    registerFunction("ln", new StandardSQLFunction("ln", Hibernate.DOUBLE));
    registerFunction("sin", new StandardSQLFunction("sin", Hibernate.DOUBLE));
    registerFunction("sinh", new StandardSQLFunction("sinh", Hibernate.DOUBLE));
    registerFunction("stddev", new StandardSQLFunction("stddev", Hibernate.DOUBLE));
    registerFunction("sqrt", new StandardSQLFunction("sqrt", Hibernate.DOUBLE));
    registerFunction("tan", new StandardSQLFunction("tan", Hibernate.DOUBLE));
    registerFunction("tanh", new StandardSQLFunction("tanh", Hibernate.DOUBLE));
    registerFunction("variance", new StandardSQLFunction("variance", Hibernate.DOUBLE));

    registerFunction("round", new StandardSQLFunction("round"));
    registerFunction("trunc", new StandardSQLFunction("trunc"));
    registerFunction("ceil", new StandardSQLFunction("ceil"));
    registerFunction("floor", new StandardSQLFunction("floor"));

    /** shen_antoni. */
    registerFunction("chr", new StandardSQLFunction("chr", Hibernate.CHARACTER));
    registerFunction("initcap", new StandardSQLFunction("initcap"));
    registerFunction("lower", new StandardSQLFunction("lower"));
    registerFunction("ltrim", new StandardSQLFunction("ltrim"));
    registerFunction("rtrim", new StandardSQLFunction("rtrim"));
    registerFunction("soundex", new StandardSQLFunction("soundex"));
    registerFunction("upper", new StandardSQLFunction("upper"));
    registerFunction("ascii", new StandardSQLFunction("ascii", Hibernate.INTEGER));
    registerFunction("length", new StandardSQLFunction("length", Hibernate.LONG));

    registerFunction("to_char", new StandardSQLFunction("to_char", Hibernate.STRING));
    registerFunction("to_date", new StandardSQLFunction("to_date", Hibernate.TIMESTAMP));

    registerFunction("current_date", new NoArgSQLFunction("current_date", Hibernate.DATE, false));
    registerFunction("current_time", new NoArgSQLFunction("current_timestamp", Hibernate.TIME, false));
    registerFunction("current_timestamp",
            new NoArgSQLFunction("current_timestamp", Hibernate.TIMESTAMP, false));

    registerFunction("lastday", new StandardSQLFunction("lastday", Hibernate.DATE));
    registerFunction("sysdate", new NoArgSQLFunction("sysdate", Hibernate.DATE, false));
    registerFunction("systimestamp", new NoArgSQLFunction("systimestamp", Hibernate.TIMESTAMP, false));
    registerFunction("uid", new NoArgSQLFunction("uid", Hibernate.INTEGER, false));
    registerFunction("user", new NoArgSQLFunction("user", Hibernate.STRING, false));

    registerFunction("rowid", new NoArgSQLFunction("rowid", Hibernate.LONG, false));
    registerFunction("rownum", new NoArgSQLFunction("rownum", Hibernate.LONG, false));

    // Multi-param string dialect functions...
    registerFunction("concat", new VarArgsSQLFunction(Hibernate.STRING, "", "||", ""));
    registerFunction("instr", new StandardSQLFunction("instr", Hibernate.INTEGER));
    registerFunction("instrb", new StandardSQLFunction("instrb", Hibernate.INTEGER));
    registerFunction("lpad", new StandardSQLFunction("lpad", Hibernate.STRING));
    registerFunction("replace", new StandardSQLFunction("replace", Hibernate.STRING));
    registerFunction("rpad", new StandardSQLFunction("rpad", Hibernate.STRING));
    registerFunction("substr", new StandardSQLFunction("substr", Hibernate.STRING));
    registerFunction("substrb", new StandardSQLFunction("substrb", Hibernate.STRING));
    registerFunction("translate", new StandardSQLFunction("translate", Hibernate.STRING));

    registerFunction("substring", new StandardSQLFunction("substr", Hibernate.STRING));
    registerFunction("locate", new StandardSQLFunction("instr", Hibernate.INTEGER));
    registerFunction("bit_length", new SQLFunctionTemplate(Hibernate.INTEGER, "vsize(?1)*8"));
    registerFunction("coalesce", new NvlFunction());

    // Multi-param numeric dialect functions...
    registerFunction("atan2", new StandardSQLFunction("atan2", Hibernate.FLOAT));
    registerFunction("log", new StandardSQLFunction("log", Hibernate.INTEGER));
    registerFunction("mod", new StandardSQLFunction("mod", Hibernate.INTEGER));
    registerFunction("nvl", new StandardSQLFunction("nvl"));
    registerFunction("nvl2", new StandardSQLFunction("nvl2"));
    registerFunction("power", new StandardSQLFunction("power", Hibernate.FLOAT));

    // Multi-param date dialect functions...
    registerFunction("add_months", new StandardSQLFunction("add_months", Hibernate.DATE));
    registerFunction("months_between", new StandardSQLFunction("months_between", Hibernate.FLOAT));
    registerFunction("next_day", new StandardSQLFunction("next_day", Hibernate.DATE));

    registerFunction("str", new StandardSQLFunction("to_char", Hibernate.STRING));
}

From source file:org.jboss.as.quickstart.hibernate4.util.vertica.VerticaDialect6.java

License:Open Source License

protected void registerFunctions() {
    registerFunction("abs", new StandardSQLFunction("abs"));
    registerFunction("sign", new StandardSQLFunction("sign", StandardBasicTypes.INTEGER));

    registerFunction("acos", new StandardSQLFunction("acos", StandardBasicTypes.DOUBLE));
    registerFunction("asin", new StandardSQLFunction("asin", StandardBasicTypes.DOUBLE));
    registerFunction("atan", new StandardSQLFunction("atan", StandardBasicTypes.DOUBLE));
    registerFunction("cos", new StandardSQLFunction("cos", StandardBasicTypes.DOUBLE));
    registerFunction("exp", new StandardSQLFunction("exp", StandardBasicTypes.DOUBLE));
    registerFunction("ln", new StandardSQLFunction("ln", StandardBasicTypes.DOUBLE));
    registerFunction("sin", new StandardSQLFunction("sin", StandardBasicTypes.DOUBLE));
    registerFunction("stddev", new StandardSQLFunction("stddev", StandardBasicTypes.DOUBLE));
    registerFunction("sqrt", new StandardSQLFunction("sqrt", StandardBasicTypes.DOUBLE));
    registerFunction("tan", new StandardSQLFunction("tan", StandardBasicTypes.DOUBLE));
    registerFunction("variance", new StandardSQLFunction("variance", StandardBasicTypes.DOUBLE));

    registerFunction("round", new StandardSQLFunction("round"));
    registerFunction("trunc", new StandardSQLFunction("trunc"));
    registerFunction("ceil", new StandardSQLFunction("ceil"));
    registerFunction("floor", new StandardSQLFunction("floor"));

    registerFunction("chr", new StandardSQLFunction("chr", StandardBasicTypes.CHARACTER));
    registerFunction("initcap", new StandardSQLFunction("initcap"));
    registerFunction("lower", new StandardSQLFunction("lower"));
    registerFunction("ltrim", new StandardSQLFunction("ltrim"));
    registerFunction("rtrim", new StandardSQLFunction("rtrim"));
    registerFunction("upper", new StandardSQLFunction("upper"));
    registerFunction("ascii", new StandardSQLFunction("ascii", StandardBasicTypes.INTEGER));

    registerFunction("to_char", new StandardSQLFunction("to_char", StandardBasicTypes.STRING));
    registerFunction("to_date", new StandardSQLFunction("to_date", StandardBasicTypes.TIMESTAMP));

    registerFunction("current_date", new NoArgSQLFunction("current_date", StandardBasicTypes.DATE, false));
    registerFunction("current_time", new NoArgSQLFunction("current_timestamp", StandardBasicTypes.TIME, false));
    registerFunction("current_timestamp",
            new NoArgSQLFunction("current_timestamp", StandardBasicTypes.TIMESTAMP, false));

    registerFunction("last_day", new StandardSQLFunction("last_day", StandardBasicTypes.DATE));
    registerFunction("sysdate", new NoArgSQLFunction("sysdate", StandardBasicTypes.DATE, false));
    registerFunction("user", new NoArgSQLFunction("user", StandardBasicTypes.STRING, false));

    // Multi-param string dialect functions...
    registerFunction("concat", new VarArgsSQLFunction(StandardBasicTypes.STRING, "", "||", ""));
    registerFunction("instr", new StandardSQLFunction("instr", StandardBasicTypes.INTEGER));
    registerFunction("instrb", new StandardSQLFunction("instrb", StandardBasicTypes.INTEGER));
    registerFunction("lpad", new StandardSQLFunction("lpad", StandardBasicTypes.STRING));
    registerFunction("replace", new StandardSQLFunction("replace", StandardBasicTypes.STRING));
    registerFunction("rpad", new StandardSQLFunction("rpad", StandardBasicTypes.STRING));
    registerFunction("substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING));
    registerFunction("substrb", new StandardSQLFunction("substrb", StandardBasicTypes.STRING));
    registerFunction("translate", new StandardSQLFunction("translate", StandardBasicTypes.STRING));

    registerFunction("substring", new StandardSQLFunction("substr", StandardBasicTypes.STRING));
    registerFunction("bit_length", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "vsize(?1)*8"));
    registerFunction("coalesce", new NvlFunction());

    // Multi-param numeric dialect functions...
    registerFunction("atan2", new StandardSQLFunction("atan2", StandardBasicTypes.FLOAT));
    registerFunction("log", new StandardSQLFunction("log", StandardBasicTypes.INTEGER));
    registerFunction("mod", new StandardSQLFunction("mod", StandardBasicTypes.INTEGER));
    registerFunction("nvl", new StandardSQLFunction("nvl"));
    registerFunction("nvl2", new StandardSQLFunction("nvl2"));
    registerFunction("power", new StandardSQLFunction("power", StandardBasicTypes.FLOAT));

    // Multi-param date dialect functions...
    registerFunction("add_months", new StandardSQLFunction("add_months", StandardBasicTypes.DATE));
    registerFunction("months_between", new StandardSQLFunction("months_between", StandardBasicTypes.FLOAT));
    registerFunction("next_day", new StandardSQLFunction("next_day", StandardBasicTypes.DATE));

}

From source file:virtuoso.hibernate.VirtuosoDialect.java

License:Open Source License

public VirtuosoDialect() {
    super();/*from   ww w. j a v  a 2  s  .  c o m*/

    registerColumnType(Types.BIT, "SMALLINT");
    registerColumnType(Types.TINYINT, "SMALLINT");
    registerColumnType(Types.SMALLINT, "SMALLINT");
    registerColumnType(Types.INTEGER, "INTEGER");

    registerColumnType(Types.BIGINT, "DECIMAL(20,0)");

    registerColumnType(Types.REAL, "REAL");
    registerColumnType(Types.FLOAT, "FLOAT");
    registerColumnType(Types.DOUBLE, "DOUBLE PRECISION");
    registerColumnType(Types.NUMERIC, "DECIMAL($p, $s)");
    registerColumnType(Types.DECIMAL, "DECIMAL($p, $s)");
    registerColumnType(Types.BINARY, 2000, "BINARY($l)");
    registerColumnType(Types.VARBINARY, 2000, "VARBINARY($l)");
    registerColumnType(Types.LONGVARBINARY, "LONG VARBINARY");
    registerColumnType(Types.CHAR, 2000, "CHARACTER($l)");
    registerColumnType(Types.VARCHAR, 2000, "VARCHAR($l)");
    registerColumnType(Types.LONGVARCHAR, "LONG VARCHAR");
    registerColumnType(Types.DATE, "DATE");
    registerColumnType(Types.TIME, "TIME");
    registerColumnType(Types.TIMESTAMP, "DATETIME");

    registerColumnType(Types.BLOB, "LONG VARBINARY");
    registerColumnType(Types.CLOB, "LONG VARCHAR");

    ///===================

    registerFunction("iszero", new StandardSQLFunction("iszero", StandardBasicTypes.INTEGER));
    registerFunction("atod", new StandardSQLFunction("atod", StandardBasicTypes.DOUBLE));
    registerFunction("atof", new StandardSQLFunction("atof", StandardBasicTypes.FLOAT));
    registerFunction("atoi", new StandardSQLFunction("atoi", StandardBasicTypes.INTEGER));

    registerFunction("mod", new StandardSQLFunction("mod"));
    registerFunction("abs", new StandardSQLFunction("abs"));
    registerFunction("sign", new StandardSQLFunction("sign", StandardBasicTypes.DOUBLE));
    registerFunction("acos", new StandardSQLFunction("acos", StandardBasicTypes.DOUBLE));
    registerFunction("asin", new StandardSQLFunction("asin", StandardBasicTypes.DOUBLE));
    registerFunction("atan", new StandardSQLFunction("atan", StandardBasicTypes.DOUBLE));
    registerFunction("cos", new StandardSQLFunction("cos", StandardBasicTypes.DOUBLE));
    registerFunction("sin", new StandardSQLFunction("sin", StandardBasicTypes.DOUBLE));
    registerFunction("tan", new StandardSQLFunction("tan", StandardBasicTypes.DOUBLE));
    registerFunction("cot", new StandardSQLFunction("cot", StandardBasicTypes.DOUBLE));
    registerFunction("frexp", new StandardSQLFunction("frexp", StandardBasicTypes.DOUBLE));
    registerFunction("degrees", new StandardSQLFunction("degrees", StandardBasicTypes.DOUBLE));
    registerFunction("radians", new StandardSQLFunction("radians", StandardBasicTypes.DOUBLE));
    registerFunction("exp", new StandardSQLFunction("exp", StandardBasicTypes.DOUBLE));
    registerFunction("log", new StandardSQLFunction("log", StandardBasicTypes.DOUBLE));
    registerFunction("log10", new StandardSQLFunction("log10", StandardBasicTypes.DOUBLE));
    registerFunction("sqrt", new StandardSQLFunction("sqrt", StandardBasicTypes.DOUBLE));
    registerFunction("atan2", new StandardSQLFunction("atan2", StandardBasicTypes.DOUBLE));
    registerFunction("power", new StandardSQLFunction("power", StandardBasicTypes.DOUBLE));
    registerFunction("ceiling", new StandardSQLFunction("ceiling", StandardBasicTypes.INTEGER));
    registerFunction("floor", new StandardSQLFunction("floor", StandardBasicTypes.INTEGER));
    registerFunction("pi", new NoArgSQLFunction("pi", StandardBasicTypes.DOUBLE, true));
    registerFunction("round", new StandardSQLFunction("round", StandardBasicTypes.DOUBLE));
    registerFunction("rand", new StandardSQLFunction("rand"));
    registerFunction("rnd", new StandardSQLFunction("rnd"));
    registerFunction("randomize", new StandardSQLFunction("randomize"));

    registerFunction("hash", new StandardSQLFunction("hash", StandardBasicTypes.INTEGER));
    registerFunction("md5_box", new StandardSQLFunction("md5_box", StandardBasicTypes.STRING));
    registerFunction("box_hash", new StandardSQLFunction("box_hash", StandardBasicTypes.INTEGER));
    /* Bitwise: */
    registerFunction("bit_and", new StandardSQLFunction("bit_and", StandardBasicTypes.INTEGER));
    registerFunction("bit_or", new StandardSQLFunction("bit_or", StandardBasicTypes.INTEGER));
    registerFunction("bit_xor", new StandardSQLFunction("bit_xor", StandardBasicTypes.INTEGER));
    registerFunction("bit_not", new StandardSQLFunction("bit_not", StandardBasicTypes.INTEGER));
    registerFunction("bit_shift", new StandardSQLFunction("bit_shift", StandardBasicTypes.INTEGER));

    // undef=>TRUNCATE
    registerFunction("length", new StandardSQLFunction("length", StandardBasicTypes.INTEGER));
    registerFunction("char_length", new StandardSQLFunction("char_length", StandardBasicTypes.INTEGER));
    registerFunction("character_length",
            new StandardSQLFunction("character_length", StandardBasicTypes.INTEGER));
    registerFunction("octet_length", new StandardSQLFunction("octet_length", StandardBasicTypes.INTEGER));

    registerFunction("ascii", new StandardSQLFunction("ascii", StandardBasicTypes.INTEGER));
    registerFunction("chr", new StandardSQLFunction("chr", StandardBasicTypes.CHARACTER));
    registerFunction("chr1", new StandardSQLFunction("chr1", StandardBasicTypes.CHARACTER));
    registerFunction("subseq", new StandardSQLFunction("subseq", StandardBasicTypes.STRING));
    registerFunction("substring", new StandardSQLFunction("substring", StandardBasicTypes.STRING));
    registerFunction("left", new StandardSQLFunction("left", StandardBasicTypes.STRING));
    registerFunction("right", new StandardSQLFunction("right", StandardBasicTypes.STRING));
    registerFunction("ltrim", new StandardSQLFunction("ltrim", StandardBasicTypes.STRING));
    registerFunction("rtrim", new StandardSQLFunction("rtrim", StandardBasicTypes.STRING));
    registerFunction("trim", new StandardSQLFunction("trim", StandardBasicTypes.STRING));

    registerFunction("repeat", new StandardSQLFunction("repeat", StandardBasicTypes.STRING));
    registerFunction("space", new StandardSQLFunction("space", StandardBasicTypes.STRING));

    registerFunction("make_string", new StandardSQLFunction("make_string", StandardBasicTypes.STRING));
    registerFunction("make_wstring", new StandardSQLFunction("make_wstring", StandardBasicTypes.STRING));
    registerFunction("make_bin_string", new StandardSQLFunction("make_bin_string", StandardBasicTypes.BINARY));
    registerFunction("concatenate", new StandardSQLFunction("concatenate", StandardBasicTypes.STRING));

    registerFunction("concat", new StandardSQLFunction("concat", StandardBasicTypes.STRING));
    registerFunction("replace", new StandardSQLFunction("replace", StandardBasicTypes.STRING));

    registerFunction("sprintf", new StandardSQLFunction("sprintf", StandardBasicTypes.STRING));
    registerFunction("sprintf_or_null", new StandardSQLFunction("sprintf_or_null", StandardBasicTypes.STRING));
    registerFunction("sprintf_iri", new StandardSQLFunction("sprintf_iri", StandardBasicTypes.STRING));
    registerFunction("sprintf_iri_or_null",
            new StandardSQLFunction("sprintf_iri_or_null", StandardBasicTypes.STRING));

    registerFunction("strchr", new StandardSQLFunction("strchr", StandardBasicTypes.INTEGER));
    registerFunction("strrchr", new StandardSQLFunction("strrchr", StandardBasicTypes.INTEGER));
    registerFunction("strstr", new StandardSQLFunction("strstr", StandardBasicTypes.INTEGER));
    registerFunction("strindex", new StandardSQLFunction("strindex", StandardBasicTypes.INTEGER));
    registerFunction("strcasestr", new StandardSQLFunction("strcasestr", StandardBasicTypes.INTEGER));
    registerFunction("locate", new StandardSQLFunction("locate", StandardBasicTypes.INTEGER));
    registerFunction("matches_like", new StandardSQLFunction("matches_like", StandardBasicTypes.INTEGER));

    registerFunction("__like_min", new StandardSQLFunction("__like_min", StandardBasicTypes.STRING));
    registerFunction("__like_max", new StandardSQLFunction("__like_max", StandardBasicTypes.STRING));
    registerFunction("fix_identifier_case",
            new StandardSQLFunction("fix_identifier_case", StandardBasicTypes.STRING));
    registerFunction("casemode_strcmp", new StandardSQLFunction("casemode_strcmp", StandardBasicTypes.INTEGER));

    registerFunction("lcase", new StandardSQLFunction("lcase", StandardBasicTypes.STRING));
    registerFunction("lower", new StandardSQLFunction("lower", StandardBasicTypes.STRING));
    registerFunction("ucase", new StandardSQLFunction("ucase", StandardBasicTypes.STRING));
    registerFunction("upper", new StandardSQLFunction("upper", StandardBasicTypes.STRING));
    registerFunction("initcap", new StandardSQLFunction("initcap", StandardBasicTypes.STRING));

    registerFunction("table_type", new StandardSQLFunction("table_type", StandardBasicTypes.STRING));
    registerFunction("internal_type_name",
            new StandardSQLFunction("internal_type_name", StandardBasicTypes.STRING));
    registerFunction("internal_type", new StandardSQLFunction("internal_type", StandardBasicTypes.INTEGER));
    registerFunction("isinteger", new StandardSQLFunction("isinteger", StandardBasicTypes.INTEGER));
    registerFunction("isnumeric", new StandardSQLFunction("isnumeric", StandardBasicTypes.INTEGER));
    registerFunction("isfloat", new StandardSQLFunction("isfloat", StandardBasicTypes.INTEGER));
    registerFunction("isdouble", new StandardSQLFunction("isdouble", StandardBasicTypes.INTEGER));
    registerFunction("isnull", new StandardSQLFunction("isnull", StandardBasicTypes.INTEGER));
    registerFunction("isnotnull", new StandardSQLFunction("isnotnull", StandardBasicTypes.INTEGER));
    registerFunction("isblob", new StandardSQLFunction("isblob", StandardBasicTypes.INTEGER));
    registerFunction("isentity", new StandardSQLFunction("isentity", StandardBasicTypes.INTEGER));
    registerFunction("isstring", new StandardSQLFunction("isstring", StandardBasicTypes.INTEGER));
    registerFunction("isbinary", new StandardSQLFunction("isbinary", StandardBasicTypes.INTEGER));
    registerFunction("isarray", new StandardSQLFunction("isarray", StandardBasicTypes.INTEGER));
    registerFunction("isiri_id", new StandardSQLFunction("isiri_id", StandardBasicTypes.INTEGER));
    registerFunction("is_named_iri_id", new StandardSQLFunction("is_named_iri_id", StandardBasicTypes.INTEGER));
    registerFunction("is_bnode_iri_id", new StandardSQLFunction("is_bnode_iri_id", StandardBasicTypes.INTEGER));
    registerFunction("isuname", new StandardSQLFunction("isuname", StandardBasicTypes.INTEGER));

    registerFunction("username", new NoArgSQLFunction("username", StandardBasicTypes.STRING, true));
    registerFunction("dbname", new NoArgSQLFunction("dbname", StandardBasicTypes.STRING, true));
    registerFunction("ifnull", new VarArgsSQLFunction("ifnull(", ",", ")"));
    registerFunction("get_user", new NoArgSQLFunction("get_user", StandardBasicTypes.STRING, true));

    registerFunction("dayname", new StandardSQLFunction("dayname", StandardBasicTypes.STRING));
    registerFunction("monthname", new StandardSQLFunction("monthname", StandardBasicTypes.STRING));
    registerFunction("now", new NoArgSQLFunction("now", StandardBasicTypes.TIMESTAMP));
    registerFunction("curdate", new NoArgSQLFunction("curdate", StandardBasicTypes.DATE));
    registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth", StandardBasicTypes.INTEGER));
    registerFunction("dayofweek", new StandardSQLFunction("dayofweek", StandardBasicTypes.INTEGER));
    registerFunction("dayofyear", new StandardSQLFunction("dayofyear", StandardBasicTypes.INTEGER));
    registerFunction("quarter", new StandardSQLFunction("quarter", StandardBasicTypes.INTEGER));
    registerFunction("week", new StandardSQLFunction("week", StandardBasicTypes.INTEGER));
    registerFunction("month", new StandardSQLFunction("month", StandardBasicTypes.INTEGER));
    registerFunction("year", new StandardSQLFunction("year", StandardBasicTypes.INTEGER));
    registerFunction("hour", new StandardSQLFunction("hour", StandardBasicTypes.INTEGER));
    registerFunction("minute", new StandardSQLFunction("minute", StandardBasicTypes.INTEGER));
    registerFunction("second", new StandardSQLFunction("second", StandardBasicTypes.INTEGER));
    registerFunction("timezone", new StandardSQLFunction("timezone", StandardBasicTypes.INTEGER));
    registerFunction("curtime", new StandardSQLFunction("curtime", StandardBasicTypes.TIME));
    registerFunction("getdate", new NoArgSQLFunction("getdate", StandardBasicTypes.TIMESTAMP));
    registerFunction("curdatetime", new NoArgSQLFunction("curdatetime", StandardBasicTypes.TIMESTAMP));

    registerFunction("datediff", new StandardSQLFunction("datediff", StandardBasicTypes.INTEGER));
    registerFunction("dateadd", new StandardSQLFunction("dateadd", StandardBasicTypes.TIMESTAMP));
    registerFunction("timestampdiff", new StandardSQLFunction("timestampdiff", StandardBasicTypes.INTEGER));
    registerFunction("timestampadd", new StandardSQLFunction("timestampadd", StandardBasicTypes.TIMESTAMP));

    //============================
    registerKeyword("top");
    registerKeyword("char");
    registerKeyword("int");
    registerKeyword("name");
    registerKeyword("string");
    registerKeyword("intnum");
    registerKeyword("approxnum");
    registerKeyword("ammsc");
    registerKeyword("parameter");
    registerKeyword("as");
    registerKeyword("or");
    registerKeyword("and");
    registerKeyword("not");
    registerKeyword("uminus");
    registerKeyword("all");
    registerKeyword("ammsc");
    registerKeyword("any");
    registerKeyword("attach");
    registerKeyword("asc");
    registerKeyword("authorization");
    registerKeyword("between");
    registerKeyword("by");
    registerKeyword("character");
    registerKeyword("check");
    registerKeyword("close");
    registerKeyword("commit");
    registerKeyword("continue");
    registerKeyword("create");
    registerKeyword("current");
    registerKeyword("cursor");
    registerKeyword("decimal");
    registerKeyword("declare");
    registerKeyword("default");
    registerKeyword("delete");
    registerKeyword("desc");
    registerKeyword("distinct");
    registerKeyword("double");
    registerKeyword("drop");
    registerKeyword("escape");
    registerKeyword("exists");
    registerKeyword("fetch");
    registerKeyword("float");
    registerKeyword("for");
    registerKeyword("foreign");
    registerKeyword("found");
    registerKeyword("from");
    registerKeyword("goto");
    registerKeyword("go");
    registerKeyword("grant ");
    registerKeyword("group");
    registerKeyword("having");
    registerKeyword("in");
    registerKeyword("index");
    registerKeyword("indicator");
    registerKeyword("insert");
    registerKeyword("integer");
    registerKeyword("into");
    registerKeyword("is");
    registerKeyword("key");
    registerKeyword("language");
    registerKeyword("like");
    registerKeyword("nullx");
    registerKeyword("numeric");
    registerKeyword("of");
    registerKeyword("on");
    registerKeyword("open");
    registerKeyword("option");
    registerKeyword("order");
    registerKeyword("precision");
    registerKeyword("primary");
    registerKeyword("privileges");
    registerKeyword("procedure");
    registerKeyword("public");
    registerKeyword("real");
    registerKeyword("references");
    registerKeyword("rollback");
    registerKeyword("schema");
    registerKeyword("select");
    registerKeyword("set");
    registerKeyword("smallint");
    registerKeyword("some");
    registerKeyword("sqlcode");
    registerKeyword("sqlerror");
    registerKeyword("table");
    registerKeyword("to");
    registerKeyword("union");
    registerKeyword("unique");
    registerKeyword("update");
    registerKeyword("user");
    registerKeyword("values");
    registerKeyword("view");
    registerKeyword("whenever");
    registerKeyword("where");
    registerKeyword("with");
    registerKeyword("work");
    registerKeyword("continues");
    registerKeyword("object_id");
    registerKeyword("under");
    registerKeyword("clustered");
    registerKeyword("varchar");
    registerKeyword("varbinary");
    registerKeyword("long");
    registerKeyword("replacing");
    registerKeyword("soft");
    registerKeyword("shutdown");
    registerKeyword("checkpoint");
    registerKeyword("backup");
    registerKeyword("replication");
    registerKeyword("sync");
    registerKeyword("alter");
    registerKeyword("add");
    registerKeyword("rename");
    registerKeyword("disconnect");
    registerKeyword("before");
    registerKeyword("after");
    registerKeyword("instead");
    registerKeyword("trigger");
    registerKeyword("referencing");
    registerKeyword("old");
    registerKeyword("procedure");
    registerKeyword("function");
    registerKeyword("out");
    registerKeyword("inout");
    registerKeyword("handler");
    registerKeyword("if");
    registerKeyword("then");
    registerKeyword("else");
    registerKeyword("elseif");
    registerKeyword("while");
    registerKeyword("beginx");
    registerKeyword("endx");
    registerKeyword("equals");
    registerKeyword("return");
    registerKeyword("call");
    registerKeyword("returns");
    registerKeyword("do");
    registerKeyword("exclusive");
    registerKeyword("prefetch");
    registerKeyword("sqlstate");
    registerKeyword("found");
    registerKeyword("revoke");
    registerKeyword("password");
    registerKeyword("off");
    registerKeyword("logx");
    registerKeyword("sqlstate");
    registerKeyword("timestamp");
    registerKeyword("date");
    registerKeyword("datetime");
    registerKeyword("time");
    registerKeyword("execute");
    registerKeyword("owner");
    registerKeyword("begin_fn_x");
    registerKeyword("begin_oj_x");
    registerKeyword("convert");
    registerKeyword("case");
    registerKeyword("when");
    registerKeyword("then");
    registerKeyword("identity");
    registerKeyword("left");
    registerKeyword("right");
    registerKeyword("full");
    registerKeyword("outer");
    registerKeyword("join");
    registerKeyword("use");

}