public UploadPackageHandler( SheepItDbContext dbContext, DeploymentProcessFactory deploymentProcessFactory) { _dbContext = dbContext; _deploymentProcessFactory = deploymentProcessFactory; }
public UpdateEnvironmentsHandler( SheepItDbContext dbContext, EnvironmentFactory environmentFactory) { _dbContext = dbContext; _environmentFactory = environmentFactory; }
public CreatePackageHandler( SheepItDbContext dbContext, PackageFactory packageFactory) { _dbContext = dbContext; _packageFactory = packageFactory; }
public EnvironmentFactory( IdStorage idStorage, SheepItDbContext dbContext) { _idStorage = idStorage; _dbContext = dbContext; }
public static async Task ResetSequences(SheepItDbContext dbContext) { await ExecuteNonQueryCommand(dbContext, @" SELECT SETVAL(c.oid, 1, false) FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'S' AND n.nspname = 'public'; "); }
public CreatePackageHandler( SheepItDbContext dbContext, PackageFactory packageFactory, DeploymentProcessFactory deploymentProcessFactory) { _dbContext = dbContext; _packageFactory = packageFactory; _deploymentProcessFactory = deploymentProcessFactory; }
public DeployPackageHandler( SheepItDbContext dbContext, DeploymentFactory deploymentFactory, RunDeployment runDeployment) { _dbContext = dbContext; _deploymentFactory = deploymentFactory; _runDeployment = runDeployment; }
private static async Task ExecuteNonQueryCommand(SheepItDbContext dbContext, string sqlCommand) { await using var command = dbContext.Database .GetDbConnection() .CreateCommand(); command.CommandText = sqlCommand; command.CommandType = CommandType.Text; dbContext.Database.OpenConnection(); await command.ExecuteNonQueryAsync(); }
public CreateProjectHandler( SheepItDbContext dbContext, PackageFactory packageFactory, DeploymentProcessFactory deploymentProcessFactory, EnvironmentFactory environmentFactory, ProjectFactory projectFactory, ComponentFactory componentFactory) { _dbContext = dbContext; _packageFactory = packageFactory; _deploymentProcessFactory = deploymentProcessFactory; _environmentFactory = environmentFactory; _projectFactory = projectFactory; _componentFactory = componentFactory; }
public static async Task TruncateDatabase(SheepItDbContext dbContext) { await ExecuteNonQueryCommand(dbContext, @" DO $func$ DECLARE statements CURSOR FOR SELECT tablename FROM pg_tables WHERE schemaname = 'public' and tablename <> '__EFMigrationsHistory'; BEGIN FOR stmt IN statements LOOP EXECUTE 'TRUNCATE TABLE ' || quote_ident(stmt.tablename) || ' CASCADE;'; END LOOP; END; $func$; "); }
public GetEnvironmentsForUpdateHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public UpdateComponentsHandler(SheepItDbContext dbContext, ComponentFactory componentFactory) { _dbContext = dbContext; _componentFactory = componentFactory; }
public ListComponentsHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public GetPackageDetailsHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public GetEnvironmentsListHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public GetProjectDashboardLastDeploymentsQuery(SheepItDbContext dbContext) { _dbContext = dbContext; }
public GetDeploymentDetailsHandler( SheepItDbContext dbContext) { _dbContext = dbContext; }
public GetDeploymentsListHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public ProjectFactory(SheepItDbContext dbContext) { _dbContext = dbContext; }
public IdStorage(SheepItDbContext context) { _context = context; }
public GetComponentsForUpdateHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public ListProjectsHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public ListPackageDeploymentsHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public GetProjectDashboardHandler( SheepItDbContext dbContext) { _dbContext = dbContext; }
public GetLastPackageHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }
public GetPackagesListHandler(SheepItDbContext dbContext) { _dbContext = dbContext; }