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

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

Introduction

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

Prototype

public VarArgsSQLFunction(Type registeredType, String begin, String sep, String end) 

Source Link

Document

Constructs a VarArgsSQLFunction instance with a 'static' return type.

Usage

From source file:net.sourceforge.squirrel_sql.fw.dialects.TeiidDialect.java

License:Open Source License

public TeiidDialect() {
    // Register types
    registerColumnType(Types.CHAR, "char"); //$NON-NLS-1$
    registerColumnType(Types.VARCHAR, "string"); //$NON-NLS-1$

    registerColumnType(Types.BIT, "boolean"); //$NON-NLS-1$
    registerColumnType(Types.TINYINT, "byte"); //$NON-NLS-1$
    registerColumnType(Types.SMALLINT, "short"); //$NON-NLS-1$
    registerColumnType(Types.INTEGER, "integer"); //$NON-NLS-1$
    registerColumnType(Types.BIGINT, "long"); //$NON-NLS-1$

    registerColumnType(Types.REAL, "float"); //$NON-NLS-1$
    registerColumnType(Types.FLOAT, "float"); //$NON-NLS-1$
    registerColumnType(Types.DOUBLE, "double"); //$NON-NLS-1$
    registerColumnType(Types.NUMERIC, "bigdecimal"); //$NON-NLS-1$

    registerColumnType(Types.DATE, "date"); //$NON-NLS-1$
    registerColumnType(Types.TIME, "time"); //$NON-NLS-1$
    registerColumnType(Types.TIMESTAMP, "timestamp"); //$NON-NLS-1$

    registerColumnType(Types.BLOB, "blob"); //$NON-NLS-1$
    registerColumnType(Types.VARBINARY, "blob"); //$NON-NLS-1$
    registerColumnType(Types.CLOB, "clob"); //$NON-NLS-1$
    registerColumnType(Types.JAVA_OBJECT, "object"); //$NON-NLS-1$

    registerFunction("acos", new StandardSQLFunction("acos", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("asin", new StandardSQLFunction("asin", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("atan", new StandardSQLFunction("atan", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("atan2", new StandardSQLFunction("atan2", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("ceil", new StandardSQLFunction("ceiling")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("cos", new StandardSQLFunction("cos", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("cot", new StandardSQLFunction("cot", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("degrees", new StandardSQLFunction("degrees", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("exp", new StandardSQLFunction("exp", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("floor", new StandardSQLFunction("floor")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatbigdecimal", new StandardSQLFunction("formatbigdecimal", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatbiginteger", new StandardSQLFunction("formatbiginteger", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatdouble", new StandardSQLFunction("formatdouble", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatfloat", new StandardSQLFunction("formatfloat", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatinteger", new StandardSQLFunction("formatinteger", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatlong", new StandardSQLFunction("formatlong", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("log", new StandardSQLFunction("log", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("mod", new StandardSQLFunction("mod")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsebigdecimal", new StandardSQLFunction("parsebigdecimal", Hibernate.BIG_DECIMAL)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsebiginteger", new StandardSQLFunction("parsebiginteger", Hibernate.BIG_INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsedouble", new StandardSQLFunction("parsedouble", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsefloat", new StandardSQLFunction("parsefloat", Hibernate.FLOAT)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parseinteger", new StandardSQLFunction("parseinteger", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parselong", new StandardSQLFunction("parselong", Hibernate.LONG)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("pi", new StandardSQLFunction("pi", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("power", new StandardSQLFunction("power", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("radians", new StandardSQLFunction("radians", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("round", new StandardSQLFunction("round")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("sign", new StandardSQLFunction("sign", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("sin", new StandardSQLFunction("sin", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("tan", new StandardSQLFunction("tan", Hibernate.DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("ascii", new StandardSQLFunction("ascii", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("chr", new StandardSQLFunction("chr", Hibernate.CHARACTER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("char", new StandardSQLFunction("char", Hibernate.CHARACTER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("concat", new VarArgsSQLFunction(Hibernate.STRING, "", "||", "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    registerFunction("initcap", new StandardSQLFunction("initcap", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("insert", new StandardSQLFunction("insert", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("lcase", new StandardSQLFunction("lcase", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("left", new StandardSQLFunction("left", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("locate", new StandardSQLFunction("locate", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("lpad", new StandardSQLFunction("lpad", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("ltrim", new StandardSQLFunction("ltrim", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("repeat", new StandardSQLFunction("repeat", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("replace", new StandardSQLFunction("replace", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("right", new StandardSQLFunction("right", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("rpad", new StandardSQLFunction("rpad", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("rtrim", new StandardSQLFunction("rtrim", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("substring", new StandardSQLFunction("substring", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("translate", new StandardSQLFunction("translate", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("ucase", new StandardSQLFunction("ucase", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("curdate", new NoArgSQLFunction("curdate", Hibernate.DATE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("curtime", new NoArgSQLFunction("curtime", Hibernate.TIME)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("now", new NoArgSQLFunction("now", Hibernate.TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("dayname", new StandardSQLFunction("dayname", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("dayofweek", new StandardSQLFunction("dayofweek", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("dayofyear", new StandardSQLFunction("dayofyear", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatdate", new StandardSQLFunction("formatdate", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formattime", new StandardSQLFunction("formattime", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formattimestamp", new StandardSQLFunction("formattimestamp", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("hour", new StandardSQLFunction("hour", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("minute", new StandardSQLFunction("minute", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("monthname", new StandardSQLFunction("monthname", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsedate", new StandardSQLFunction("parsedate", Hibernate.DATE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsetime", new StandardSQLFunction("parsetime", Hibernate.TIME)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsetimestamp", new StandardSQLFunction("parsetimestamp", Hibernate.TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("second", new StandardSQLFunction("second", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("timestampcreate", new StandardSQLFunction("timestampcreate", Hibernate.TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("timestampAdd", new StandardSQLFunction("timestampAdd")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("timestampDiff", new StandardSQLFunction("timestampDiff", Hibernate.LONG)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("week", new StandardSQLFunction("week", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("year", new StandardSQLFunction("year", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("modifytimezone", new StandardSQLFunction("modifytimezone", Hibernate.TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("convert", new StandardSQLFunction("convert")); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("to_bytes", new StandardSQLFunction("to_bytes", Hibernate.BLOB)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("to_chars", new StandardSQLFunction("to_chars", Hibernate.CLOB)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("from_unittime", new StandardSQLFunction("from_unittime", Hibernate.TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("session_id", new StandardSQLFunction("session_id", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("uuid", new StandardSQLFunction("uuid", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("unescape", new StandardSQLFunction("unescape", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("array_get", new StandardSQLFunction("uuid", Hibernate.OBJECT)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("array_length", new StandardSQLFunction("unescape", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
}

From source file:org.geoserver.hibernate.H2Dialect.java

License:Open Source License

public H2Dialect() {
    super();//from ww  w .  ja v  a 2  s .  com
    querySequenceString = "select sequence_name from information_schema.sequences";
    try {
        Class constants = ReflectHelper.classForName("org.h2.engine.Constants");
        Integer build = (Integer) constants.getDeclaredField("BUILD_ID").get(null);
        int buildId = build.intValue();
        if (buildId < 32) {
            querySequenceString = "select name from information_schema.sequences";
        }
    } catch (Throwable e) {
        // ignore (probably H2 not in the classpath)
    }

    registerColumnType(Types.BOOLEAN, "boolean");
    registerColumnType(Types.BIGINT, "bigint");
    registerColumnType(Types.BINARY, "binary");
    registerColumnType(Types.BIT, "boolean");
    registerColumnType(Types.CHAR, "varchar($l)");
    registerColumnType(Types.DATE, "date");
    registerColumnType(Types.DECIMAL, "decimal($p,$s)");
    registerColumnType(Types.DOUBLE, "double");
    registerColumnType(Types.FLOAT, "float");
    registerColumnType(Types.INTEGER, "integer");
    registerColumnType(Types.LONGVARBINARY, "longvarbinary");
    registerColumnType(Types.LONGVARCHAR, "longvarchar");
    registerColumnType(Types.REAL, "real");
    registerColumnType(Types.SMALLINT, "smallint");
    registerColumnType(Types.TINYINT, "tinyint");
    registerColumnType(Types.TIME, "time");
    registerColumnType(Types.TIMESTAMP, "timestamp");
    registerColumnType(Types.VARCHAR, "varchar($l)");
    registerColumnType(Types.VARBINARY, "binary($l)");
    registerColumnType(Types.NUMERIC, "numeric");
    registerColumnType(Types.BLOB, "blob");
    registerColumnType(Types.CLOB, "clob");

    // select topic, syntax from information_schema.help
    // where section like 'Function%' order by section, topic

    // registerFunction("abs", new StandardSQLFunction("abs"));
    registerFunction("acos", new StandardSQLFunction("acos", Hibernate.DOUBLE));
    registerFunction("asin", new StandardSQLFunction("asin", Hibernate.DOUBLE));
    registerFunction("atan", new StandardSQLFunction("atan", Hibernate.DOUBLE));
    registerFunction("atan2", new StandardSQLFunction("atan2", Hibernate.DOUBLE));
    registerFunction("bitand", new StandardSQLFunction("bitand", Hibernate.INTEGER));
    registerFunction("bitor", new StandardSQLFunction("bitor", Hibernate.INTEGER));
    registerFunction("bitxor", new StandardSQLFunction("bitxor", Hibernate.INTEGER));
    registerFunction("ceiling", new StandardSQLFunction("ceiling", Hibernate.DOUBLE));
    registerFunction("cos", new StandardSQLFunction("cos", Hibernate.DOUBLE));
    registerFunction("cot", new StandardSQLFunction("cot", Hibernate.DOUBLE));
    registerFunction("degrees", new StandardSQLFunction("degrees", Hibernate.DOUBLE));
    registerFunction("exp", new StandardSQLFunction("exp", Hibernate.DOUBLE));
    registerFunction("floor", new StandardSQLFunction("floor", Hibernate.DOUBLE));
    registerFunction("log", new StandardSQLFunction("log", Hibernate.DOUBLE));
    registerFunction("log10", new StandardSQLFunction("log10", Hibernate.DOUBLE));
    // registerFunction("mod", new StandardSQLFunction("mod", Hibernate.INTEGER));
    registerFunction("pi", new NoArgSQLFunction("pi", Hibernate.DOUBLE));
    registerFunction("power", new StandardSQLFunction("power", Hibernate.DOUBLE));
    registerFunction("radians", new StandardSQLFunction("radians", Hibernate.DOUBLE));
    registerFunction("rand", new NoArgSQLFunction("rand", Hibernate.DOUBLE));
    registerFunction("round", new StandardSQLFunction("round", Hibernate.DOUBLE));
    registerFunction("roundmagic", new StandardSQLFunction("roundmagic", Hibernate.DOUBLE));
    registerFunction("sign", new StandardSQLFunction("sign", Hibernate.INTEGER));
    registerFunction("sin", new StandardSQLFunction("sin", Hibernate.DOUBLE));
    // registerFunction("sqrt", new StandardSQLFunction("sqrt", Hibernate.DOUBLE));
    registerFunction("tan", new StandardSQLFunction("tan", Hibernate.DOUBLE));
    registerFunction("truncate", new StandardSQLFunction("truncate", Hibernate.DOUBLE));

    registerFunction("compress", new StandardSQLFunction("compress", Hibernate.BINARY));
    registerFunction("expand", new StandardSQLFunction("compress", Hibernate.BINARY));
    registerFunction("decrypt", new StandardSQLFunction("decrypt", Hibernate.BINARY));
    registerFunction("encrypt", new StandardSQLFunction("encrypt", Hibernate.BINARY));
    registerFunction("hash", new StandardSQLFunction("hash", Hibernate.BINARY));

    registerFunction("ascii", new StandardSQLFunction("ascii", Hibernate.INTEGER));
    // registerFunction("bit_length", new StandardSQLFunction("bit_length", Hibernate.INTEGER));
    registerFunction("char", new StandardSQLFunction("char", Hibernate.CHARACTER));
    registerFunction("concat", new VarArgsSQLFunction(Hibernate.STRING, "(", "||", ")"));
    registerFunction("difference", new StandardSQLFunction("difference", Hibernate.INTEGER));
    registerFunction("hextoraw", new StandardSQLFunction("hextoraw", Hibernate.STRING));
    registerFunction("lower", new StandardSQLFunction("lower", Hibernate.STRING));
    registerFunction("insert", new StandardSQLFunction("lower", Hibernate.STRING));
    registerFunction("left", new StandardSQLFunction("left", Hibernate.STRING));
    // registerFunction("length", new StandardSQLFunction("length", Hibernate.INTEGER));
    // registerFunction("locate", new StandardSQLFunction("locate", Hibernate.INTEGER));
    // registerFunction("lower", new StandardSQLFunction("lower", Hibernate.STRING));
    registerFunction("lcase", new StandardSQLFunction("lcase", Hibernate.STRING));
    registerFunction("ltrim", new StandardSQLFunction("ltrim", Hibernate.STRING));
    registerFunction("octet_length", new StandardSQLFunction("octet_length", Hibernate.INTEGER));
    registerFunction("position", new StandardSQLFunction("position", Hibernate.INTEGER));
    registerFunction("rawtohex", new StandardSQLFunction("rawtohex", Hibernate.STRING));
    registerFunction("repeat", new StandardSQLFunction("repeat", Hibernate.STRING));
    registerFunction("replace", new StandardSQLFunction("replace", Hibernate.STRING));
    registerFunction("right", new StandardSQLFunction("right", Hibernate.STRING));
    registerFunction("rtrim", new StandardSQLFunction("rtrim", Hibernate.STRING));
    registerFunction("soundex", new StandardSQLFunction("soundex", Hibernate.STRING));
    registerFunction("space", new StandardSQLFunction("space", Hibernate.STRING));
    registerFunction("stringencode", new StandardSQLFunction("stringencode", Hibernate.STRING));
    registerFunction("stringdecode", new StandardSQLFunction("stringdecode", Hibernate.STRING));
    // registerFunction("substring", new StandardSQLFunction("substring", Hibernate.STRING));
    // registerFunction("upper", new StandardSQLFunction("upper", Hibernate.STRING));
    registerFunction("ucase", new StandardSQLFunction("ucase", Hibernate.STRING));

    registerFunction("stringtoutf8", new StandardSQLFunction("stringtoutf8", Hibernate.BINARY));
    registerFunction("utf8tostring", new StandardSQLFunction("utf8tostring", Hibernate.STRING));

    registerFunction("current_date", new NoArgSQLFunction("current_date", Hibernate.DATE));
    registerFunction("current_time", new NoArgSQLFunction("current_time", Hibernate.TIME));
    registerFunction("current_timestamp", new NoArgSQLFunction("current_timestamp", Hibernate.TIMESTAMP));
    registerFunction("datediff", new NoArgSQLFunction("datediff", Hibernate.INTEGER));
    registerFunction("dayname", new StandardSQLFunction("dayname", Hibernate.STRING));
    registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth", Hibernate.INTEGER));
    registerFunction("dayofweek", new StandardSQLFunction("dayofweek", Hibernate.INTEGER));
    registerFunction("dayofyear", new StandardSQLFunction("dayofyear", Hibernate.INTEGER));
    // registerFunction("hour", new StandardSQLFunction("hour", Hibernate.INTEGER));
    // registerFunction("minute", new StandardSQLFunction("minute", Hibernate.INTEGER));
    // registerFunction("month", new StandardSQLFunction("month", Hibernate.INTEGER));
    registerFunction("monthname", new StandardSQLFunction("monthname", Hibernate.STRING));
    registerFunction("quarter", new StandardSQLFunction("quarter", Hibernate.INTEGER));
    // registerFunction("second", new StandardSQLFunction("second", Hibernate.INTEGER));
    registerFunction("week", new StandardSQLFunction("week", Hibernate.INTEGER));
    // registerFunction("year", new StandardSQLFunction("year", Hibernate.INTEGER));

    registerFunction("curdate", new NoArgSQLFunction("curdate", Hibernate.DATE));
    registerFunction("curtime", new NoArgSQLFunction("curtime", Hibernate.TIME));
    registerFunction("curtimestamp", new NoArgSQLFunction("curtimestamp", Hibernate.TIME));
    registerFunction("now", new NoArgSQLFunction("now", Hibernate.TIMESTAMP));

    registerFunction("database", new NoArgSQLFunction("database", Hibernate.STRING));
    registerFunction("user", new NoArgSQLFunction("user", Hibernate.STRING));

    getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE);

}

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:org.n52.sos.config.sqlite.HibernateSQLiteDialect.java

License:Open Source License

public HibernateSQLiteDialect() {
    registerColumnType(Types.BIT, "integer");
    registerColumnType(Types.TINYINT, "tinyint");
    registerColumnType(Types.SMALLINT, "smallint");
    registerColumnType(Types.INTEGER, "integer");
    registerColumnType(Types.BIGINT, "bigint");
    registerColumnType(Types.FLOAT, "float");
    registerColumnType(Types.REAL, "real");
    registerColumnType(Types.DOUBLE, "double");
    registerColumnType(Types.NUMERIC, "numeric");
    registerColumnType(Types.DECIMAL, "decimal");
    registerColumnType(Types.CHAR, "char");
    registerColumnType(Types.VARCHAR, "varchar");
    registerColumnType(Types.LONGVARCHAR, "longvarchar");
    registerColumnType(Types.DATE, "date");
    registerColumnType(Types.TIME, "time");
    registerColumnType(Types.TIMESTAMP, "timestamp");
    registerColumnType(Types.BINARY, "blob");
    registerColumnType(Types.VARBINARY, "blob");
    registerColumnType(Types.LONGVARBINARY, "blob");
    registerColumnType(Types.BLOB, "blob");
    registerColumnType(Types.CLOB, "clob");
    registerColumnType(Types.BOOLEAN, "integer");
    registerFunction("concat", new VarArgsSQLFunction(StandardBasicTypes.STRING, "", "||", ""));
    registerFunction("mod", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "?1 % ?2"));
    registerFunction("substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING));
    registerFunction("substring", new StandardSQLFunction("substr", StandardBasicTypes.STRING));

    sqliteUniqueDelegate = new SQLiteUniqueDelegate(this);
}

From source file:org.sqlite.hibernate.SQLiteDialect.java

License:Open Source License

public SQLiteDialect() {
    super();//from w  ww.ja va2 s  .c o m
    registerColumnType(Types.BIT, "integer");
    registerColumnType(Types.TINYINT, "tinyint");
    registerColumnType(Types.SMALLINT, "smallint");
    registerColumnType(Types.INTEGER, "integer");
    registerColumnType(Types.BIGINT, "bigint");
    registerColumnType(Types.FLOAT, "float");
    registerColumnType(Types.REAL, "real");
    registerColumnType(Types.DOUBLE, "double");
    registerColumnType(Types.NUMERIC, "numeric");
    registerColumnType(Types.DECIMAL, "decimal");
    registerColumnType(Types.CHAR, "char");
    registerColumnType(Types.VARCHAR, "varchar");
    registerColumnType(Types.LONGVARCHAR, "longvarchar");
    registerColumnType(Types.DATE, "date");
    registerColumnType(Types.TIME, "time");
    registerColumnType(Types.TIMESTAMP, "timestamp");
    registerColumnType(Types.BINARY, "blob");
    registerColumnType(Types.VARBINARY, "blob");
    registerColumnType(Types.LONGVARBINARY, "blob");
    // registerColumnType(Types.NULL, "null");
    registerColumnType(Types.BLOB, "blob");
    registerColumnType(Types.CLOB, "clob");
    registerColumnType(Types.BOOLEAN, "integer");

    registerFunction("concat", new VarArgsSQLFunction(STRING, "", "||", ""));
    registerFunction("mod", new SQLFunctionTemplate(INTEGER, "?1 % ?2"));
    registerFunction("substr", new StandardSQLFunction("substr", STRING));
    registerFunction("substring", new StandardSQLFunction("substr", STRING));
}

From source file:org.teiid.dialect.TeiidDialect.java

License:Open Source License

public TeiidDialect() {
    // Register types
    registerColumnType(Types.CHAR, "char"); //$NON-NLS-1$
    registerColumnType(Types.VARCHAR, "string"); //$NON-NLS-1$

    registerColumnType(Types.BIT, "boolean"); //$NON-NLS-1$
    registerColumnType(Types.TINYINT, "byte"); //$NON-NLS-1$
    registerColumnType(Types.SMALLINT, "short"); //$NON-NLS-1$
    registerColumnType(Types.INTEGER, "integer"); //$NON-NLS-1$
    registerColumnType(Types.BIGINT, "long"); //$NON-NLS-1$

    registerColumnType(Types.REAL, "float"); //$NON-NLS-1$
    registerColumnType(Types.FLOAT, "float"); //$NON-NLS-1$
    registerColumnType(Types.DOUBLE, "double"); //$NON-NLS-1$
    registerColumnType(Types.NUMERIC, "bigdecimal"); //$NON-NLS-1$

    registerColumnType(Types.DATE, "date"); //$NON-NLS-1$
    registerColumnType(Types.TIME, "time"); //$NON-NLS-1$
    registerColumnType(Types.TIMESTAMP, "timestamp"); //$NON-NLS-1$

    registerColumnType(Types.BLOB, "blob"); //$NON-NLS-1$
    registerColumnType(Types.VARBINARY, "blob"); //$NON-NLS-1$
    registerColumnType(Types.CLOB, "clob"); //$NON-NLS-1$
    registerColumnType(Types.JAVA_OBJECT, "object"); //$NON-NLS-1$

    registerFunction("acos", new StandardSQLFunction("acos", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("asin", new StandardSQLFunction("asin", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("atan", new StandardSQLFunction("atan", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("atan2", new StandardSQLFunction("atan2", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("ceil", new StandardSQLFunction("ceiling")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("cos", new StandardSQLFunction("cos", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("cot", new StandardSQLFunction("cot", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("degrees", new StandardSQLFunction("degrees", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("exp", new StandardSQLFunction("exp", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("floor", new StandardSQLFunction("floor")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatbigdecimal", new StandardSQLFunction("formatbigdecimal", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatbiginteger", new StandardSQLFunction("formatbiginteger", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatdouble", new StandardSQLFunction("formatdouble", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatfloat", new StandardSQLFunction("formatfloat", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatinteger", new StandardSQLFunction("formatinteger", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatlong", new StandardSQLFunction("formatlong", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("log", new StandardSQLFunction("log", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("mod", new StandardSQLFunction("mod")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsebigdecimal", new StandardSQLFunction("parsebigdecimal", BIG_DECIMAL)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsebiginteger", new StandardSQLFunction("parsebiginteger", BIG_INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsedouble", new StandardSQLFunction("parsedouble", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsefloat", new StandardSQLFunction("parsefloat", FLOAT)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parseinteger", new StandardSQLFunction("parseinteger", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parselong", new StandardSQLFunction("parselong", LONG)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("pi", new StandardSQLFunction("pi", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("power", new StandardSQLFunction("power", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("radians", new StandardSQLFunction("radians", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("round", new StandardSQLFunction("round")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("sign", new StandardSQLFunction("sign", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("sin", new StandardSQLFunction("sin", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("tan", new StandardSQLFunction("tan", DOUBLE)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("ascii", new StandardSQLFunction("ascii", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("chr", new StandardSQLFunction("chr", CHARACTER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("char", new StandardSQLFunction("char", CHARACTER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("concat", new VarArgsSQLFunction(STRING, "", "||", "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    registerFunction("initcap", new StandardSQLFunction("initcap", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("insert", new StandardSQLFunction("insert", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("lcase", new StandardSQLFunction("lcase", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("left", new StandardSQLFunction("left", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("locate", new StandardSQLFunction("locate", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("lpad", new StandardSQLFunction("lpad", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("ltrim", new StandardSQLFunction("ltrim", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("repeat", new StandardSQLFunction("repeat", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("replace", new StandardSQLFunction("replace", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("right", new StandardSQLFunction("right", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("rpad", new StandardSQLFunction("rpad", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("rtrim", new StandardSQLFunction("rtrim", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("substring", new StandardSQLFunction("substring", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("translate", new StandardSQLFunction("translate", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("ucase", new StandardSQLFunction("ucase", STRING)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("curdate", new NoArgSQLFunction("curdate", DATE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("curtime", new NoArgSQLFunction("curtime", TIME)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("now", new NoArgSQLFunction("now", TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("dayname", new StandardSQLFunction("dayname", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("dayofweek", new StandardSQLFunction("dayofweek", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("dayofyear", new StandardSQLFunction("dayofyear", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formatdate", new StandardSQLFunction("formatdate", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formattime", new StandardSQLFunction("formattime", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("formattimestamp", new StandardSQLFunction("formattimestamp", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("hour", new StandardSQLFunction("hour", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("minute", new StandardSQLFunction("minute", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("monthname", new StandardSQLFunction("monthname", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsedate", new StandardSQLFunction("parsedate", DATE)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsetime", new StandardSQLFunction("parsetime", TIME)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("parsetimestamp", new StandardSQLFunction("parsetimestamp", TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("second", new StandardSQLFunction("second", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("timestampcreate", new StandardSQLFunction("timestampcreate", TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("timestampAdd", new StandardSQLFunction("timestampAdd")); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("timestampDiff", new StandardSQLFunction("timestampDiff", LONG)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("week", new StandardSQLFunction("week", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("year", new StandardSQLFunction("year", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("modifytimezone", new StandardSQLFunction("modifytimezone", TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("convert", new StandardSQLFunction("convert")); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("to_bytes", new StandardSQLFunction("to_bytes", BLOB)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("to_chars", new StandardSQLFunction("to_chars", CLOB)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("from_unittime", new StandardSQLFunction("from_unittime", TIMESTAMP)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("session_id", new StandardSQLFunction("session_id", STRING)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("uuid", new StandardSQLFunction("uuid", STRING)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("unescape", new StandardSQLFunction("unescape", STRING)); //$NON-NLS-1$ //$NON-NLS-2$

    registerFunction("array_get", new StandardSQLFunction("array_get", OBJECT)); //$NON-NLS-1$ //$NON-NLS-2$
    registerFunction("array_length", new StandardSQLFunction("array_length", INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
}

From source file:sam_testclient.utilities.SQLiteDialect.java

public SQLiteDialect() {
    registerColumnType(Types.BIT, "integer");
    registerColumnType(Types.TINYINT, "tinyint");
    registerColumnType(Types.SMALLINT, "smallint");
    registerColumnType(Types.INTEGER, "integer");
    registerColumnType(Types.BIGINT, "bigint");
    registerColumnType(Types.FLOAT, "float");
    registerColumnType(Types.REAL, "real");
    registerColumnType(Types.DOUBLE, "double");
    registerColumnType(Types.NUMERIC, "numeric");
    registerColumnType(Types.DECIMAL, "decimal");
    registerColumnType(Types.CHAR, "char");
    registerColumnType(Types.VARCHAR, "varchar");
    registerColumnType(Types.LONGVARCHAR, "longvarchar");
    registerColumnType(Types.DATE, "date");
    registerColumnType(Types.TIME, "time");
    registerColumnType(Types.TIMESTAMP, "timestamp");
    registerColumnType(Types.BINARY, "blob");
    registerColumnType(Types.VARBINARY, "blob");
    registerColumnType(Types.LONGVARBINARY, "blob");
    // registerColumnType(Types.NULL, "null");
    registerColumnType(Types.BLOB, "blob");
    registerColumnType(Types.CLOB, "clob");
    registerColumnType(Types.BOOLEAN, "integer");

    registerFunction("concat", new VarArgsSQLFunction(StandardBasicTypes.STRING, "", "||", ""));
    registerFunction("mod", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "?1 % ?2"));
    registerFunction("substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING));
    registerFunction("substring", new StandardSQLFunction("substr", StandardBasicTypes.STRING));
}

From source file:se.tillvaxtverket.tsltrust.weblogic.hibernate.SQLiteDialect.java

License:Open Source License

public SQLiteDialect() {
    super();//  w  ww .  ja  v  a 2 s . c o m
    registerColumnType(Types.BIT, "integer");
    registerColumnType(Types.TINYINT, "tinyint");
    registerColumnType(Types.SMALLINT, "smallint");
    registerColumnType(Types.INTEGER, "integer");
    registerColumnType(Types.BIGINT, "bigint");
    registerColumnType(Types.FLOAT, "float");
    registerColumnType(Types.REAL, "real");
    registerColumnType(Types.DOUBLE, "double");
    registerColumnType(Types.NUMERIC, "numeric");
    registerColumnType(Types.DECIMAL, "decimal");
    registerColumnType(Types.CHAR, "char");
    registerColumnType(Types.VARCHAR, "varchar");
    registerColumnType(Types.LONGVARCHAR, "longvarchar");
    registerColumnType(Types.DATE, "date");
    registerColumnType(Types.TIME, "time");
    registerColumnType(Types.TIMESTAMP, "timestamp");
    registerColumnType(Types.BINARY, "blob");
    registerColumnType(Types.VARBINARY, "blob");
    registerColumnType(Types.LONGVARBINARY, "blob");
    // registerColumnType(Types.NULL, "null");
    registerColumnType(Types.BLOB, "blob");
    registerColumnType(Types.CLOB, "clob");
    registerColumnType(Types.BOOLEAN, "integer");

    registerFunction("concat", new VarArgsSQLFunction(stringType, "", "||", ""));
    registerFunction("mod", new SQLFunctionTemplate(stringType, "?1 % ?2"));
    registerFunction("substr", new StandardSQLFunction("substr", stringType));
    registerFunction("substring", new StandardSQLFunction("substr", stringType));
}