本文整理汇总了Java中org.jooq.SQLDialect.MYSQL属性的典型用法代码示例。如果您正苦于以下问题:Java SQLDialect.MYSQL属性的具体用法?Java SQLDialect.MYSQL怎么用?Java SQLDialect.MYSQL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jooq.SQLDialect
的用法示例。
在下文中一共展示了SQLDialect.MYSQL属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: migrate
@Override
public void migrate(Connection connection) throws Exception {
try(Statement stmt = connection.createStatement()) {
DSLContext create = DSL.using(connection);
String ddl = create.alterTable(table("oidc_invitations"))
.renameColumn(field("oidc_sub")).to(field("oidc_payload", SQLDataType.CLOB))
.getSQL();
if (create.configuration().dialect() == SQLDialect.MYSQL) {
Matcher m = Pattern.compile("\\s+RENAME\\s+COLUMN\\s+(\\w+)\\s+TO\\s+", Pattern.CASE_INSENSITIVE).matcher(ddl);
StringBuffer sb = new StringBuffer();
if (m.find()) {
m.appendReplacement(sb, " change " + m.group(1) + " ");
m.appendTail(sb);
sb.append(" text not null");
ddl = sb.toString();
}
}
stmt.execute(ddl);
}
}
示例2: createDDL
private String createDDL(DefaultConfiguration config) {
DSLContext create = DSL.using(config);
String ddl = create.alterTable(table("oidc_invitations"))
.renameColumn(field("oidc_sub"))
.to(field("oidc_payload", SQLDataType.CLOB))
.getSQL();
if (create.configuration().dialect() == SQLDialect.MYSQL) {
Matcher m = Pattern.compile("\\s+RENAME\\s+COLUMN\\s+(\\w+)\\s+TO\\s+", Pattern.CASE_INSENSITIVE).matcher(ddl);
StringBuffer sb = new StringBuffer();
if (m.find()) {
m.appendReplacement(sb, " change " + m.group(1) + " ");
m.appendTail(sb);
sb.append(" text not null");
ddl = sb.toString();
}
}
return ddl;
}
示例3: test11
@Test(timeout = 4000)
public void test11() throws Throwable {
UUID uUID0 = UUID.randomUUID();
SQLDialect sQLDialect0 = SQLDialect.MYSQL;
DefaultDSLContext defaultDSLContext0 = new DefaultDSLContext(sQLDialect0);
// Undeclared exception!
try {
WorkspaceSnapshot.getAuthorizations(uUID0, defaultDSLContext0);
fail("Expecting exception: RuntimeException");
} catch (RuntimeException e) {
//
// Cannot execute query. No Connection configured
//
assertThrownBy("org.jooq.impl.AbstractQuery", e);
}
}
示例4: getJooqSqlDialect
private SQLDialect getJooqSqlDialect() {
switch (this.dialect) {
case MySql:
return SQLDialect.MYSQL;
case Postgres:
return SQLDialect.POSTGRES;
}
throw new UnsupportedOperationException();
}
示例5: parameters
@Parameters(name = "{0}")
public static Object[] parameters() {
return new Object[] { new Object[] { SQLDialect.DERBY, sqlException("42802") },
new Object[] { SQLDialect.H2, sqlException(42000) },
new Object[] { SQLDialect.HSQLDB, sqlException(-22) },
new Object[] { SQLDialect.MARIADB, sqlException(1054) },
new Object[] { SQLDialect.MYSQL, sqlException(1054) },
new Object[] { SQLDialect.POSTGRES, sqlException("03000") },
new Object[] { SQLDialect.POSTGRES_9_3, sqlException("03000") },
new Object[] { SQLDialect.POSTGRES_9_4, sqlException("03000") },
new Object[] { SQLDialect.POSTGRES_9_5, sqlException("03000") } };
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:12,代码来源:JooqExceptionTranslatorTests.java
示例6: getSQLDialect
@Override
protected SQLDialect getSQLDialect()
{
return SQLDialect.MYSQL;
}
示例7: getDBConnection
public DALFacade getDBConnection() throws Exception {
return new DALFacadeImpl(dataSource, SQLDialect.MYSQL);
}
示例8: sqlDialect
@Override
protected SQLDialect sqlDialect() {
return SQLDialect.MYSQL;
}
开发者ID:vladmihalcea,项目名称:high-performance-java-persistence,代码行数:4,代码来源:AbstractJOOQMySQLIntegrationTest.java
示例9: createDefaultDSLContext
@Bean
public DefaultDSLContext createDefaultDSLContext() {
return new DefaultDSLContext(dataSourceConnectionProvider(), SQLDialect.MYSQL);
}
示例10: getDBConnection
public DALFacade getDBConnection() throws Exception { // TODO: Specify Exception
return new DALFacadeImpl(dataSource, SQLDialect.MYSQL);
}
示例11: updateSchema
static Optional<String> updateSchema(SQLDialect dialect) {
if(dialect == SQLDialect.MYSQL) {
return Optional.ofNullable(System.getProperty("RDS_DB_NAME"));
}
return Optional.empty();
}
示例12: getFolder
private String getFolder(SQLDialect dialect) {
if(dialect == SQLDialect.MYSQL || dialect == SQLDialect.MARIADB) {
return "mysql";
}
return "common";
}
示例13: Metadata
public Metadata(final Set<String> reportsTables, final DataSource dataSource, final OSGIKillbillLogService logService) {
this(reportsTables, dataSource, SQLDialect.MYSQL, logService);
}