本文整理汇总了Java中org.hibernate.dialect.function.VarArgsSQLFunction类的典型用法代码示例。如果您正苦于以下问题:Java VarArgsSQLFunction类的具体用法?Java VarArgsSQLFunction怎么用?Java VarArgsSQLFunction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VarArgsSQLFunction类属于org.hibernate.dialect.function包,在下文中一共展示了VarArgsSQLFunction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: InterbaseDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
/**
* Constructs a InterbaseDialect
*/
public InterbaseDialect() {
super();
registerColumnType( Types.BIT, "smallint" );
registerColumnType( Types.BIGINT, "numeric(18,0)" );
registerColumnType( Types.SMALLINT, "smallint" );
registerColumnType( Types.TINYINT, "smallint" );
registerColumnType( Types.INTEGER, "integer" );
registerColumnType( Types.CHAR, "char(1)" );
registerColumnType( Types.VARCHAR, "varchar($l)" );
registerColumnType( Types.FLOAT, "float" );
registerColumnType( Types.DOUBLE, "double precision" );
registerColumnType( Types.DATE, "date" );
registerColumnType( Types.TIME, "time" );
registerColumnType( Types.TIMESTAMP, "timestamp" );
registerColumnType( Types.VARBINARY, "blob" );
registerColumnType( Types.NUMERIC, "numeric($p,$s)" );
registerColumnType( Types.BLOB, "blob" );
registerColumnType( Types.CLOB, "blob sub_type 1" );
registerColumnType( Types.BOOLEAN, "smallint" );
registerFunction( "concat", new VarArgsSQLFunction( StandardBasicTypes.STRING, "(","||",")" ) );
registerFunction( "current_date", new NoArgSQLFunction( "current_date", StandardBasicTypes.DATE, false ) );
getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, NO_BATCH );
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:InterbaseDialect.java
示例2: InterbaseDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public InterbaseDialect() {
super();
registerColumnType( Types.BIT, "smallint" );
registerColumnType( Types.BIGINT, "numeric(18,0)" );
registerColumnType( Types.SMALLINT, "smallint" );
registerColumnType( Types.TINYINT, "smallint" );
registerColumnType( Types.INTEGER, "integer" );
registerColumnType( Types.CHAR, "char(1)" );
registerColumnType( Types.VARCHAR, "varchar($l)" );
registerColumnType( Types.FLOAT, "float" );
registerColumnType( Types.DOUBLE, "double precision" );
registerColumnType( Types.DATE, "date" );
registerColumnType( Types.TIME, "time" );
registerColumnType( Types.TIMESTAMP, "timestamp" );
registerColumnType( Types.VARBINARY, "blob" );
registerColumnType( Types.NUMERIC, "numeric($p,$s)" );
registerColumnType( Types.BLOB, "blob" );
registerColumnType( Types.CLOB, "blob sub_type 1" );
registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(","||",")" ) );
getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
}
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:24,代码来源:InterbaseDialect.java
示例3: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
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(StringType.INSTANCE, "", "||", ""));
registerFunction("mod", new SQLFunctionTemplate(StringType.INSTANCE, "?1 % ?2"));
registerFunction("substr", new StandardSQLFunction("substr", StringType.INSTANCE));
registerFunction("substring", new StandardSQLFunction("substr", StringType.INSTANCE));
}
开发者ID:amvnetworks,项目名称:amv-access-api-poc,代码行数:31,代码来源:SQLiteDialect.java
示例4: SqliteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public SqliteDialect() {
super();
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(StringType.INSTANCE, "", "||", ""));
registerFunction("mod", new SQLFunctionTemplate(IntegerType.INSTANCE, "?1 % ?2"));
registerFunction("substr", new StandardSQLFunction("substr", StringType.INSTANCE));
registerFunction("substring", new StandardSQLFunction("substr", StringType.INSTANCE));
}
开发者ID:Martion2017,项目名称:ApplicationDetection,代码行数:30,代码来源:SqliteDialect.java
示例5: Ingres9Dialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
/**
* Constructs a Ingres9Dialect
*/
public Ingres9Dialect() {
super();
registerDateTimeFunctions();
registerDateTimeColumnTypes();
registerFunction( "concat", new VarArgsSQLFunction( StandardBasicTypes.STRING, "(", "||", ")" ) );
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:Ingres9Dialect.java
示例6: InformixDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
/**
* Creates new <code>InformixDialect</code> instance. Sets up the JDBC /
* Informix type mappings.
*/
public InformixDialect() {
super();
registerColumnType( Types.BIGINT, "int8" );
registerColumnType( Types.BINARY, "byte" );
// Informix doesn't have a bit type
registerColumnType( Types.BIT, "smallint" );
registerColumnType( Types.CHAR, "char($l)" );
registerColumnType( Types.DATE, "date" );
registerColumnType( Types.DECIMAL, "decimal" );
registerColumnType( Types.DOUBLE, "float" );
registerColumnType( Types.FLOAT, "smallfloat" );
registerColumnType( Types.INTEGER, "integer" );
// or BYTE
registerColumnType( Types.LONGVARBINARY, "blob" );
// or TEXT?
registerColumnType( Types.LONGVARCHAR, "clob" );
// or MONEY
registerColumnType( Types.NUMERIC, "decimal" );
registerColumnType( Types.REAL, "smallfloat" );
registerColumnType( Types.SMALLINT, "smallint" );
registerColumnType( Types.TIMESTAMP, "datetime year to fraction(5)" );
registerColumnType( Types.TIME, "datetime hour to second" );
registerColumnType( Types.TINYINT, "smallint" );
registerColumnType( Types.VARBINARY, "byte" );
registerColumnType( Types.VARCHAR, "varchar($l)" );
registerColumnType( Types.VARCHAR, 255, "varchar($l)" );
registerColumnType( Types.VARCHAR, 32739, "lvarchar($l)" );
registerFunction( "concat", new VarArgsSQLFunction( StandardBasicTypes.STRING, "(", "||", ")" ) );
uniqueDelegate = new InformixUniqueDelegate( this );
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:38,代码来源:InformixDialect.java
示例7: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public SQLiteDialect()
{
super();
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(new StringType(), "", "||", ""));
registerFunction("mod", new SQLFunctionTemplate(new IntegerType(), "?1 % ?2"));
registerFunction("substr", new StandardSQLFunction("substr", new StringType()));
registerFunction("substring", new StandardSQLFunction("substr", new StringType()));
}
开发者ID:skeychen,项目名称:dswork,代码行数:32,代码来源:SQLiteDialect.java
示例8: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public SQLiteDialect() {
super();
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));
}
开发者ID:StnetixDevTeam,项目名称:CloudRaid-DesktopApp,代码行数:37,代码来源:SQLiteDialect.java
示例9: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
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 ) );
}
开发者ID:cnasenberg,项目名称:sparrow,代码行数:31,代码来源:SQLiteDialect.java
示例10: InformixDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
/**
* Creates new <code>InformixDialect</code> instance. Sets up the JDBC /
* Informix type mappings.
*/
public InformixDialect() {
super();
registerColumnType(Types.BIGINT, "int8");
registerColumnType(Types.BINARY, "byte");
registerColumnType(Types.BIT, "smallint"); // Informix doesn't have a bit type
registerColumnType(Types.CHAR, "char($l)");
registerColumnType(Types.DATE, "date");
registerColumnType(Types.DECIMAL, "decimal");
registerColumnType(Types.DOUBLE, "float");
registerColumnType(Types.FLOAT, "smallfloat");
registerColumnType(Types.INTEGER, "integer");
registerColumnType(Types.LONGVARBINARY, "blob"); // or BYTE
registerColumnType(Types.LONGVARCHAR, "clob"); // or TEXT?
registerColumnType(Types.NUMERIC, "decimal"); // or MONEY
registerColumnType(Types.REAL, "smallfloat");
registerColumnType(Types.SMALLINT, "smallint");
registerColumnType(Types.TIMESTAMP, "datetime year to fraction(5)");
registerColumnType(Types.TIME, "datetime hour to second");
registerColumnType(Types.TINYINT, "smallint");
registerColumnType(Types.VARBINARY, "byte");
registerColumnType(Types.VARCHAR, "varchar($l)");
registerColumnType(Types.VARCHAR, 255, "varchar($l)");
registerColumnType(Types.VARCHAR, 32739, "lvarchar($l)");
registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(", "||", ")" ) );
}
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:32,代码来源:InformixDialect.java
示例11: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
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(StringType.INSTANCE, "", "||", ""));
registerFunction("mod", new SQLFunctionTemplate(IntegerType.INSTANCE, "?1 % ?2"));
registerFunction("substr", new StandardSQLFunction("substr", StringType.INSTANCE));
registerFunction("substring", new StandardSQLFunction("substr", StringType.INSTANCE));
}
开发者ID:tloszabno,项目名称:FirefightersCenter,代码行数:31,代码来源:SQLiteDialect.java
示例12: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public SQLiteDialect() {
super();
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));
}
开发者ID:webdsl,项目名称:webdsl,代码行数:36,代码来源:SQLiteDialect.java
示例13: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public SQLiteDialect() {
registerColumnType(Types.BIT, "boolean");
//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($p, $s)");
registerColumnType(Types.DECIMAL, "decimal");
registerColumnType(Types.CHAR, "char");
registerColumnType(Types.VARCHAR, "varchar($l)");
registerColumnType(Types.LONGVARCHAR, "longvarchar");
//registerColumnType(Types.DATE, "date");
//registerColumnType(Types.TIME, "time");
registerColumnType(Types.TIMESTAMP, "datetime");
registerColumnType(Types.BINARY, "blob");
registerColumnType(Types.VARBINARY, "blob");
registerColumnType(Types.LONGVARBINARY, "blob");
//registerColumnType(Types.BLOB, "blob");
//registerColumnType(Types.CLOB, "clob");
//registerColumnType(Types.BOOLEAN, "boolean");
registerFunction( "concat", new VarArgsSQLFunction(StandardBasicTypes.STRING, "", "||", "") );
registerFunction( "mod", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "?1 % ?2" ) );
registerFunction( "quote", new StandardSQLFunction("quote", StandardBasicTypes.STRING) );
registerFunction( "random", new NoArgSQLFunction("random", StandardBasicTypes.INTEGER) );
registerFunction( "round", new StandardSQLFunction("round") );
registerFunction( "substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING) );}
开发者ID:ntenhoeve,项目名称:Introspect-Framework,代码行数:31,代码来源:SQLiteDialect.java
示例14: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public SQLiteDialect() {
super();
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(Hibernate.STRING, "", "||", "") );
registerFunction( "mod", new SQLFunctionTemplate( Hibernate.INTEGER, "?1 % ?2" ) );
registerFunction( "substr", new StandardSQLFunction("substr", Hibernate.STRING) );
registerFunction( "substring", new StandardSQLFunction( "substr", Hibernate.STRING ) );
}
开发者ID:poli-libras,项目名称:poli-libras,代码行数:32,代码来源:SQLiteDialect.java
示例15: SQLiteDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public SQLiteDialect() {
registerColumnType(Types.BIT, "boolean");
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($p, $s)");
registerColumnType(Types.DECIMAL, "decimal");
registerColumnType(Types.CHAR, "char");
registerColumnType(Types.VARCHAR, "varchar($l)");
registerColumnType(Types.LONGVARCHAR, "longvarchar");
registerColumnType(Types.DATE, "date");
registerColumnType(Types.TIME, "time");
registerColumnType(Types.TIMESTAMP, "datetime");
registerColumnType(Types.BINARY, "blob");
registerColumnType(Types.VARBINARY, "blob");
registerColumnType(Types.LONGVARBINARY, "blob");
registerColumnType(Types.BLOB, "blob");
registerColumnType(Types.CLOB, "clob");
registerColumnType(Types.BOOLEAN, "boolean");
registerFunction("concat", new VarArgsSQLFunction(StandardBasicTypes.STRING, "", "||", ""));
registerFunction("mod", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "?1 % ?2"));
registerFunction("quote", new StandardSQLFunction("quote", StandardBasicTypes.STRING));
registerFunction("random", new NoArgSQLFunction("random", StandardBasicTypes.INTEGER));
registerFunction("round", new StandardSQLFunction("round"));
registerFunction("substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING));
registerFunction("trim", new AbstractAnsiTrimEmulationFunction() {
protected SQLFunction resolveBothSpaceTrimFunction() {
return new SQLFunctionTemplate(StandardBasicTypes.STRING, "trim(?1)");
}
protected SQLFunction resolveBothSpaceTrimFromFunction() {
return new SQLFunctionTemplate(StandardBasicTypes.STRING, "trim(?2)");
}
protected SQLFunction resolveLeadingSpaceTrimFunction() {
return new SQLFunctionTemplate(StandardBasicTypes.STRING, "ltrim(?1)");
}
protected SQLFunction resolveTrailingSpaceTrimFunction() {
return new SQLFunctionTemplate(StandardBasicTypes.STRING, "rtrim(?1)");
}
protected SQLFunction resolveBothTrimFunction() {
return new SQLFunctionTemplate(StandardBasicTypes.STRING, "trim(?1, ?2)");
}
protected SQLFunction resolveLeadingTrimFunction() {
return new SQLFunctionTemplate(StandardBasicTypes.STRING, "ltrim(?1, ?2)");
}
protected SQLFunction resolveTrailingTrimFunction() {
return new SQLFunctionTemplate(StandardBasicTypes.STRING, "rtrim(?1, ?2)");
}
});
}
开发者ID:ZsoltFabok,项目名称:sqlite-dialect,代码行数:61,代码来源:SQLiteDialect.java
示例16: TeradataDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
/**
* Constructor
*/
public TeradataDialect() {
super();
//registerColumnType data types
registerColumnType( Types.NUMERIC, "NUMERIC($p,$s)" );
registerColumnType( Types.DOUBLE, "DOUBLE PRECISION" );
registerColumnType( Types.BIGINT, "NUMERIC(18,0)" );
registerColumnType( Types.BIT, "BYTEINT" );
registerColumnType( Types.TINYINT, "BYTEINT" );
registerColumnType( Types.VARBINARY, "VARBYTE($l)" );
registerColumnType( Types.BINARY, "BYTEINT" );
registerColumnType( Types.LONGVARCHAR, "LONG VARCHAR" );
registerColumnType( Types.CHAR, "CHAR(1)" );
registerColumnType( Types.DECIMAL, "DECIMAL" );
registerColumnType( Types.INTEGER, "INTEGER" );
registerColumnType( Types.SMALLINT, "SMALLINT" );
registerColumnType( Types.FLOAT, "FLOAT" );
registerColumnType( Types.VARCHAR, "VARCHAR($l)" );
registerColumnType( Types.DATE, "DATE" );
registerColumnType( Types.TIME, "TIME" );
registerColumnType( Types.TIMESTAMP, "TIMESTAMP" );
// hibernate seems to ignore this type...
registerColumnType( Types.BOOLEAN, "BYTEINT" );
registerColumnType( Types.BLOB, "BLOB" );
registerColumnType( Types.CLOB, "CLOB" );
registerFunction( "year", new SQLFunctionTemplate( StandardBasicTypes.INTEGER, "extract(year from ?1)" ) );
registerFunction( "length", new SQLFunctionTemplate( StandardBasicTypes.INTEGER, "character_length(?1)" ) );
registerFunction( "concat", new VarArgsSQLFunction( StandardBasicTypes.STRING, "(", "||", ")" ) );
registerFunction( "substring", new SQLFunctionTemplate( StandardBasicTypes.STRING, "substring(?1 from ?2 for ?3)" ) );
registerFunction( "locate", new SQLFunctionTemplate( StandardBasicTypes.STRING, "position(?1 in ?2)" ) );
registerFunction( "mod", new SQLFunctionTemplate( StandardBasicTypes.STRING, "?1 mod ?2" ) );
registerFunction( "str", new SQLFunctionTemplate( StandardBasicTypes.STRING, "cast(?1 as varchar(255))" ) );
// bit_length feels a bit broken to me. We have to cast to char in order to
// pass when a numeric value is supplied. But of course the answers given will
// be wildly different for these two datatypes. 1234.5678 will be 9 bytes as
// a char string but will be 8 or 16 bytes as a true numeric.
// Jay Nance 2006-09-22
registerFunction(
"bit_length", new SQLFunctionTemplate( StandardBasicTypes.INTEGER, "octet_length(cast(?1 as char))*4" )
);
// The preference here would be
// SQLFunctionTemplate( StandardBasicTypes.TIMESTAMP, "current_timestamp(?1)", false)
// but this appears not to work.
// Jay Nance 2006-09-22
registerFunction( "current_timestamp", new SQLFunctionTemplate( StandardBasicTypes.TIMESTAMP, "current_timestamp" ) );
registerFunction( "current_time", new SQLFunctionTemplate( StandardBasicTypes.TIMESTAMP, "current_time" ) );
registerFunction( "current_date", new SQLFunctionTemplate( StandardBasicTypes.TIMESTAMP, "current_date" ) );
// IBID for current_time and current_date
registerKeyword( "password" );
registerKeyword( "type" );
registerKeyword( "title" );
registerKeyword( "year" );
registerKeyword( "month" );
registerKeyword( "summary" );
registerKeyword( "alias" );
registerKeyword( "value" );
registerKeyword( "first" );
registerKeyword( "role" );
registerKeyword( "account" );
registerKeyword( "class" );
// Tell hibernate to use getBytes instead of getBinaryStream
getDefaultProperties().setProperty( Environment.USE_STREAMS_FOR_BINARY, "false" );
// No batch statements
getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, NO_BATCH );
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:73,代码来源:TeradataDialect.java
示例17: registerFunctions
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
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( "bitand", new StandardSQLFunction("bitand") );
registerFunction( "cos", new StandardSQLFunction("cos", StandardBasicTypes.DOUBLE) );
registerFunction( "cosh", new StandardSQLFunction("cosh", StandardBasicTypes.DOUBLE) );
registerFunction( "exp", new StandardSQLFunction("exp", StandardBasicTypes.DOUBLE) );
registerFunction( "ln", new StandardSQLFunction("ln", StandardBasicTypes.DOUBLE) );
registerFunction( "sin", new StandardSQLFunction("sin", StandardBasicTypes.DOUBLE) );
registerFunction( "sinh", new StandardSQLFunction("sinh", StandardBasicTypes.DOUBLE) );
registerFunction( "stddev", new StandardSQLFunction("stddev", StandardBasicTypes.DOUBLE) );
registerFunction( "sqrt", new StandardSQLFunction("sqrt", StandardBasicTypes.DOUBLE) );
registerFunction( "tan", new StandardSQLFunction("tan", StandardBasicTypes.DOUBLE) );
registerFunction( "tanh", new StandardSQLFunction("tanh", 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( "soundex", new StandardSQLFunction("soundex") );
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( "systimestamp", new NoArgSQLFunction("systimestamp", StandardBasicTypes.TIMESTAMP, false) );
registerFunction( "uid", new NoArgSQLFunction("uid", StandardBasicTypes.INTEGER, false) );
registerFunction( "user", new NoArgSQLFunction("user", StandardBasicTypes.STRING, false) );
registerFunction( "rowid", new NoArgSQLFunction("rowid", StandardBasicTypes.LONG, false) );
registerFunction( "rownum", new NoArgSQLFunction("rownum", StandardBasicTypes.LONG, 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( "locate", new SQLFunctionTemplate( StandardBasicTypes.INTEGER, "instr(?2,?1)" ) );
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) );
registerFunction( "str", new StandardSQLFunction("to_char", StandardBasicTypes.STRING) );
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:82,代码来源:Oracle8iDialect.java
示例18: AbstractTransactSQLDialect
import org.hibernate.dialect.function.VarArgsSQLFunction; //导入依赖的package包/类
public AbstractTransactSQLDialect() {
super();
registerColumnType( Types.BINARY, "binary($l)" );
registerColumnType( Types.BIT, "tinyint" );
registerColumnType( Types.BIGINT, "numeric(19,0)" );
registerColumnType( Types.SMALLINT, "smallint" );
registerColumnType( Types.TINYINT, "smallint" );
registerColumnType( Types.INTEGER, "int" );
registerColumnType( Types.CHAR, "char(1)" );
registerColumnType( Types.VARCHAR, "varchar($l)" );
registerColumnType( Types.FLOAT, "float" );
registerColumnType( Types.DOUBLE, "double precision" );
registerColumnType( Type
|
请发表评论