C# Class ZocBuild.Database.Build.Build

Exibir arquivo Open project: Zocdoc/ZocBuild.Database Class Usage Examples

Public Methods

Method Description
Build ( IDbConnection connection, IDbTransaction transaction, ILogger logger ) : System

Instantiates a build object which can execute object definition scripts.

BuildItemsAsync ( IEnumerable items ) : Task

Builds the given items on the database.

This method will first drop objects marked for Drop or DropAndCreate. It then creates or alters objects marked for Create, DropAndCreate, or Alter. If any one script fails to build, the entire transaction will be rolled back.

Private Methods

Method Description
ApplyScriptsAsync ( IDictionary scriptsToDependencies, IScriptExecutor executor, Func referencerFunc, bool>.Func eligibilityFunc, Action successAction, Exception>.Action failureAction ) : System.Threading.Tasks.Task
CreateAsync ( IEnumerable items ) : System.Threading.Tasks.Task
DropAsync ( IEnumerable items ) : System.Threading.Tasks.Task

Method Details

Build() public method

Instantiates a build object which can execute object definition scripts.
public Build ( IDbConnection connection, IDbTransaction transaction, ILogger logger ) : System
connection IDbConnection The open connection to the database.
transaction IDbTransaction The open transaction on which the scripts should be executed.
logger ILogger A logger
return System

BuildItemsAsync() public method

Builds the given items on the database.
This method will first drop objects marked for Drop or DropAndCreate. It then creates or alters objects marked for Create, DropAndCreate, or Alter. If any one script fails to build, the entire transaction will be rolled back.
public BuildItemsAsync ( IEnumerable items ) : Task
items IEnumerable The items to build.
return Task