本文整理匯總了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);
}