Table of Contents

Class MigrationGenerator<TState>

Namespace
The.SQL.Schema
Assembly
Instagile.dll

Manages the stateful part of migration generation, using a dialect to produce the actual per-event SQL

public class MigrationGenerator<TState> : MigrationGenerator where TState : IDDLState<TState>

Type Parameters

TState
Inheritance
MigrationGenerator<TState>
Inherited Members

Constructors

MigrationGenerator(Func<TState, IDDLDialect>, params IEvent[])

public MigrationGenerator(Func<TState, IDDLDialect> getDialect, params IEvent[] history)

Parameters

getDialect Func<TState, IDDLDialect>
history IEvent[]

Methods

GenerateDDL(IEnumerable<IEvent>)

Add events to the current migration and emit SQL

public override IReadOnlyList<string> GenerateDDL(IEnumerable<IEvent> es)

Parameters

es IEnumerable<IEvent>

Returns

IReadOnlyList<string>

GenerateTriggers()

Emit trigger SQL which should be executed before and after a migration's DDL

public override (IReadOnlyList<IReadOnlyList<string>> before, IReadOnlyList<IReadOnlyList<string>> after) GenerateTriggers()

Returns

(IReadOnlyList<IReadOnlyList<string>> before, IReadOnlyList<IReadOnlyList<string>> after)

GetDialect()

public override IDDLDialect GetDialect()

Returns

IDDLDialect

InitialSetup()

When iterated, emit rerunnable db-setup scripts

public override IEnumerable<IEnumerable<string>> InitialSetup()

Returns

IEnumerable<IEnumerable<string>>

SkipDDL(params IEvent[])

Adds some events to the current migration without emitting the corresponding SQL

public override void SkipDDL(params IEvent[] es)

Parameters

es IEvent[]