// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java
// public interface ICloudSpanner extends Database {
// }


import liquibase.database.Database;
import liquibase.exception.ValidationErrors;
import liquibase.sql.Sql;
import liquibase.sqlgenerator.SqlGeneratorChain;
import liquibase.sqlgenerator.SqlGeneratorFactory;
import liquibase.sqlgenerator.core.AbstractSqlGenerator;
import liquibase.statement.SqlStatement;
import liquibase.statement.core.DeleteStatement;
import liquibase.statement.core.InitializeDatabaseChangeLogLockTableStatement;
import liquibase.statement.core.InsertStatement;
import liquibase.ext.spanner.ICloudSpanner;
      Database database,
      SqlGeneratorChain<InitializeDatabaseChangeLogLockTableStatement> sqlGenerator) {
    return new ValidationErrors();
  }

  @Override
  public Sql[] generateSql(
      InitializeDatabaseChangeLogLockTableStatement statement,
      Database database,
      SqlGeneratorChain<InitializeDatabaseChangeLogLockTableStatement> sqlGenerator) {
    return SqlGeneratorFactory.getInstance()
        .generateSql(
            new SqlStatement[] {
              new DeleteStatement(
                      database.getLiquibaseCatalogName(),
                      database.getLiquibaseSchemaName(),
                      database.getDatabaseChangeLogLockTableName())
                  .setWhere("true"),
              new InsertStatement(
                      database.getLiquibaseCatalogName(),
                      database.getLiquibaseSchemaName(),
                      database.getDatabaseChangeLogLockTableName())
                  .addColumnValue("ID", 1)
                  .addColumnValue("LOCKED", Boolean.FALSE)
            },
            database);
  }

  @Override
  public boolean supports(InitializeDatabaseChangeLogLockTableStatement statement, Database database) {
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java
// public interface ICloudSpanner extends Database {
// }


// Path: src/main/java/liquibase/ext/spanner/sqlgenerator/InitializeChangeLogLockTableGeneratorSpanner.java
import liquibase.database.Database;
import liquibase.exception.ValidationErrors;
import liquibase.sql.Sql;
import liquibase.sqlgenerator.SqlGeneratorChain;
import liquibase.sqlgenerator.SqlGeneratorFactory;
import liquibase.sqlgenerator.core.AbstractSqlGenerator;
import liquibase.statement.SqlStatement;
import liquibase.statement.core.DeleteStatement;
import liquibase.statement.core.InitializeDatabaseChangeLogLockTableStatement;
import liquibase.statement.core.InsertStatement;
import liquibase.ext.spanner.ICloudSpanner;

      Database database,
      SqlGeneratorChain<InitializeDatabaseChangeLogLockTableStatement> sqlGenerator) {
    return new ValidationErrors();
  }

  @Override
  public Sql[] generateSql(
      InitializeDatabaseChangeLogLockTableStatement statement,
      Database database,
      SqlGeneratorChain<InitializeDatabaseChangeLogLockTableStatement> sqlGenerator) {
    return SqlGeneratorFactory.getInstance()
        .generateSql(
            new SqlStatement[] {
              new DeleteStatement(
                      database.getLiquibaseCatalogName(),
                      database.getLiquibaseSchemaName(),
                      database.getDatabaseChangeLogLockTableName())
                  .setWhere("true"),
              new InsertStatement(
                      database.getLiquibaseCatalogName(),
                      database.getLiquibaseSchemaName(),
                      database.getDatabaseChangeLogLockTableName())
                  .addColumnValue("ID", 1)
                  .addColumnValue("LOCKED", Boolean.FALSE)
            },
            database);
  }

  @Override
  public boolean supports(InitializeDatabaseChangeLogLockTableStatement statement, Database database) {
    return (database instanceof ICloudSpanner);