public void DropTable(string tableName, DropOptions options = null) { var commandText = _commandFormatter.DropTable(tableName, options); Execute(cmd => { cmd.ExecuteNonQuery(); }, commandText); }
static int RunDrop(ILogger logger, DatabaseConnectionSettings settings, DropOptions options) => Drop.Run(logger, settings);
private string IfExists(DropOptions options = null) { var ifExists = options?.IfExists ?? true; return(ifExists ? " IF EXISTS" : ""); }
public string DropTable(string name, DropOptions options = null) { return(Drop("TABLE", name, options)); }
private string Drop(string subject, string name, DropOptions options = null) { return($"DROP {subject}{IfExists(options)} {name}"); }
static PostgresOptions() { Drop = new DropOptions(); }
public async Task DropTable(string tableName, DropOptions options = null) { var commandText = _commandFormatter.DropTable(tableName, options); await ExecuteNonQueryAsync(commandText); }
public static void DropDatabase(DropOptions options, string[] args) { MigrationDbContext dbContext = CreateDbContext(args); DropDatabaseInternal(dbContext); }
static int RunDrop(ILogger logger, DropOptions options) => Drop.Run(logger);