-
Notifications
You must be signed in to change notification settings - Fork 649
/
IDeleteExpressionRoot.cs
119 lines (105 loc) · 4.28 KB
/
IDeleteExpressionRoot.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#region License
//
// Copyright (c) 2007-2024, Fluent Migrator Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion
using FluentMigrator.Builders.Delete.Column;
using FluentMigrator.Builders.Delete.DefaultConstraint;
using FluentMigrator.Builders.Delete.ForeignKey;
using FluentMigrator.Infrastructure;
using FluentMigrator.Builders.Delete.Index;
using FluentMigrator.Builders.Delete.Constraint;
namespace FluentMigrator.Builders.Delete
{
/// <summary>
/// The root expression for a DELETE operation
/// </summary>
public interface IDeleteExpressionRoot : IFluentSyntax
{
/// <summary>
/// Specify the schema to delete
/// </summary>
/// <param name="schemaName">The name of the schema</param>
void Schema(string schemaName);
/// <summary>
/// Specify the table to delete
/// </summary>
/// <param name="tableName">The table name</param>
/// <returns>The next step</returns>
IIfExistsOrInSchemaSyntax Table(string tableName);
/// <summary>
/// Specify the column to delete
/// </summary>
/// <param name="columnName">The column name</param>
/// <returns>The next step</returns>
IDeleteColumnFromTableSyntax Column(string columnName);
/// <summary>
/// Specify that a foreign key with a default name should be deleted
/// </summary>
/// <returns>The next step</returns>
IDeleteForeignKeyFromTableSyntax ForeignKey();
/// <summary>
/// Specify that a foreign key with the given name should be deleted
/// </summary>
/// <param name="foreignKeyName">The foreign key name</param>
/// <returns>The next step</returns>
IDeleteForeignKeyOnTableSyntax ForeignKey(string foreignKeyName);
/// <summary>
/// Deletes data from a table
/// </summary>
/// <param name="tableName">The table name</param>
/// <returns>The next step</returns>
IDeleteDataOrInSchemaSyntax FromTable(string tableName);
/// <summary>
/// Deletes an index
/// </summary>
/// <param name="indexName">the name of the index</param>
/// <returns>The next step</returns>
IDeleteIndexForTableSyntax Index(string indexName);
/// <summary>
/// Deletes an index, based on the naming convention in effect
/// </summary>
/// <returns>The next step</returns>
IDeleteIndexForTableSyntax Index();
/// <summary>
/// Delete a sequence with the given name
/// </summary>
/// <param name="sequenceName">The sequence name</param>
/// <returns>The next step</returns>
IInSchemaSyntax Sequence(string sequenceName);
/// <summary>
/// Deletes a named Primary Key from a table
/// </summary>
/// <param name="primaryKeyName">The name of the primary key</param>
/// <returns>The next step</returns>
IDeleteConstraintOnTableSyntax PrimaryKey(string primaryKeyName);
/// <summary>
/// Deletes a named Unique Constraint From a table
/// </summary>
/// <param name="constraintName">The constraint name</param>
/// <returns>The next step</returns>
IDeleteConstraintOnTableSyntax UniqueConstraint(string constraintName);
/// <summary>
/// Deletes a named Unique Constraint from a table based on the naming convention in effect
/// </summary>
/// <returns>The next step</returns>
IDeleteConstraintOnTableSyntax UniqueConstraint();
/// <summary>
/// Deletes a default constraint from a column
/// </summary>
/// <returns>The next step</returns>
IDeleteDefaultConstraintOnTableSyntax DefaultConstraint();
}
}