C# 클래스 ZocBuild.Database.ScriptRepositories.FileSystemScriptRepository

Represents a script repository that stores build scripts at a location on disk.
This repository requires a specific directory structure. The root location must contain subdirectories for each database schema, each named with the name of the schema. Within those directories should be a directory for each database object type: Function, Procedure, Type, View. Within those directories should be the build scripts, with file names ending with ".sql". The name of each file should be the same name as the database object it creates.
상속: IScriptRepository
파일 보기 프로젝트 열기: Zocdoc/ZocBuild.Database 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
FileSystem IFileSystem
IsFileInSupportedDirectory bool>.Func
Logger ILogger

공개 메소드들

메소드 설명
FileSystemScriptRepository ( DirectoryInfoBase scriptDirectory, string serverName, string databaseName, IFileSystem fileSystem, IParser sqlParser, ILogger logger, bool ignoreUnsupportedSubdirectories ) : System

Instantiates a file system repository for the given database at the specified directory location.

FileSystemScriptRepository ( string scriptDirectoryPath, string serverName, string databaseName, IFileSystem fileSystem, IParser sqlParser, ILogger logger, bool ignoreUnsupportedSubdirectories ) : System

Instantiates a file system repository for the given database at the specified directory location.

GetAllScriptsAsync ( ) : Task>

Gets all the build scripts for database objects contained in the repository.

GetChangedScriptsAsync ( ) : Task>

This method is not supported and calling it will raise a NotSupportedException.

GetScriptAsync ( TypedDatabaseObject dbObject ) : Task

Retrieves the build script corresponding to the given database object identifier.

GetScriptFile ( TypedDatabaseObject dbObject ) : System.IO.Abstractions.FileInfoBase

Retrieves the script file for the given database object identifier, if and only if the database object belongs to this script repository.

보호된 메소드들

메소드 설명
GetScriptAsync ( System.IO.Abstractions.FileInfoBase file ) : Task

Retrieves the build script contained in the given file.

GetScriptsAsync ( ) : Task>

Gets the build scripts in the repository that satisfy the given predicate.

비공개 메소드들

메소드 설명
GetDropScript ( TypedDatabaseObject dbObject ) : string

메소드 상세

FileSystemScriptRepository() 공개 메소드

Instantiates a file system repository for the given database at the specified directory location.
public FileSystemScriptRepository ( DirectoryInfoBase scriptDirectory, string serverName, string databaseName, IFileSystem fileSystem, IParser sqlParser, ILogger logger, bool ignoreUnsupportedSubdirectories ) : System
scriptDirectory System.IO.Abstractions.DirectoryInfoBase The directory where build scripts are located.
serverName string The name of the database server.
databaseName string The name of the database.
fileSystem IFileSystem An object that provides access to the file system.
sqlParser IParser The sql script parser for reading the SQL file contents.
logger ILogger A Logger
ignoreUnsupportedSubdirectories bool A flag indicating whether to ignore subdirectories that don't conform to the expected naming convention.
리턴 System

FileSystemScriptRepository() 공개 메소드

Instantiates a file system repository for the given database at the specified directory location.
public FileSystemScriptRepository ( string scriptDirectoryPath, string serverName, string databaseName, IFileSystem fileSystem, IParser sqlParser, ILogger logger, bool ignoreUnsupportedSubdirectories ) : System
scriptDirectoryPath string The path to the directory where build scripts are located.
serverName string The name of the database server.
databaseName string The name of the database.
fileSystem IFileSystem An object that provides access to the file system.
sqlParser IParser The sql script parser for reading the SQL file contents.
logger ILogger A Logger
ignoreUnsupportedSubdirectories bool A flag indicating whether to ignore subdirectories that don't conform to the expected naming convention.
리턴 System

GetAllScriptsAsync() 공개 메소드

Gets all the build scripts for database objects contained in the repository.
public GetAllScriptsAsync ( ) : Task>
리턴 Task>

GetChangedScriptsAsync() 공개 메소드

This method is not supported and calling it will raise a NotSupportedException.
public GetChangedScriptsAsync ( ) : Task>
리턴 Task>

GetScriptAsync() 보호된 메소드

Retrieves the build script contained in the given file.
protected GetScriptAsync ( System.IO.Abstractions.FileInfoBase file ) : Task
file System.IO.Abstractions.FileInfoBase The file containing a build script
리턴 Task

GetScriptAsync() 공개 메소드

Retrieves the build script corresponding to the given database object identifier.
public GetScriptAsync ( TypedDatabaseObject dbObject ) : Task
dbObject TypedDatabaseObject The database object for which a build script is desired.
리턴 Task

GetScriptFile() 공개 메소드

Retrieves the script file for the given database object identifier, if and only if the database object belongs to this script repository.
public GetScriptFile ( TypedDatabaseObject dbObject ) : System.IO.Abstractions.FileInfoBase
dbObject TypedDatabaseObject The database object for which a script file is desired.
리턴 System.IO.Abstractions.FileInfoBase

GetScriptsAsync() 보호된 메소드

Gets the build scripts in the repository that satisfy the given predicate.
protected GetScriptsAsync ( ) : Task>
리턴 Task>

프로퍼티 상세

FileSystem 보호되어 있는 프로퍼티

The contract for interacting with the file system.
protected IFileSystem FileSystem
리턴 IFileSystem

IsFileInSupportedDirectory 보호되어 있는 프로퍼티

A function that indicates whether a given file is in a managed directory.
protected Func IsFileInSupportedDirectory
리턴 bool>.Func

Logger 보호되어 있는 프로퍼티

A Logger
protected ILogger Logger
리턴 ILogger