Exemple #1
0
        public void DropTable(string tableName, DropOptions options = null)
        {
            var commandText = _commandFormatter.DropTable(tableName, options);

            Execute(cmd =>
            {
                cmd.ExecuteNonQuery();
            }, commandText);
        }
Exemple #2
0
 static int RunDrop(ILogger logger, DatabaseConnectionSettings settings, DropOptions options) => Drop.Run(logger, settings);
Exemple #3
0
        private string IfExists(DropOptions options = null)
        {
            var ifExists = options?.IfExists ?? true;

            return(ifExists ? " IF EXISTS" : "");
        }
Exemple #4
0
 public string DropTable(string name, DropOptions options = null)
 {
     return(Drop("TABLE", name, options));
 }
Exemple #5
0
 private string Drop(string subject, string name, DropOptions options = null)
 {
     return($"DROP {subject}{IfExists(options)} {name}");
 }
Exemple #6
0
 static PostgresOptions()
 {
     Drop = new DropOptions();
 }
Exemple #7
0
        public async Task DropTable(string tableName, DropOptions options = null)
        {
            var commandText = _commandFormatter.DropTable(tableName, options);

            await ExecuteNonQueryAsync(commandText);
        }
Exemple #8
0
        public static void DropDatabase(DropOptions options, string[] args)
        {
            MigrationDbContext dbContext = CreateDbContext(args);

            DropDatabaseInternal(dbContext);
        }
Exemple #9
0
 static int RunDrop(ILogger logger, DropOptions options) => Drop.Run(logger);
Exemple #10
0
 static PostgresOptions()
 {
     Drop = new DropOptions();
 }