Table of Contents

Class SqliteIndexBuilder

Namespace
LfrlAnvil.Sqlite.Objects.Builders
Assembly
LfrlAnvil.Sqlite.dll

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

SqlIndexBuilderColumns<SqliteColumnBuilder>

Database

Database that this object belongs to.

public SqliteDatabaseBuilder Database { get; }

Property Value

SqliteDatabaseBuilder

PrimaryKey

Optional ISqlPrimaryKeyBuilder instance attached to this index.

public SqlitePrimaryKeyBuilder? PrimaryKey { get; }

Property Value

SqlitePrimaryKeyBuilder

ReferencedColumns

Collection of columns referenced by this index's Columns.

public SqlObjectBuilderArray<SqliteColumnBuilder> ReferencedColumns { get; }

Property Value

SqlObjectBuilderArray<SqliteColumnBuilder>

ReferencedFilterColumns

Collection of columns referenced by this index's Filter.

public SqlObjectBuilderArray<SqliteColumnBuilder> ReferencedFilterColumns { get; }

Property Value

SqlObjectBuilderArray<SqliteColumnBuilder>

Table

Table that this constraint is attached to.

public SqliteTableBuilder Table { get; }

Property Value

SqliteTableBuilder

Methods

MarkAsUnique(bool)

Changes IsUnique value of this index.

public SqliteIndexBuilder MarkAsUnique(bool enabled = true)

Parameters

enabled bool

Value 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

enabled bool

Value 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

filter SqlConditionNode

Value 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

name string

Name 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.