Class SqliteIndexBuilder
Represents an SQL index constraint builder.
public sealed class SqliteIndexBuilder : SqlIndexBuilder, ISqlIndexBuilder, ISqlConstraintBuilder, ISqlObjectBuilder
- Inheritance
-
SqliteIndexBuilder
- Implements
- Inherited Members
- Extension Methods
Remarks
SqliteDialect implementation.
Properties
Columns
Collection of columns that define this index.
public SqlIndexBuilderColumns<SqliteColumnBuilder> Columns { get; }
Property Value
Database
Database that this object belongs to.
public SqliteDatabaseBuilder Database { get; }
Property Value
PrimaryKey
Optional ISqlPrimaryKeyBuilder instance attached to this index.
public SqlitePrimaryKeyBuilder? PrimaryKey { get; }
Property Value
ReferencedColumns
Collection of columns referenced by this index's Columns.
public SqlObjectBuilderArray<SqliteColumnBuilder> ReferencedColumns { get; }
Property Value
ReferencedFilterColumns
Collection of columns referenced by this index's Filter.
public SqlObjectBuilderArray<SqliteColumnBuilder> ReferencedFilterColumns { get; }
Property Value
Table
Table that this constraint is attached to.
public SqliteTableBuilder Table { get; }
Property Value
Methods
MarkAsUnique(bool)
Changes IsUnique value of this index.
public SqliteIndexBuilder MarkAsUnique(bool enabled = true)
Parameters
enabledboolValue to set. Equal to true by default.
Returns
- SqliteIndexBuilder
this.
Exceptions
- SqlObjectBuilderException
When uniqueness cannot be changed.
MarkAsVirtual(bool)
Changes IsVirtual value of this index.
public SqliteIndexBuilder MarkAsVirtual(bool enabled = true)
Parameters
enabledboolValue to set. Equal to true by default.
Returns
- SqliteIndexBuilder
this.
Exceptions
- SqlObjectBuilderException
When virtuality cannot be changed.
SetDefaultName()
Changes the name of this object to a default name.
public SqliteIndexBuilder SetDefaultName()
Returns
- SqliteIndexBuilder
this.
Remarks
See ISqlDefaultObjectNameProvider for more information.
Exceptions
- SqlObjectBuilderException
When name cannot be changed.
SetFilter(SqlConditionNode?)
Changes Filter value of this index.
public SqliteIndexBuilder SetFilter(SqlConditionNode? filter)
Parameters
filterSqlConditionNodeValue to set.
Returns
- SqliteIndexBuilder
this.
Exceptions
- SqlObjectBuilderException
When filter cannot be changed.
SetName(string)
Changes the name of this object.
public SqliteIndexBuilder SetName(string name)
Parameters
namestringName to set.
Returns
- SqliteIndexBuilder
this.
Exceptions
- SqlObjectBuilderException
When name cannot be changed.
ToString()
Returns a string representation of this SqliteIndexBuilder instance.
[Pure]
public override string ToString()
Returns
- string
String representation.