C# Class SchemaZen.Library.Models.Database

Datei anzeigen Open project: Zocdoc/schemazen Class Usage Examples

Public Properties

Property Type Description
Assemblies List
Connection string
DataTables List
Dir string
ForeignKeys List
Name string
Props List
Roles List
Routines List
Schemas List
Synonyms List
TableTypes List
Tables List
UserDefinedTypes List
Users List
ViewIndexes List

Private Properties

Property Type Description
FindTableBase Table
GetScripts List
LoadCLRAssemblies void
LoadCheckConstraints void
LoadColumnComputes void
LoadColumnDefaults void
LoadColumnIdentities void
LoadColumns void
LoadColumnsBase void
LoadConstraintsAndIndexes void
LoadForeignKeys void
LoadProps void
LoadRoles void
LoadRoutines void
LoadSchemas void
LoadSynonyms void
LoadTables void
LoadTablesBase void
LoadUserDefinedTypes void
LoadUserDefinedTypesBase void
LoadUsersAndLogins void
LoadXmlSchemas void
MakeFileName string
MakeFileName string
SetPropOnOff void
SetPropString void
WritePropsScript void
WriteSchemaScript void
WriteScriptDir void

Public Methods

Method Description
Compare ( Database db ) : DatabaseDiff
CreateFromDir ( bool overwrite, string databaseFilesPath = null, string>.Action log = null ) : void
Database ( IList filteredTypes = null ) : System
Database ( string name, IList filteredTypes = null ) : System
ExecCreate ( bool dropIfExists ) : void
ExportData ( string tableHint = null, string>.Action log = null ) : void
FindAssembly ( string name ) : SqlAssembly
FindConstraint ( string name ) : Constraint
FindForeignKey ( string name, string owner ) : ForeignKey
FindProp ( string name ) : DbProp
FindRoutine ( string name, string schema ) : Routine
FindSynonym ( string name, string schema ) : Synonym
FindTable ( string name, string owner, bool isTableType = false ) : Table
FindTablesRegEx ( string pattern ) : List
FindUser ( string name ) : SqlUser
FindViewIndex ( string name ) : Constraint
ImportData ( string>.Action log = null ) : void
Load ( ) : void
ScriptCreate ( ) : string
ScriptPropList ( IList props ) : string
ScriptToDir ( string tableHint = null, string>.Action log = null ) : void

Private Methods

Method Description
FindTableBase ( IEnumerabletables, stringname, stringowner ) : Table
GetScripts ( ) : List
LoadCLRAssemblies ( SqlCommand cm ) : void
LoadCheckConstraints ( SqlCommand cm ) : void
LoadColumnComputes ( SqlCommand cm ) : void
LoadColumnDefaults ( SqlCommand cm ) : void
LoadColumnIdentities ( SqlCommand cm ) : void
LoadColumns ( SqlCommand cm ) : void
LoadColumnsBase ( IDataReader dr, Listtables ) : void
LoadConstraintsAndIndexes ( SqlCommand cm ) : void
LoadForeignKeys ( SqlCommand cm ) : void
LoadProps ( SqlCommand cm ) : void
LoadRoles ( SqlCommand cm ) : void
LoadRoutines ( SqlCommand cm ) : void
LoadSchemas ( SqlCommand cm ) : void
LoadSynonyms ( SqlCommand cm ) : void
LoadTables ( SqlCommand cm ) : void
LoadTablesBase ( System.Data.SqlClient.SqlDataReader dr, bool areTableTypes, Listtables ) : void
LoadUserDefinedTypes ( SqlCommand cm ) : void
LoadUserDefinedTypesBase ( System.Data.SqlClient.SqlDataReader dr, List userDefinedTypes ) : void
LoadUsersAndLogins ( SqlCommand cm ) : void
LoadXmlSchemas ( SqlCommand cm ) : void
MakeFileName ( object o ) : string
MakeFileName ( string schema, string name ) : string
SetPropOnOff ( string propName, object dbVal ) : void
SetPropString ( string propName, object dbVal ) : void
WritePropsScript ( string>.Action log ) : void
WriteSchemaScript ( string>.Action log ) : void
WriteScriptDir ( string name, ICollection objects, string>.Action log ) : void

Method Details

Compare() public method

public Compare ( Database db ) : DatabaseDiff
db Database
return DatabaseDiff

CreateFromDir() public method

public CreateFromDir ( bool overwrite, string databaseFilesPath = null, string>.Action log = null ) : void
overwrite bool
databaseFilesPath string
log string>.Action
return void

Database() public method

public Database ( IList filteredTypes = null ) : System
filteredTypes IList
return System

Database() public method

public Database ( string name, IList filteredTypes = null ) : System
name string
filteredTypes IList
return System

ExecCreate() public method

public ExecCreate ( bool dropIfExists ) : void
dropIfExists bool
return void

ExportData() public method

public ExportData ( string tableHint = null, string>.Action log = null ) : void
tableHint string
log string>.Action
return void

FindAssembly() public method

public FindAssembly ( string name ) : SqlAssembly
name string
return SqlAssembly

FindConstraint() public method

public FindConstraint ( string name ) : Constraint
name string
return Constraint

FindForeignKey() public method

public FindForeignKey ( string name, string owner ) : ForeignKey
name string
owner string
return ForeignKey

FindProp() public method

public FindProp ( string name ) : DbProp
name string
return DbProp

FindRoutine() public method

public FindRoutine ( string name, string schema ) : Routine
name string
schema string
return Routine

FindSynonym() public method

public FindSynonym ( string name, string schema ) : Synonym
name string
schema string
return Synonym

FindTable() public method

public FindTable ( string name, string owner, bool isTableType = false ) : Table
name string
owner string
isTableType bool
return Table

FindTablesRegEx() public method

public FindTablesRegEx ( string pattern ) : List
pattern string
return List

FindUser() public method

public FindUser ( string name ) : SqlUser
name string
return SqlUser

FindViewIndex() public method

public FindViewIndex ( string name ) : Constraint
name string
return Constraint

ImportData() public method

public ImportData ( string>.Action log = null ) : void
log string>.Action
return void

Load() public method

public Load ( ) : void
return void

ScriptCreate() public method

public ScriptCreate ( ) : string
return string

ScriptPropList() public static method

public static ScriptPropList ( IList props ) : string
props IList
return string

ScriptToDir() public method

public ScriptToDir ( string tableHint = null, string>.Action log = null ) : void
tableHint string
log string>.Action
return void

Property Details

Assemblies public_oe property

public List Assemblies
return List

Connection public_oe property

public string Connection
return string

DataTables public_oe property

public ListDataTables
return List

Dir public_oe property

public string Dir
return string

ForeignKeys public_oe property

public List ForeignKeys
return List

Name public_oe property

public string Name
return string

Props public_oe property

public List Props
return List

Roles public_oe property

public List Roles
return List

Routines public_oe property

public List Routines
return List

Schemas public_oe property

public List Schemas
return List

Synonyms public_oe property

public List Synonyms
return List

TableTypes public_oe property

public ListTableTypes
return List

Tables public_oe property

public ListTables
return List

UserDefinedTypes public_oe property

public List UserDefinedTypes
return List

Users public_oe property

public List Users
return List

ViewIndexes public_oe property

public List ViewIndexes
return List