Craig's Utility Library  4.0 Beta
Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator Interface Reference

Schema generator interface More...

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

Public Member Functions

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...
 

Detailed Description

Schema generator interface

Definition at line 33 of file ISchemaGenerator.cs.

Member Function Documentation

IEnumerable<string> Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.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

Implemented in Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator, and Utilities.ORM.Manager.Schema.Default.LDAP.LDAPSchemaGenerator.

ISource Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.GetSourceStructure ( ISourceInfo  Source)

Gets the structure of a source

Parameters
SourceSource information
Returns
The source structure

Implemented in Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator, and Utilities.ORM.Manager.Schema.Default.LDAP.LDAPSchemaGenerator.

void Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.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.

Implemented in Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator, and Utilities.ORM.Manager.Schema.Default.LDAP.LDAPSchemaGenerator.

bool Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.SourceExists ( string  Source,
ISourceInfo  Info 
)

Checks if a source exists

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

Implemented in Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator, and Utilities.ORM.Manager.Schema.Default.LDAP.LDAPSchemaGenerator.

bool Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.StoredProcedureExists ( string  StoredProcedure,
ISourceInfo  Source 
)

Checks if a stored procedure exists

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

Implemented in Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator, and Utilities.ORM.Manager.Schema.Default.LDAP.LDAPSchemaGenerator.

bool Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.TableExists ( string  Table,
ISourceInfo  Source 
)

Checks if a table exists

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

Implemented in Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator, and Utilities.ORM.Manager.Schema.Default.LDAP.LDAPSchemaGenerator.

bool Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.TriggerExists ( string  Trigger,
ISourceInfo  Source 
)

Checks if a trigger exists

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

Implemented in Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator, and Utilities.ORM.Manager.Schema.Default.LDAP.LDAPSchemaGenerator.

bool Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.ViewExists ( string  View,
ISourceInfo  Source 
)

Checks if a view exists

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

Implemented in Utilities.ORM.Manager.Schema.Default.Database.SQLServer.SQLServerSchemaGenerator, and Utilities.ORM.Manager.Schema.Default.LDAP.LDAPSchemaGenerator.

Property Documentation

string Utilities.ORM.Manager.Schema.Interfaces.ISchemaGenerator.ProviderName
get

Provider name associated with the schema generator

Definition at line 38 of file ISchemaGenerator.cs.


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