Class SqlScript
Inheritance
System.Object
SqlScript
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 12.17.2
public class SqlScript : IDisposable
Constructors
Initializes a new instance of the SqlScript class.
Declaration
Initializes a new instance of the SqlScript class.
Declaration
public SqlScript(int capacity)
Parameters
Type |
Name |
Description |
System.Int32 |
capacity |
|
Properties
Gets or sets the parameters.
Declaration
public SqlParameterList Parameters { get; set; }
Property Value
Text
Declaration
public StringBuilder Text { get; set; }
Property Value
Type |
Description |
System.Text.StringBuilder |
The script.
|
Methods
Declaration
public SqlScript AddAutoParameter(SqlDbType dbType, object value)
Parameters
Type |
Name |
Description |
System.Data.SqlDbType |
dbType |
Type of the db.
|
System.Object |
value |
The value.
|
Returns
Declaration
public SqlScript AddParameter(SqlParameter param)
Parameters
Type |
Name |
Description |
System.Data.SqlClient.SqlParameter |
param |
The param.
|
Returns
Declaration
public SqlScript AddParameter(string parameterName, SqlDbType dbType, int size, object value)
Parameters
Type |
Name |
Description |
System.String |
parameterName |
Name of the parameter.
|
System.Data.SqlDbType |
dbType |
Type of the db.
|
System.Int32 |
size |
The size.
|
System.Object |
value |
The value.
|
Returns
Declaration
public SqlScript AddParameter(string parameterName, SqlDbType dbType, object value)
Parameters
Type |
Name |
Description |
System.String |
parameterName |
Name of the parameter.
|
System.Data.SqlDbType |
dbType |
Type of the db.
|
System.Object |
value |
The value.
|
Returns
Declaration
public SqlScript AddParameter(string parameterName, object value)
Parameters
Type |
Name |
Description |
System.String |
parameterName |
Name of the parameter.
|
System.Object |
value |
The value.
|
Returns
Declaration
public SqlScript Append(bool value)
Parameters
Type |
Name |
Description |
System.Boolean |
value |
|
Returns
Declaration
public SqlScript Append(byte value)
Parameters
Type |
Name |
Description |
System.Byte |
value |
|
Returns
Declaration
public SqlScript Append(char value)
Parameters
Type |
Name |
Description |
System.Char |
value |
|
Returns
Declaration
public SqlScript Append(char value, int repeatCount)
Parameters
Type |
Name |
Description |
System.Char |
value |
|
System.Int32 |
repeatCount |
|
Returns
Declaration
public SqlScript Append(char[] value)
Parameters
Type |
Name |
Description |
System.Char[] |
value |
|
Returns
Declaration
public SqlScript Append(char[] value, int startIndex, int charCount)
Parameters
Type |
Name |
Description |
System.Char[] |
value |
|
System.Int32 |
startIndex |
|
System.Int32 |
charCount |
|
Returns
Declaration
public SqlScript Append(decimal value)
Parameters
Type |
Name |
Description |
System.Decimal |
value |
|
Returns
Declaration
public SqlScript Append(double value)
Parameters
Type |
Name |
Description |
System.Double |
value |
|
Returns
Declaration
public SqlScript Append(short value)
Parameters
Type |
Name |
Description |
System.Int16 |
value |
|
Returns
Declaration
public SqlScript Append(int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Returns
Declaration
public SqlScript Append(long value)
Parameters
Type |
Name |
Description |
System.Int64 |
value |
|
Returns
Declaration
public SqlScript Append(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
Declaration
public SqlScript Append(float value)
Parameters
Type |
Name |
Description |
System.Single |
value |
|
Returns
Declaration
public SqlScript Append(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Declaration
public SqlScript Append(string value, int startIndex, int count)
Parameters
Type |
Name |
Description |
System.String |
value |
|
System.Int32 |
startIndex |
|
System.Int32 |
count |
|
Returns
Declaration
public SqlScript AppendFormat(IFormatProvider provider, string format, params object[] args)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
System.String |
format |
|
System.Object[] |
args |
|
Returns
Declaration
public SqlScript AppendFormat(string format, object arg0)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.Object |
arg0 |
|
Returns
Declaration
public SqlScript AppendFormat(string format, object arg0, object arg1)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.Object |
arg0 |
|
System.Object |
arg1 |
|
Returns
Declaration
public SqlScript AppendFormat(string format, object arg0, object arg1, object arg2)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.Object |
arg0 |
|
System.Object |
arg1 |
|
System.Object |
arg2 |
|
Returns
Declaration
public SqlScript AppendFormat(string format, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.Object[] |
args |
|
Returns
Declaration
[ComVisible(false)]
public SqlScript AppendLine()
Returns
Declaration
[ComVisible(false)]
public SqlScript AppendLine(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Declaration
Executes the create storage procedure script.
Declaration
public void CreateSP(string spName)
Parameters
Type |
Name |
Description |
System.String |
spName |
Name of the sp.
|
Executes the create storage procedure script.
Declaration
public void CreateSP(string spName, string[] scriptPrefix, string[] scriptPostfix)
Parameters
Type |
Name |
Description |
System.String |
spName |
Name of the storage procedure.
|
System.String[] |
scriptPrefix |
The script prefix.
|
System.String[] |
scriptPostfix |
The script postfix.
|
Declaration
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Declaration
Optimizeds the execute using sp_executesql.
Declaration
Gets the create storage procedure script.
Declaration
public string GetCreateSPScript(string spName)
Parameters
Type |
Name |
Description |
System.String |
spName |
Name of the sp.
|
Returns
Type |
Description |
System.String |
|
Gets the create storage procedure script.
Declaration
public string GetCreateSPScript(string spName, string[] scriptPrefix, string[] scriptPostfix)
Parameters
Type |
Name |
Description |
System.String |
spName |
Name of the sp.
|
System.String[] |
scriptPrefix |
The script prefix.
|
System.String[] |
scriptPostfix |
The script postfix.
|
Returns
Type |
Description |
System.String |
|
Serves as a hash function for a particular type. System.Object.GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
A hash code for the current System.Object.
|
Overrides
System.Object.GetHashCode()
Declaration
public SqlScript Insert(int index, bool value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Boolean |
value |
|
Returns
Declaration
public SqlScript Insert(int index, byte value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Byte |
value |
|
Returns
Declaration
public SqlScript Insert(int index, char value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Char |
value |
|
Returns
Declaration
public SqlScript Insert(int index, char[] value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Char[] |
value |
|
Returns
Declaration
public SqlScript Insert(int index, char[] value, int startIndex, int charCount)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Char[] |
value |
|
System.Int32 |
startIndex |
|
System.Int32 |
charCount |
|
Returns
Declaration
public SqlScript Insert(int index, decimal value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Decimal |
value |
|
Returns
Declaration
public SqlScript Insert(int index, double value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Double |
value |
|
Returns
Declaration
public SqlScript Insert(int index, short value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Int16 |
value |
|
Returns
Declaration
public SqlScript Insert(int index, int value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Int32 |
value |
|
Returns
Declaration
public SqlScript Insert(int index, long value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Int64 |
value |
|
Returns
Declaration
public SqlScript Insert(int index, object value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Object |
value |
|
Returns
Declaration
public SqlScript Insert(int index, float value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Single |
value |
|
Returns
Declaration
public SqlScript Insert(int index, string value)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.String |
value |
|
Returns
Declaration
public SqlScript Insert(int index, string value, int count)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.String |
value |
|
System.Int32 |
count |
|
Returns
Declaration
public SqlScript Remove(int startIndex, int length)
Parameters
Type |
Name |
Description |
System.Int32 |
startIndex |
|
System.Int32 |
length |
|
Returns
Declaration
public SqlScript Replace(char oldChar, char newChar)
Parameters
Type |
Name |
Description |
System.Char |
oldChar |
|
System.Char |
newChar |
|
Returns
Declaration
public SqlScript Replace(char oldChar, char newChar, int startIndex, int count)
Parameters
Type |
Name |
Description |
System.Char |
oldChar |
|
System.Char |
newChar |
|
System.Int32 |
startIndex |
|
System.Int32 |
count |
|
Returns
Declaration
public SqlScript Replace(string oldValue, string newValue)
Parameters
Type |
Name |
Description |
System.String |
oldValue |
|
System.String |
newValue |
|
Returns
Declaration
public SqlScript Replace(string oldValue, string newValue, int startIndex, int count)
Parameters
Type |
Name |
Description |
System.String |
oldValue |
|
System.String |
newValue |
|
System.Int32 |
startIndex |
|
System.Int32 |
count |
|
Returns
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Implements
System.IDisposable