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

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

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

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

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