Search Results for

    Show / Hide Table of Contents

    Class PostgresGenerator

    Inheritance
    object
    GeneratorBase
    GenericGenerator
    PostgresGenerator
    Postgres10_0Generator
    Postgres10_0Generator
    Postgres11_0Generator
    Postgres92Generator
    Postgres92Generator
    Postgres92Generator
    Implements
    IMigrationGenerator
    Inherited Members
    GenericGenerator.compatabilityMode
    GenericGenerator.CompatibilityMode
    GenericGenerator.DropTableIfExists
    GenericGenerator.RenameTable
    GenericGenerator.CreateSchema
    GenericGenerator.AlterSchema
    GenericGenerator.DropSchema
    GenericGenerator.CreateIndex
    GenericGenerator.DropIndex
    GenericGenerator.InsertData
    GenericGenerator.UpdateData
    GenericGenerator.DeleteData
    GenericGenerator.CreateConstraint
    GenericGenerator.DeleteConstraint
    GenericGenerator.CreateForeignKeyConstraint
    GenericGenerator.GetUniqueString(CreateIndexExpression)
    GenericGenerator.GetClusterTypeString(CreateIndexExpression)
    GenericGenerator.GenerateForeignKeyName(ForeignKeyDefinition)
    GenericGenerator.AppendSqlStatementEndToken(StringBuilder)
    GenericGenerator.GenerateColumnNamesAndValues(InsertDataExpression)
    GenericGenerator.ValidateAdditionalFeatureCompatibility(IEnumerable<KeyValuePair<string, object>>)
    GeneratorBase.Column
    GeneratorBase.Quoter
    GeneratorBase.DescriptionGenerator
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: FluentMigrator.Runner.Generators.Postgres
    Assembly: FluentMigrator.Runner.Postgres.dll
    Syntax
    public class PostgresGenerator : GenericGenerator, IMigrationGenerator

    Constructors

    PostgresGenerator(IColumn, PostgresQuoter, IOptions<GeneratorOptions>)

    Declaration
    protected PostgresGenerator(IColumn column, PostgresQuoter quoter, IOptions<GeneratorOptions> generatorOptions)
    Parameters
    Type Name Description
    IColumn column
    PostgresQuoter quoter
    IOptions<GeneratorOptions> generatorOptions

    PostgresGenerator(PostgresQuoter)

    Declaration
    public PostgresGenerator(PostgresQuoter quoter)
    Parameters
    Type Name Description
    PostgresQuoter quoter

    PostgresGenerator(PostgresQuoter, IOptions<GeneratorOptions>)

    Declaration
    public PostgresGenerator(PostgresQuoter quoter, IOptions<GeneratorOptions> generatorOptions)
    Parameters
    Type Name Description
    PostgresQuoter quoter
    IOptions<GeneratorOptions> generatorOptions

    PostgresGenerator(PostgresQuoter, IOptions<GeneratorOptions>, ITypeMap)

    Declaration
    protected PostgresGenerator(PostgresQuoter quoter, IOptions<GeneratorOptions> generatorOptions, ITypeMap typeMap)
    Parameters
    Type Name Description
    PostgresQuoter quoter
    IOptions<GeneratorOptions> generatorOptions
    ITypeMap typeMap

    Properties

    AddColumn

    Declaration
    public override string AddColumn { get; }
    Property Value
    Type Description
    string
    Overrides
    GenericGenerator.AddColumn

    AlterColumn

    Declaration
    public override string AlterColumn { get; }
    Property Value
    Type Description
    string
    Overrides
    GenericGenerator.AlterColumn

    CreateTable

    Declaration
    public override string CreateTable { get; }
    Property Value
    Type Description
    string
    Overrides
    GenericGenerator.CreateTable

    DropColumn

    Declaration
    public override string DropColumn { get; }
    Property Value
    Type Description
    string
    Overrides
    GenericGenerator.DropColumn

    DropTable

    Declaration
    public override string DropTable { get; }
    Property Value
    Type Description
    string
    Overrides
    GenericGenerator.DropTable

    RenameColumn

    Declaration
    public override string RenameColumn { get; }
    Property Value
    Type Description
    string
    Overrides
    GenericGenerator.RenameColumn

    Methods

    Generate(AlterColumnExpression)

    Generates a ALTER TABLE ALTER COLUMN SQL statement

    Declaration
    public override string Generate(AlterColumnExpression expression)
    Parameters
    Type Name Description
    AlterColumnExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(AlterColumnExpression)

    Generate(AlterDefaultConstraintExpression)

    Generates an SQL statement to alter a DEFAULT constraint

    Declaration
    public override string Generate(AlterDefaultConstraintExpression expression)
    Parameters
    Type Name Description
    AlterDefaultConstraintExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GeneratorBase.Generate(AlterDefaultConstraintExpression)

    Generate(AlterSchemaExpression)

    Generates an SQL statement to move a table from one schema to another

    Declaration
    public override string Generate(AlterSchemaExpression expression)
    Parameters
    Type Name Description
    AlterSchemaExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(AlterSchemaExpression)

    Generate(AlterTableExpression)

    Generates a ALTER TABLE SQL statement

    Declaration
    public override string Generate(AlterTableExpression expression)
    Parameters
    Type Name Description
    AlterTableExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GeneratorBase.Generate(AlterTableExpression)

    Generate(CreateColumnExpression)

    Generates a ALTER TABLE ADD COLUMN SQL statement

    Declaration
    public override string Generate(CreateColumnExpression expression)
    Parameters
    Type Name Description
    CreateColumnExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(CreateColumnExpression)

    Generate(CreateConstraintExpression)

    Generates an SQL statement to create a constraint

    Declaration
    public override string Generate(CreateConstraintExpression expression)
    Parameters
    Type Name Description
    CreateConstraintExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(CreateConstraintExpression)

    Generate(CreateForeignKeyExpression)

    Generates an SQL statement to create a foreign key

    Declaration
    public override string Generate(CreateForeignKeyExpression expression)
    Parameters
    Type Name Description
    CreateForeignKeyExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(CreateForeignKeyExpression)

    Generate(CreateIndexExpression)

    Generates an SQL statement to create an index

    Declaration
    public override string Generate(CreateIndexExpression expression)
    Parameters
    Type Name Description
    CreateIndexExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(CreateIndexExpression)

    Generate(CreateSchemaExpression)

    Generates a CREATE SCHEMA SQL statement

    Declaration
    public override string Generate(CreateSchemaExpression expression)
    Parameters
    Type Name Description
    CreateSchemaExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(CreateSchemaExpression)

    Generate(CreateSequenceExpression)

    Generates a CREATE SEQUENCE SQL statement

    Declaration
    public override string Generate(CreateSequenceExpression expression)
    Parameters
    Type Name Description
    CreateSequenceExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(CreateSequenceExpression)

    Generate(CreateTableExpression)

    Outputs a create table string

    Declaration
    public override string Generate(CreateTableExpression expression)
    Parameters
    Type Name Description
    CreateTableExpression expression
    Returns
    Type Description
    string
    Overrides
    GenericGenerator.Generate(CreateTableExpression)

    Generate(DeleteColumnExpression)

    Generates a ALTER TABLE DROP COLUMN SQL statement

    Declaration
    public override string Generate(DeleteColumnExpression expression)
    Parameters
    Type Name Description
    DeleteColumnExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(DeleteColumnExpression)

    Generate(DeleteConstraintExpression)

    Generates an SQL statement to drop a constraint

    Declaration
    public override string Generate(DeleteConstraintExpression expression)
    Parameters
    Type Name Description
    DeleteConstraintExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(DeleteConstraintExpression)

    Generate(DeleteDataExpression)

    Generates an SQL statement to DELETE data

    Declaration
    public override string Generate(DeleteDataExpression expression)
    Parameters
    Type Name Description
    DeleteDataExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(DeleteDataExpression)

    Generate(DeleteDefaultConstraintExpression)

    Generates an SQL statement to drop a default constraint

    Declaration
    public override string Generate(DeleteDefaultConstraintExpression expression)
    Parameters
    Type Name Description
    DeleteDefaultConstraintExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GeneratorBase.Generate(DeleteDefaultConstraintExpression)

    Generate(DeleteForeignKeyExpression)

    Generates an SQL statement to delete a foreign key

    Declaration
    public override string Generate(DeleteForeignKeyExpression expression)
    Parameters
    Type Name Description
    DeleteForeignKeyExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(DeleteForeignKeyExpression)

    Generate(DeleteIndexExpression)

    Generates an SQL statement to drop an index

    Declaration
    public override string Generate(DeleteIndexExpression expression)
    Parameters
    Type Name Description
    DeleteIndexExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(DeleteIndexExpression)

    Generate(DeleteSchemaExpression)

    Generates a DROP SCHEMA SQL statement

    Declaration
    public override string Generate(DeleteSchemaExpression expression)
    Parameters
    Type Name Description
    DeleteSchemaExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(DeleteSchemaExpression)

    Generate(DeleteSequenceExpression)

    Generates a DROP SEQUENCE SQL statement

    Declaration
    public override string Generate(DeleteSequenceExpression expression)
    Parameters
    Type Name Description
    DeleteSequenceExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(DeleteSequenceExpression)

    Generate(DeleteTableExpression)

    Generates a DROP TABLE SQL statement

    Declaration
    public override string Generate(DeleteTableExpression expression)
    Parameters
    Type Name Description
    DeleteTableExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(DeleteTableExpression)

    Generate(InsertDataExpression)

    Generates an SQL statement to INSERT data

    Declaration
    public override string Generate(InsertDataExpression expression)
    Parameters
    Type Name Description
    InsertDataExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(InsertDataExpression)

    Generate(RenameColumnExpression)

    Generates an SQL statement to rename a column

    Declaration
    public override string Generate(RenameColumnExpression expression)
    Parameters
    Type Name Description
    RenameColumnExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(RenameColumnExpression)

    Generate(RenameTableExpression)

    Generates an SQL statement to rename a table

    Declaration
    public override string Generate(RenameTableExpression expression)
    Parameters
    Type Name Description
    RenameTableExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(RenameTableExpression)

    Generate(UpdateDataExpression)

    Generates an SQL statement to UPDATE data

    Declaration
    public override string Generate(UpdateDataExpression expression)
    Parameters
    Type Name Description
    UpdateDataExpression expression

    The expression to create the SQL for

    Returns
    Type Description
    string

    The generated SQL

    Overrides
    GenericGenerator.Generate(UpdateDataExpression)

    GetAllowIndexStorageParameters()

    Declaration
    protected virtual HashSet<string> GetAllowIndexStorageParameters()
    Returns
    Type Description
    HashSet<string>

    GetAsConcurrently(CreateIndexExpression)

    Declaration
    protected virtual string GetAsConcurrently(CreateIndexExpression expression)
    Parameters
    Type Name Description
    CreateIndexExpression expression
    Returns
    Type Description
    string

    GetAsOnly(CreateIndexExpression)

    Declaration
    protected virtual string GetAsOnly(CreateIndexExpression expression)
    Parameters
    Type Name Description
    CreateIndexExpression expression
    Returns
    Type Description
    string

    GetColumnList(IEnumerable<string>)

    Declaration
    protected string GetColumnList(IEnumerable<string> columns)
    Parameters
    Type Name Description
    IEnumerable<string> columns
    Returns
    Type Description
    string

    GetDataList(List<object>)

    Declaration
    protected string GetDataList(List<object> data)
    Parameters
    Type Name Description
    List<object> data
    Returns
    Type Description
    string

    GetFilter(CreateIndexExpression)

    Declaration
    protected virtual string GetFilter(CreateIndexExpression expression)
    Parameters
    Type Name Description
    CreateIndexExpression expression
    Returns
    Type Description
    string

    GetIncludeString(CreateIndexExpression)

    Declaration
    protected virtual string GetIncludeString(CreateIndexExpression column)
    Parameters
    Type Name Description
    CreateIndexExpression column
    Returns
    Type Description
    string

    GetIndexMethod(CreateIndexExpression)

    Declaration
    protected virtual Algorithm GetIndexMethod(CreateIndexExpression expression)
    Parameters
    Type Name Description
    CreateIndexExpression expression
    Returns
    Type Description
    Algorithm

    GetNullsSort(IndexColumnDefinition)

    Declaration
    protected virtual string GetNullsSort(IndexColumnDefinition column)
    Parameters
    Type Name Description
    IndexColumnDefinition column
    Returns
    Type Description
    string

    GetOverridingIdentityValuesString(InsertDataExpression)

    Declaration
    protected virtual string GetOverridingIdentityValuesString(InsertDataExpression expression)
    Parameters
    Type Name Description
    InsertDataExpression expression
    Returns
    Type Description
    string

    GetTablespace(CreateIndexExpression)

    Declaration
    protected virtual string GetTablespace(CreateIndexExpression expression)
    Parameters
    Type Name Description
    CreateIndexExpression expression
    Returns
    Type Description
    string

    GetWithIndexStorageParameters(CreateIndexExpression)

    Declaration
    protected virtual string GetWithIndexStorageParameters(CreateIndexExpression expression)
    Parameters
    Type Name Description
    CreateIndexExpression expression
    Returns
    Type Description
    string

    GetWithNullsDistinctString(IndexDefinition)

    Declaration
    public virtual string GetWithNullsDistinctString(IndexDefinition index)
    Parameters
    Type Name Description
    IndexDefinition index
    Returns
    Type Description
    string

    IsAdditionalFeatureSupported(string)

    Declaration
    public override bool IsAdditionalFeatureSupported(string feature)
    Parameters
    Type Name Description
    string feature
    Returns
    Type Description
    bool
    Overrides
    GeneratorBase.IsAdditionalFeatureSupported(string)

    Implements

    IMigrationGenerator
    In this article
    Back to top
    Copyright © 2018 Fluent Migrator Project
    Generated by DocFX
    Creative Commons License
    FluentMigrator Documentation by FluentMigrator Project is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.