liquibase.Liquibase.getChangeLogParameters()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中liquibase.Liquibase.getChangeLogParameters()方法的一些代码示例,展示了Liquibase.getChangeLogParameters()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Liquibase.getChangeLogParameters()方法的具体详情如下:
包路径:liquibase.Liquibase
类名称:Liquibase
方法名:getChangeLogParameters

Liquibase.getChangeLogParameters介绍

暂无

代码示例

代码示例来源:origin: openmrs/openmrs-core

/**
 * Interface used for callbacks when updating the database. Implement this interface and pass it
 * to {@link DatabaseUpdater#executeChangelog(String, Map, ChangeSetExecutorCallback)}
 */
public interface ChangeSetExecutorCallback {
  
  /**
   * This method is called after each changeset is executed.
   *
   * @param changeSet the liquibase changeset that was just run
   * @param numChangeSetsToRun the total number of changesets in the current file
   */
  public void executing(ChangeSet changeSet, int numChangeSetsToRun);
}

代码示例来源:origin: org.apache.polygene.libraries/org.apache.polygene.library.sql-liquibase

@Override
  public void applyChangelog( Map<String, Object> parameters )
    throws SQLException, LiquibaseException
  {
    Liquibase liquibase = null;
    try
    {
      liquibase = newConnectedLiquibase();
      for( Map.Entry<String, Object> entry : parameters.entrySet() )
      {
        liquibase.getChangeLogParameters().set( entry.getKey(), entry.getValue() );
      }
      liquibase.update( config.get().contexts().get() );
    }
    finally
    {
      if( liquibase != null )
      {
        liquibase.getDatabase().close();
      }
    }
  }
}

代码示例来源:origin: apache/attic-polygene-java

@Override
  public void applyChangelog( Map<String, Object> parameters )
    throws SQLException, LiquibaseException
  {
    Liquibase liquibase = null;
    try
    {
      liquibase = newConnectedLiquibase();
      for( Map.Entry<String, Object> entry : parameters.entrySet() )
      {
        liquibase.getChangeLogParameters().set( entry.getKey(), entry.getValue() );
      }
      liquibase.update( config.get().contexts().get() );
    }
    finally
    {
      if( liquibase != null )
      {
        liquibase.getDatabase().close();
      }
    }
  }
}

代码示例来源:origin: gitbucket/solidbase

new LiquibaseXmlPreProcessor().preProcess(moduleId, version, source), classLoader), database);
ChangeLogParameters params = liquibase.getChangeLogParameters();
params.set("currentDateTime", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date()));

代码示例来源:origin: io.github.gitbucket/solidbase

new LiquibaseXmlPreProcessor().preProcess(moduleId, version, source), classLoader), database);
ChangeLogParameters params = liquibase.getChangeLogParameters();
params.set("currentDateTime", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date()));

代码示例来源:origin: apache/attic-polygene-java

private void applyLiquibaseChangelog( SQLDialect dialect ) throws SQLException, LiquibaseException
{
  Liquibase liquibase = liquibaseService.newConnectedLiquibase();
  Database db = liquibase.getDatabase();
  db.setObjectQuotingStrategy( ObjectQuotingStrategy.QUOTE_ALL_OBJECTS );
  try
  {
    if( !dialect.equals( SQLDialect.SQLITE ) )
    {
      if( db.supportsSchemas() )
      {
        db.setDefaultSchemaName( schema.getName() );
        db.setLiquibaseSchemaName( schema.getName() );
      }
      if( db.supportsCatalogs() )
      {
        db.setDefaultCatalogName( schema.getName() );
        db.setLiquibaseCatalogName( schema.getName() );
      }
    }
    liquibase.getChangeLogParameters().set( TABLE_NAME_LIQUIBASE_PARAMETER, table.getName() );
    liquibase.update( new Contexts() );
  }
  finally
  {
    db.close();
  }
}

相关文章