Header menu logo Migrondi

IMiFileSystem Type

This is an abstraction to the file system, it allows for custom implementations to either use a physical file system or even a virtual one. It provides both sync and async methods to read and write migrondi specific files.

Instance members

Instance member Description

this.ListMigrations

Full Usage: this.ListMigrations

Parameters:
    migrationsLocation : string - A path Relative to the RootPath that targets to the migration.

Returns: IReadOnlyList<Migration> A Result that may contain a Migration object or a ReadFileError
Modifiers: abstract

Takes a path to a directory-like source, and reads the sql scripts inside it

migrationsLocation : string

A path Relative to the RootPath that targets to the migration.

Returns: IReadOnlyList<Migration>

A Result that may contain a Migration object or a ReadFileError

AggregateException A list of exceptions in case the sources were not readable or malformed This normally includes exceptions of the type MalformedSource

this.ListMigrationsAsync

Full Usage: this.ListMigrationsAsync

Parameters:
    migrationsLocation : string - A path Relative to the RootPath that targets to the migration
    ?cancellationToken : CancellationToken - A cancellation token that can be used to cancel the operation

Returns: Task<IReadOnlyList<Migration>> A Result that may contain a Migration object or a ReadFileError
Modifiers: abstract

Takes a path to a directory-like source, and reads the sql scripts inside it

migrationsLocation : string

A path Relative to the RootPath that targets to the migration

?cancellationToken : CancellationToken

A cancellation token that can be used to cancel the operation

Returns: Task<IReadOnlyList<Migration>>

A Result that may contain a Migration object or a ReadFileError

this.ReadConfiguration

Full Usage: this.ReadConfiguration

Parameters:
    readFrom : string - A path Relative to the RootPath that targets to the configuration file

Returns: MigrondiConfig A MigrondiConfig object
Modifiers: abstract

Take the path to a configuration source, reads and transforms it into a configuration object

readFrom : string

A path Relative to the RootPath that targets to the configuration file

Returns: MigrondiConfig

A MigrondiConfig object

SourceNotFound Thrown when the source is not found
MalformedSource Thrown when the source is found but can't be deserialized from disk

this.ReadConfigurationAsync

Full Usage: this.ReadConfigurationAsync

Parameters:
    readFrom : string - A path Relative to the RootPath that targets to the configuration file
    ?cancellationToken : CancellationToken - A cancellation token that can be used to cancel the operation

Returns: Task<MigrondiConfig> A Result that may contain a MigrondiConfig object or a ReadFileError
Modifiers: abstract

Take the path to a configuration source, reads and transforms it into a configuration object

readFrom : string

A path Relative to the RootPath that targets to the configuration file

?cancellationToken : CancellationToken

A cancellation token that can be used to cancel the operation

Returns: Task<MigrondiConfig>

A Result that may contain a MigrondiConfig object or a ReadFileError

SourceNotFound Thrown when the file is not found
MalformedSource Thrown when the file is found but can't be deserialized from the source

this.ReadMigration

Full Usage: this.ReadMigration

Parameters:
    migrationName : string - A path Relative to the RootPath that targets to the migration

Returns: Migration A Result that may contain a Migration object or a ReadFileError
Modifiers: abstract

Takes a path to a migration, reads its contents and transforms it into a Migration object

migrationName : string

A path Relative to the RootPath that targets to the migration

Returns: Migration

A Result that may contain a Migration object or a ReadFileError

SourceNotFound Thrown when the file is not found
MalformedSource Thrown when the file is found but can't be deserialized from the source

this.ReadMigrationAsync

Full Usage: this.ReadMigrationAsync

Parameters:
    migrationName : string - A path Relative to the RootPath that targets to the migration
    ?cancellationToken : CancellationToken - A cancellation token that can be used to cancel the operation

Returns: Task<Migration> A Result that may contain a Migration object or a ReadFileError
Modifiers: abstract

Takes a path to a migration, reads its contents and transforms it into a Migration object

migrationName : string

A path Relative to the RootPath that targets to the migration

?cancellationToken : CancellationToken

A cancellation token that can be used to cancel the operation

Returns: Task<Migration>

A Result that may contain a Migration object or a ReadFileError

SourceNotFound Thrown when the file is not found

this.WriteConfiguration

Full Usage: this.WriteConfiguration

Parameters:
    config : MigrondiConfig - The configuration object
    writeTo : string - The path to the configuration file

Modifiers: abstract

Take a configuration object and writes it to a location dictated by the `writeTo` parameter

config : MigrondiConfig

The configuration object

writeTo : string

The path to the configuration file

this.WriteConfigurationAsync

Full Usage: this.WriteConfigurationAsync

Parameters:
    config : MigrondiConfig - The configuration object
    writeTo : string - The path to the configuration file
    ?cancellationToken : CancellationToken - A cancellation token that can be used to cancel the operation

Returns: Task A unit result object that means that the operation was successful or a ReadFileError
Modifiers: abstract

Take a configuration object and writes it to a file

config : MigrondiConfig

The configuration object

writeTo : string

The path to the configuration file

?cancellationToken : CancellationToken

A cancellation token that can be used to cancel the operation

Returns: Task

A unit result object that means that the operation was successful or a ReadFileError

this.WriteMigration

Full Usage: this.WriteMigration

Parameters:
    migration : Migration - The migration object
    migrationName : string - The path to the migration file

Modifiers: abstract

Takes a migration and serializes its contents into a location dictated by the path

migration : Migration

The migration object

migrationName : string

The path to the migration file

this.WriteMigrationAsync

Full Usage: this.WriteMigrationAsync

Parameters:
    migration : Migration - The migration object
    migrationName : string - The path to the migration file
    ?cancellationToken : CancellationToken - A cancellation token that can be used to cancel the operation

Returns: Task A unit result object that means that the operation was successful
Modifiers: abstract

Takes a migration and serializes its contents into a location dictated by the path

migration : Migration

The migration object

migrationName : string

The path to the migration file

?cancellationToken : CancellationToken

A cancellation token that can be used to cancel the operation

Returns: Task

A unit result object that means that the operation was successful

Type something to start searching.