當前位置: 首頁>>代碼示例>>Java>>正文


Java SQLDialect.MYSQL屬性代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:kawasima,項目名稱:bouncr,代碼行數:21,代碼來源:V22__AlterInvitations.java

示例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;
}
 
開發者ID:kawasima,項目名稱:bouncr,代碼行數:19,代碼來源:RenameColumnWorkaroundTest.java

示例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);
    }
}
 
開發者ID:ChiralBehaviors,項目名稱:Ultrastructure,代碼行數:17,代碼來源:WorkspaceSnapshot_ESTest.java

示例4: getJooqSqlDialect

private SQLDialect getJooqSqlDialect() {
    switch (this.dialect) {
        case MySql:
            return SQLDialect.MYSQL;
        case Postgres:
            return SQLDialect.POSTGRES;
    }
    throw new UnsupportedOperationException();
}
 
開發者ID:ShotaOd,項目名稱:carbon,代碼行數:9,代碼來源:JooqCodeGenerator.java

示例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;
}
 
開發者ID:apache,項目名稱:polygene-java,代碼行數:5,代碼來源:MySQLEntityStoreAssembler.java

示例7: getDBConnection

public DALFacade getDBConnection() throws Exception {
    return new DALFacadeImpl(dataSource, SQLDialect.MYSQL);
}
 
開發者ID:rwth-acis,項目名稱:las2peer-ActivityTracker,代碼行數:3,代碼來源:ActivityTrackerService.java

示例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);
}
 
開發者ID:sequenceiq,項目名稱:sequenceiq-samples,代碼行數:4,代碼來源:AppConfig.java

示例10: getDBConnection

public DALFacade getDBConnection() throws Exception { // TODO: Specify Exception
    return new DALFacadeImpl(dataSource, SQLDialect.MYSQL);
}
 
開發者ID:rwth-acis,項目名稱:RequirementsBazaar,代碼行數:3,代碼來源:BazaarService.java

示例11: updateSchema

static Optional<String> updateSchema(SQLDialect dialect) {
    if(dialect == SQLDialect.MYSQL) {
        return Optional.ofNullable(System.getProperty("RDS_DB_NAME"));
    }
    return Optional.empty();
}
 
開發者ID:AveryRegier,項目名稱:club-tracker,代碼行數:6,代碼來源:ConfiguredConnector.java

示例12: getFolder

private String getFolder(SQLDialect dialect) {
    if(dialect == SQLDialect.MYSQL || dialect == SQLDialect.MARIADB) {
        return "mysql";
    }
    return "common";
}
 
開發者ID:AveryRegier,項目名稱:club-tracker,代碼行數:6,代碼來源:ConfiguredConnector.java

示例13: Metadata

public Metadata(final Set<String> reportsTables, final DataSource dataSource, final OSGIKillbillLogService logService) {
    this(reportsTables, dataSource, SQLDialect.MYSQL, logService);
}
 
開發者ID:killbill,項目名稱:killbill-analytics-plugin,代碼行數:3,代碼來源:Metadata.java


注:本文中的org.jooq.SQLDialect.MYSQL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。