当前位置: 首页>>代码示例>>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;未经允许,请勿转载。