C# Class PROJECTNAMESPACE.SqlServers

ファイルを表示 Open project: nHydrate/nHydrate Class Usage Examples

Public Methods

Method Description
GetEmbeddedResource ( string resourceFileName ) : string
GetEmbeddedScripts ( string resourceFileName, InstallSetup setup ) : List
HasLength ( System dataType ) : bool
ReadSQLFileSectionsFromResource ( string resourceFileName, InstallSetup setup ) : string[]
RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, string>.List failedScripts, List successOrderScripts, List _databaseItems, InstallSetup setup ) : void
RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, string>.List failedScripts, List _databaseItems, InstallSetup setup ) : void
RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, List _databaseItems, InstallSetup setup ) : void

Private Methods

Method Description
BuildConnectionString ( bool integratedSecurity, string databaseName, string serverName, string userName, string password ) : string
CallMethod ( string text, SqlConnection connection, SqlTransaction transaction, InstallSetup setup ) : void
CanUseExtendedProperty ( string connectionString ) : bool

Determines if we can use extended properties, Azure does NOT allow them

CreateDatabase ( InstallSetup setup ) : void
DeleteExtendedProperty ( string connectionString, string propertyName ) : void
ExecuteCommand ( SqlCommand command ) : void
ExecuteSQL ( SqlConnection connection, SqlTransaction transaction, string sql, InstallSetup setup ) : void
ExecuteSQL ( SqlConnection connection, SqlTransaction transaction, string sql, InstallSetup setup, string>.List failedScripts ) : void
ExecuteSQL ( SqlConnection connection, SqlTransaction transaction, string sql, InstallSetup setup, string>.List failedScripts, List successOrderScripts ) : void
ExtendedPropertyExists ( string connectionString, string property, string user, string table, string column ) : bool
GetDatabaseMetaProperty ( string connectionString, string propertyName ) : string
GetDatabaseNames ( string connectString ) : string[]
GetHistory ( string connectionString ) : List
GetSQLDropScript ( string sql ) : string

Try to strip a name of a database object from a create script

GetServers ( ) : string[]
GetSkipSectionName ( string text ) : string
GetSqlColumnsForTable ( string tableName ) : string
GetSqlForForeignKeys ( string parentTable, string childTable, string constraintName ) : string
GetSqlForRelationships ( string tableName ) : string
GetSqlForTableExtendedPropertyLikeCount ( string tableName, string likeString ) : string
GetTableColumns ( string connectString, string tableName ) : DataSet
GetTableNamesAsArrayList ( string connectString ) : ArrayList
HasCreatePermissions ( string connectString ) : bool
InsertExtendedPropery ( string connectionString, string property, string propertyValue, string user, string table, string column ) : void
SQLAllocHandle ( short hType, IntPtr inputHandle, IntPtr &outputHandle ) : short
SQLBrowseConnect ( IntPtr hconn, StringBuilder inString, short inStringLength, StringBuilder outString, short outStringLength, short &outLengthNeeded ) : short
SQLFreeHandle ( short hType, IntPtr handle ) : short
SQLSetEnvAttr ( IntPtr henv, int attribute, IntPtr valuePtr, int strLength ) : short
SQLStripObjectName ( string sql, string objectHeader ) : string
SelectExtendedProperty ( string connectionString, string property, string user, string table, string column ) : string
SkipScriptPrompt ( InvalidSQLException ex ) : bool
SqlRemoveTable ( string tableName ) : string
SqlServers ( ) : System
TestConnectionString ( string connectString ) : bool
UpdateDatabaseMetaProperty ( string connectionString, string propertyName, string propertyValue ) : void
UpdateExtendedProperty ( string connectionString, string property, string propertyValue, string user, string table, string column ) : void

Method Details

GetEmbeddedResource() public static method

public static GetEmbeddedResource ( string resourceFileName ) : string
resourceFileName string
return string

GetEmbeddedScripts() public static method

public static GetEmbeddedScripts ( string resourceFileName, InstallSetup setup ) : List
resourceFileName string
setup InstallSetup
return List

HasLength() public static method

public static HasLength ( System dataType ) : bool
dataType System
return bool

ReadSQLFileSectionsFromResource() public static method

public static ReadSQLFileSectionsFromResource ( string resourceFileName, InstallSetup setup ) : string[]
resourceFileName string
setup InstallSetup
return string[]

RunEmbeddedFile() public static method

public static RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, string>.List failedScripts, List successOrderScripts, List _databaseItems, InstallSetup setup ) : void
connection System.Data.SqlClient.SqlConnection
transaction System.Data.SqlClient.SqlTransaction
resourceFileName string
failedScripts string>.List
successOrderScripts List
_databaseItems List
setup InstallSetup
return void

RunEmbeddedFile() public static method

public static RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, string>.List failedScripts, List _databaseItems, InstallSetup setup ) : void
connection System.Data.SqlClient.SqlConnection
transaction System.Data.SqlClient.SqlTransaction
resourceFileName string
failedScripts string>.List
_databaseItems List
setup InstallSetup
return void

RunEmbeddedFile() public static method

public static RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, List _databaseItems, InstallSetup setup ) : void
connection System.Data.SqlClient.SqlConnection
transaction System.Data.SqlClient.SqlTransaction
resourceFileName string
_databaseItems List
setup InstallSetup
return void