当前位置: 首页>>代码示例>>Java>>正文


Java Database.getDatabaseChangeLogLockTableName方法代码示例

本文整理汇总了Java中liquibase.database.Database.getDatabaseChangeLogLockTableName方法的典型用法代码示例。如果您正苦于以下问题:Java Database.getDatabaseChangeLogLockTableName方法的具体用法?Java Database.getDatabaseChangeLogLockTableName怎么用?Java Database.getDatabaseChangeLogLockTableName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在liquibase.database.Database的用法示例。


在下文中一共展示了Database.getDatabaseChangeLogLockTableName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateSql

import liquibase.database.Database; //导入方法依赖的package包/类
@Override
public Sql[] generateSql(LockDatabaseChangeLogStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    String catalogName = database.getLiquibaseCatalogName();
    String schemaName = database.getDefaultSchemaName();
    String tableName = database.getDatabaseChangeLogLockTableName();
    InsertStatement insertStatement = new InsertStatement(catalogName, schemaName, tableName)
            .addColumnValue("ID", 1)
            .addColumnValue("LOCKED", Boolean.TRUE)
            .addColumnValue("LOCKEDBY", hostname + " [" + hostaddress + "]")
            .addColumnValue("LOCKGRANTED", DateTimeUtils.getCurrentTS("yyyy-MM-dd HH:mm:ss"));

    return CustomSqlGenerator.generateSql(database,
            UserSessionSettings.syncDdlStart(),
            new TruncateTableStatement(catalogName, schemaName, tableName),
            insertStatement,
            UserSessionSettings.syncDdlStop());
}
 
开发者ID:eselyavka,项目名称:liquibase-impala,代码行数:18,代码来源:ImpalaLockDatabaseChangeLogGenerator.java

示例2: generateSql

import liquibase.database.Database; //导入方法依赖的package包/类
@Override
public Sql[] generateSql(LockDatabaseChangeLogStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    String catalogName = database.getLiquibaseCatalogName();
    String schemaName = database.getDefaultSchemaName();
    String tableName = database.getDatabaseChangeLogLockTableName();
    HiveInsertStatement hiveInsertStatement = new HiveInsertStatement(catalogName, schemaName, tableName);
    hiveInsertStatement.addColumnValue(1);
    hiveInsertStatement.addColumnValue(Boolean.TRUE);
    hiveInsertStatement.addColumnValue(hostname + " (" + hostaddress + ")");
    hiveInsertStatement.addColumnValue(DateTimeUtils.getCurrentTS("yyyy-MM-dd HH:mm:ss"));

    return CustomSqlGenerator.generateSql(database,
            new TruncateTableStatement(catalogName, schemaName, tableName),
            hiveInsertStatement);
}
 
开发者ID:eselyavka,项目名称:liquibase-impala,代码行数:16,代码来源:HiveLockDatabaseChangeLogGenerator.java

示例3: generateSql

import liquibase.database.Database; //导入方法依赖的package包/类
@Override
public Sql[] generateSql(UnlockDatabaseChangeLogStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    String catalogName = database.getLiquibaseCatalogName();
    String schemaName = database.getDefaultSchemaName();
    String tableName = database.getDatabaseChangeLogLockTableName();
    HiveInsertStatement hiveInsertStatement = new HiveInsertStatement(catalogName, schemaName, tableName)
            .addColumnValue(1)
            .addColumnValue(Boolean.FALSE)
            .addColumnValue("NULL")
            .addColumnValue("NULL");

    return CustomSqlGenerator.generateSql(database,
            new TruncateTableStatement(catalogName, schemaName, tableName),
            hiveInsertStatement);
}
 
开发者ID:eselyavka,项目名称:liquibase-impala,代码行数:16,代码来源:HiveUnlockDatabaseChangeLogGenerator.java

示例4: generateSql

import liquibase.database.Database; //导入方法依赖的package包/类
@Override
public Sql[] generateSql(InitializeDatabaseChangeLogLockTableStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    String catalogName = database.getLiquibaseCatalogName();
    String schemaName = database.getDefaultSchemaName();
    String tableName = database.getDatabaseChangeLogLockTableName();
    HiveInsertStatement insertStatementHive = new HiveInsertStatement(catalogName, schemaName, tableName)
            .addColumnValue(1)
            .addColumnValue(Boolean.FALSE)
            .addColumnValue("NULL")
            .addColumnValue("NULL");

    return CustomSqlGenerator.generateSql(database,
            new TruncateTableStatement(catalogName, schemaName, tableName),
            insertStatementHive);
}
 
开发者ID:eselyavka,项目名称:liquibase-impala,代码行数:16,代码来源:HiveInitializeDatabaseChangeLogLockTableGenerator.java

示例5: generateSql

import liquibase.database.Database; //导入方法依赖的package包/类
@Override
public Sql[] generateSql(InitializeDatabaseChangeLogLockTableStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    String catalogName = database.getLiquibaseCatalogName();
    String schemaName = database.getDefaultSchemaName();
    String tableName = database.getDatabaseChangeLogLockTableName();
    InsertStatement insertStatement = new InsertStatement(catalogName, schemaName, tableName)
            .addColumnValue("ID", 1)
            .addColumnValue("LOCKED", Boolean.FALSE);

    return CustomSqlGenerator.generateSql(database,
            UserSessionSettings.syncDdlStart(),
            new TruncateTableStatement(catalogName, schemaName, tableName),
            insertStatement,
            UserSessionSettings.syncDdlStop());
}
 
开发者ID:eselyavka,项目名称:liquibase-impala,代码行数:16,代码来源:ImpalaInitializeDatabaseChangeLogLockTableGenerator.java

示例6: generateSql

import liquibase.database.Database; //导入方法依赖的package包/类
@Override
public Sql[] generateSql(UnlockDatabaseChangeLogStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    String catalogName = database.getLiquibaseCatalogName();
    String schemaName = database.getDefaultSchemaName();
    String tableName = database.getDatabaseChangeLogLockTableName();
    InsertStatement insertStatement = new InsertStatement(catalogName, schemaName, tableName)
            .addColumnValue("ID", 1)
            .addColumnValue("LOCKED", Boolean.FALSE);

    return CustomSqlGenerator.generateSql(database,
            UserSessionSettings.syncDdlStart(),
            new TruncateTableStatement(catalogName, schemaName, tableName),
            insertStatement,
            UserSessionSettings.syncDdlStop());
}
 
开发者ID:eselyavka,项目名称:liquibase-impala,代码行数:16,代码来源:ImpalaUnlockDatabaseChangeLogGenerator.java


注:本文中的liquibase.database.Database.getDatabaseChangeLogLockTableName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。