Class SqlServerExtensions
Inheritance
SqlServerExtensions
Assembly: FluentMigrator.Extensions.SqlServer.dll
Syntax
public static class SqlServerExtensions
Fields
|
Edit this page
View Source
ConstraintType
Declaration
public static readonly string ConstraintType
Field Value
|
Edit this page
View Source
DataCompression
Declaration
public static readonly string DataCompression
Field Value
|
Edit this page
View Source
IdentityIncrement
Declaration
public static readonly string IdentityIncrement
Field Value
|
Edit this page
View Source
IdentityInsert
Declaration
public static readonly string IdentityInsert
Field Value
|
Edit this page
View Source
IdentitySeed
Declaration
public static readonly string IdentitySeed
Field Value
|
Edit this page
View Source
IncludesList
Declaration
public static readonly string IncludesList
Field Value
|
Edit this page
View Source
IndexColumnNullsDistinct
Declaration
public static readonly string IndexColumnNullsDistinct
Field Value
|
Edit this page
View Source
IndexFilter
Declaration
public static readonly string IndexFilter
Field Value
|
Edit this page
View Source
OnlineIndex
Declaration
public static readonly string OnlineIndex
Field Value
|
Edit this page
View Source
RowGuidColumn
Declaration
public static readonly string RowGuidColumn
Field Value
|
Edit this page
View Source
SchemaAuthorization
Declaration
public static readonly string SchemaAuthorization
Field Value
|
Edit this page
View Source
SparseColumn
Declaration
public static readonly string SparseColumn
Field Value
Methods
|
Edit this page
View Source
Authorization(ICreateSchemaOptionsSyntax, string)
Sets the schema owner during schema creation
Declaration
public static ICreateSchemaOptionsSyntax Authorization(this ICreateSchemaOptionsSyntax expression, string owner)
Parameters
Returns
|
Edit this page
View Source
Clustered(ICreateConstraintOptionsSyntax)
Declaration
public static void Clustered(this ICreateConstraintOptionsSyntax expression)
Parameters
|
Edit this page
View Source
Filter(ICreateIndexOptionsSyntax, string)
Declaration
public static ICreateIndexOptionsSyntax Filter(this ICreateIndexOptionsSyntax expression, string filter)
Parameters
Returns
|
Edit this page
View Source
Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, int, int)
Makes a column an Identity column using the specified seed and increment values.
Declaration
public static TNext Identity<TNext, TNextFk>(this IColumnOptionSyntax<TNext, TNextFk> expression, int seed, int increment) where TNext : IFluentSyntax where TNextFk : IFluentSyntax
Parameters
Type |
Name |
Description |
IColumnOptionSyntax<TNext, TNextFk> |
expression |
Column on which to apply the identity.
|
int |
seed |
Starting value of the identity.
|
int |
increment |
Increment value of the identity.
|
Returns
Type Parameters
Name |
Description |
TNext |
|
TNextFk |
|
|
Edit this page
View Source
Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, long, int)
Makes a column an Identity column using the specified seed and increment values with bigint support.
Declaration
public static TNext Identity<TNext, TNextFk>(this IColumnOptionSyntax<TNext, TNextFk> expression, long seed, int increment) where TNext : IFluentSyntax where TNextFk : IFluentSyntax
Parameters
Type |
Name |
Description |
IColumnOptionSyntax<TNext, TNextFk> |
expression |
Column on which to apply the identity.
|
long |
seed |
Starting value of the identity.
|
int |
increment |
Increment value of the identity.
|
Returns
Type Parameters
Name |
Description |
TNext |
|
TNextFk |
|
|
Edit this page
View Source
Include(ICreateIndexOnColumnSyntax, string)
Declaration
public static ICreateIndexNonKeyColumnSyntax Include(this ICreateIndexOnColumnSyntax expression, string columnName)
Parameters
Returns
|
Edit this page
View Source
Include(ICreateIndexOptionsSyntax, string)
Declaration
public static ICreateIndexOptionsSyntax Include(this ICreateIndexOptionsSyntax expression, string columnName)
Parameters
Returns
|
Edit this page
View Source
NonClustered(ICreateConstraintOptionsSyntax)
Declaration
public static void NonClustered(this ICreateConstraintOptionsSyntax expression)
Parameters
|
Edit this page
View Source
NullsDistinct(ICreateIndexColumnUniqueOptionsSyntax, bool)
Column should have unique values. Only one row with null value should be accepted (default for most known database engines).
Declaration
public static ICreateIndexColumnUniqueOptionsSyntax NullsDistinct(this ICreateIndexColumnUniqueOptionsSyntax expression, bool nullsAreDistinct = true)
Parameters
Returns
|
Edit this page
View Source
NullsDistinct(ICreateIndexMoreColumnOptionsSyntax, bool)
Column should have unique values. Only one row with null value should be accepted (default for most known database engines).
Declaration
public static ICreateIndexOnColumnSyntax NullsDistinct(this ICreateIndexMoreColumnOptionsSyntax expression, bool nullsAreDistinct = true)
Parameters
Returns
|
Edit this page
View Source
NullsNotDistinct(ICreateIndexColumnUniqueOptionsSyntax)
Column should have unique values, but multiple rows with null values should be accepted.
Declaration
public static ICreateIndexColumnUniqueOptionsSyntax NullsNotDistinct(this ICreateIndexColumnUniqueOptionsSyntax expression)
Parameters
Returns
|
Edit this page
View Source
NullsNotDistinct(ICreateIndexMoreColumnOptionsSyntax)
Column should have unique values, but multiple rows with null values should be accepted.
Declaration
public static ICreateIndexOnColumnSyntax NullsNotDistinct(this ICreateIndexMoreColumnOptionsSyntax expression)
Parameters
Returns
|
Edit this page
View Source
Online(ICreateConstraintOptionsSyntax, bool)
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation.
The ONLINE option can only be specified in certain situations, please refer to documentation for SQL Server 2005 and newer.
Declaration
public static ICreateConstraintOptionsSyntax Online(this ICreateConstraintOptionsSyntax expression, bool active = true)
Parameters
Type |
Name |
Description |
ICreateConstraintOptionsSyntax |
expression |
The expression to use to set the WITH(ONLINE=) option
|
bool |
active |
true
Long-term table locks are not held. This allows queries or updates to the underlying table to continue.
false
Table locks are applied and the table is unavailable for the duration of the index operation.
|
Returns
|
Edit this page
View Source
Online(ICreateIndexOptionsSyntax, bool)
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation.
The ONLINE option can only be specified in certain situations, please refer to documentation for SQL Server 2005 and newer.
Declaration
public static ICreateIndexOptionsSyntax Online(this ICreateIndexOptionsSyntax expression, bool active = true)
Parameters
Type |
Name |
Description |
ICreateIndexOptionsSyntax |
expression |
The expression to use to set the WITH(ONLINE=) option
|
bool |
active |
true
Long-term table locks are not held. This allows queries or updates to the underlying table to continue.
false
Table locks are applied and the table is unavailable for the duration of the index operation.
|
Returns
|
Edit this page
View Source
Online(IDeleteConstraintInSchemaOptionsSyntax, bool)
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation.
The ONLINE option can only be specified in certain situations, please refer to documentation for SQL Server 2005 and newer.
Declaration
public static IDeleteConstraintInSchemaOptionsSyntax Online(this IDeleteConstraintInSchemaOptionsSyntax expression, bool active = true)
Parameters
Type |
Name |
Description |
IDeleteConstraintInSchemaOptionsSyntax |
expression |
The expression to use to set the WITH(ONLINE=) option
|
bool |
active |
true
Long-term table locks are not held. This allows queries or updates to the underlying table to continue.
false
Table locks are applied and the table is unavailable for the duration of the index operation.
|
Returns
|
Edit this page
View Source
Online(IDeleteIndexOptionsSyntax, bool)
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation.
The ONLINE option can only be specified in certain situations, please refer to documentation for SQL Server 2005 and newer.
Declaration
public static IDeleteIndexOptionsSyntax Online(this IDeleteIndexOptionsSyntax expression, bool active = true)
Parameters
Type |
Name |
Description |
IDeleteIndexOptionsSyntax |
expression |
The expression to use to set the WITH(ONLINE=) option
|
bool |
active |
true
Long-term table locks are not held. This allows queries or updates to the underlying table to continue.
false
Table locks are applied and the table is unavailable for the duration of the index operation.
|
Returns
|
Edit this page
View Source
RowGuid(ICreateTableColumnOptionOrWithColumnSyntax)
Declaration
public static ICreateTableColumnOptionOrWithColumnSyntax RowGuid(this ICreateTableColumnOptionOrWithColumnSyntax expression)
Parameters
Returns
|
Edit this page
View Source
Sparse(ICreateTableColumnOptionOrWithColumnSyntax)
Declaration
public static ICreateTableColumnOptionOrWithColumnSyntax Sparse(this ICreateTableColumnOptionOrWithColumnSyntax expression)
Parameters
Returns
|
Edit this page
View Source
UniqueNullsDistinct(ICreateIndexOptionsSyntax, bool)
Index should have unique values. Only one row with null value should be accepted (default for most known database engines).
Declaration
public static ICreateIndexOnColumnSyntax UniqueNullsDistinct(this ICreateIndexOptionsSyntax expression, bool nullsAreDistinct = true)
Parameters
Type |
Name |
Description |
ICreateIndexOptionsSyntax |
expression |
The expression to set this option for
|
bool |
nullsAreDistinct |
true when nulls should be distinct
|
Returns
|
Edit this page
View Source
UniqueNullsNotDistinct(ICreateIndexOptionsSyntax)
Index should have unique values, but multiple rows with null values should be accepted.
Declaration
public static ICreateIndexOnColumnSyntax UniqueNullsNotDistinct(this ICreateIndexOptionsSyntax expression)
Parameters
Returns
|
Edit this page
View Source
WithDataCompression(ICreateIndexOptionsSyntax, DataCompressionType)
Declaration
public static ICreateIndexOptionsSyntax WithDataCompression(this ICreateIndexOptionsSyntax expression, DataCompressionType dataCompressionType)
Parameters
Returns
|
Edit this page
View Source
WithIdentityInsert(IInsertDataSyntax)
Inserts data using Sql Server's IDENTITY INSERT feature.
Declaration
public static IInsertDataSyntax WithIdentityInsert(this IInsertDataSyntax expression)
Parameters
Returns