Craig's Utility Library  4.0 Beta
Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator Class Reference

SQL Server schema generator More...

Inheritance diagram for Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator:
Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator

Public Member Functions

 SQLServerSchemaGenerator (QueryProvider.Manager Provider, SourceProvider.Manager SourceProvider)
 Constructor More...
 
IEnumerable< string > GenerateSchema (ISource DesiredStructure, ISourceInfo Source)
 Generates a list of commands used to modify the source. If it does not exist prior, the commands will create the source from scratch. Otherwise the commands will only add new fields, tables, etc. It does not delete old fields. More...
 
ISource GetSourceStructure (ISourceInfo Source)
 Gets the structure of a source More...
 
void Setup (ListMapping< IDatabase, IMapping > Mappings, IDatabase Database, QueryProvider.Manager QueryProvider, Graph< IMapping > Structure)
 Sets up the specified database schema More...
 
bool SourceExists (string Source, ISourceInfo Info)
 Checks if a source exists More...
 
bool StoredProcedureExists (string StoredProcedure, ISourceInfo Source)
 Checks if a stored procedure exists More...
 
bool TableExists (string Table, ISourceInfo Source)
 Checks if a table exists More...
 
bool TriggerExists (string Trigger, ISourceInfo Source)
 Checks if a trigger exists More...
 
bool ViewExists (string View, ISourceInfo Source)
 Checks if a view exists More...
 

Properties

string ProviderName [get]
 Provider name associated with the schema generator More...
 
QueryProvider.Manager Provider [get]
 Query provider object More...
 
SourceProvider.Manager SourceProvider [get]
 Source provider object More...
 
- Properties inherited from Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator
string ProviderName [get]
 Provider name associated with the schema generator More...
 

Detailed Description

SQL Server schema generator

Definition at line 45 of file SQLServerSchemaGenerator.cs.

Constructor & Destructor Documentation

Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.SQLServerSchemaGenerator ( QueryProvider.Manager  Provider,
SourceProvider.Manager  SourceProvider 
)

Constructor

Parameters
ProviderThe provider.
SourceProviderThe source provider.

Definition at line 52 of file SQLServerSchemaGenerator.cs.

Member Function Documentation

IEnumerable<string> Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.GenerateSchema ( ISource  DesiredStructure,
ISourceInfo  Source 
)

Generates a list of commands used to modify the source. If it does not exist prior, the commands will create the source from scratch. Otherwise the commands will only add new fields, tables, etc. It does not delete old fields.

Parameters
DesiredStructureDesired source structure
SourceSource to use
Returns
List of commands generated

Implements Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.

Definition at line 81 of file SQLServerSchemaGenerator.cs.

ISource Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.GetSourceStructure ( ISourceInfo  Source)

Gets the structure of a source

Parameters
SourceSource to use
Returns
The source structure

Implements Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.

Definition at line 92 of file SQLServerSchemaGenerator.cs.

void Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.Setup ( ListMapping< IDatabase, IMapping Mappings,
IDatabase  Database,
QueryProvider.Manager  QueryProvider,
Graph< IMapping Structure 
)

Sets up the specified database schema

Parameters
MappingsThe mappings.
DatabaseThe database.
QueryProviderThe query provider.
StructureThe structure.

Implements Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.

Definition at line 123 of file SQLServerSchemaGenerator.cs.

bool Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.SourceExists ( string  Source,
ISourceInfo  Info 
)

Checks if a source exists

Parameters
SourceSource to check
InfoSource info to use
Returns
True if it exists, false otherwise

Implements Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.

Definition at line 171 of file SQLServerSchemaGenerator.cs.

bool Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.StoredProcedureExists ( string  StoredProcedure,
ISourceInfo  Source 
)

Checks if a stored procedure exists

Parameters
StoredProcedureStored procedure to check
SourceSource to use
Returns
True if it exists, false otherwise

Implements Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.

Definition at line 182 of file SQLServerSchemaGenerator.cs.

bool Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.TableExists ( string  Table,
ISourceInfo  Source 
)

Checks if a table exists

Parameters
TableTable to check
SourceSource to use
Returns
True if it exists, false otherwise

Implements Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.

Definition at line 193 of file SQLServerSchemaGenerator.cs.

bool Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.TriggerExists ( string  Trigger,
ISourceInfo  Source 
)

Checks if a trigger exists

Parameters
TriggerTrigger to check
SourceSource to use
Returns
True if it exists, false otherwise

Implements Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.

Definition at line 204 of file SQLServerSchemaGenerator.cs.

bool Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.ViewExists ( string  View,
ISourceInfo  Source 
)

Checks if a view exists

Parameters
ViewView to check
SourceSource to use
Returns
True if it exists, false otherwise

Implements Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.

Definition at line 215 of file SQLServerSchemaGenerator.cs.

Property Documentation

QueryProvider.Manager Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.Provider
getprotected

Query provider object

Definition at line 66 of file SQLServerSchemaGenerator.cs.

string Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.ProviderName
get

Provider name associated with the schema generator

Definition at line 61 of file SQLServerSchemaGenerator.cs.

SourceProvider.Manager Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator.SourceProvider
getprotected

Source provider object

Definition at line 71 of file SQLServerSchemaGenerator.cs.


The documentation for this class was generated from the following file: