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

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

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

Liquibase.getChangeLogParameters介绍

暂无

代码示例

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

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

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

  1. @Override
  2. public void applyChangelog( Map<String, Object> parameters )
  3. throws SQLException, LiquibaseException
  4. {
  5. Liquibase liquibase = null;
  6. try
  7. {
  8. liquibase = newConnectedLiquibase();
  9. for( Map.Entry<String, Object> entry : parameters.entrySet() )
  10. {
  11. liquibase.getChangeLogParameters().set( entry.getKey(), entry.getValue() );
  12. }
  13. liquibase.update( config.get().contexts().get() );
  14. }
  15. finally
  16. {
  17. if( liquibase != null )
  18. {
  19. liquibase.getDatabase().close();
  20. }
  21. }
  22. }
  23. }

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

  1. @Override
  2. public void applyChangelog( Map<String, Object> parameters )
  3. throws SQLException, LiquibaseException
  4. {
  5. Liquibase liquibase = null;
  6. try
  7. {
  8. liquibase = newConnectedLiquibase();
  9. for( Map.Entry<String, Object> entry : parameters.entrySet() )
  10. {
  11. liquibase.getChangeLogParameters().set( entry.getKey(), entry.getValue() );
  12. }
  13. liquibase.update( config.get().contexts().get() );
  14. }
  15. finally
  16. {
  17. if( liquibase != null )
  18. {
  19. liquibase.getDatabase().close();
  20. }
  21. }
  22. }
  23. }

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

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

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

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

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

  1. private void applyLiquibaseChangelog( SQLDialect dialect ) throws SQLException, LiquibaseException
  2. {
  3. Liquibase liquibase = liquibaseService.newConnectedLiquibase();
  4. Database db = liquibase.getDatabase();
  5. db.setObjectQuotingStrategy( ObjectQuotingStrategy.QUOTE_ALL_OBJECTS );
  6. try
  7. {
  8. if( !dialect.equals( SQLDialect.SQLITE ) )
  9. {
  10. if( db.supportsSchemas() )
  11. {
  12. db.setDefaultSchemaName( schema.getName() );
  13. db.setLiquibaseSchemaName( schema.getName() );
  14. }
  15. if( db.supportsCatalogs() )
  16. {
  17. db.setDefaultCatalogName( schema.getName() );
  18. db.setLiquibaseCatalogName( schema.getName() );
  19. }
  20. }
  21. liquibase.getChangeLogParameters().set( TABLE_NAME_LIQUIBASE_PARAMETER, table.getName() );
  22. liquibase.update( new Contexts() );
  23. }
  24. finally
  25. {
  26. db.close();
  27. }
  28. }

相关文章