C# Class SIPSorcery.Persistence.StorageLayer

显示文件 Open project: sipsorcery/sipsorcery Class Usage Examples

Public Properties

Property Type Description
MaxPoolSize string
MinPoolSize string
Pooling string

Public Methods

Method Description
ConvertToBool ( object column ) : bool

ConvertToBoolean ( object column ) : bool
ExecuteNonQuery ( StorageTypes storageType, string dbConnString, string query ) : void
ExecuteNonQuery ( StorageTypes storageType, string dbConnString, string query, object>.Dictionary parameters ) : void
ExecuteNonQuery ( string query ) : void
ExecuteNonQuery ( string query, object>.Dictionary parameters ) : void
ExecuteScalar ( StorageTypes storageType, string dbConnString, string query ) : object
ExecuteScalar ( StorageTypes storageType, string dbConnString, string query, object>.Dictionary parameters ) : object
ExecuteScalar ( string query ) : object
ExecuteScalar ( string query, object>.Dictionary parameters ) : object
GetDataSet ( StorageTypes storageType, string dbConnString, string query ) : DataSet
GetDataSet ( string query ) : DataSet
GetDbCommand ( StorageTypes storageType, IDbConnection dbConn, string cmdText ) : IDbCommand
GetDbConnection ( StorageTypes storageType, string dbConnStr ) : IDbConnection
GetDbParameter ( StorageTypes storageType, string name, object value ) : IDataParameter
IsPooledConnectionString ( string dbConnStr ) : bool

Used to determine whethe Npgsql will treat a connection string as pooling or not. Npgsql assumes a connection string is pooling by default.

StorageLayer ( ) : NUnit.Framework
StorageLayer ( StorageTypes storageType, string dbConnStr ) : NUnit.Framework

Private Methods

Method Description
GetDataAdapter ( StorageTypes storageType, IDbConnection dbConn, string cmdText ) : IDataAdapter
QuerySecurityCheck ( string query ) : void

Checks SQL queries to filter out ones that match an SQL injection attack.

Method Details

ConvertToBool() public method

public ConvertToBool ( object column ) : bool
column object Needs to be a bit data type from Postgresql.
return bool

ConvertToBoolean() public static method

public static ConvertToBoolean ( object column ) : bool
column object
return bool

ExecuteNonQuery() public method

public ExecuteNonQuery ( StorageTypes storageType, string dbConnString, string query ) : void
storageType StorageTypes
dbConnString string
query string
return void

ExecuteNonQuery() public method

public ExecuteNonQuery ( StorageTypes storageType, string dbConnString, string query, object>.Dictionary parameters ) : void
storageType StorageTypes
dbConnString string
query string
parameters object>.Dictionary
return void

ExecuteNonQuery() public method

public ExecuteNonQuery ( string query ) : void
query string
return void

ExecuteNonQuery() public method

public ExecuteNonQuery ( string query, object>.Dictionary parameters ) : void
query string
parameters object>.Dictionary
return void

ExecuteScalar() public method

public ExecuteScalar ( StorageTypes storageType, string dbConnString, string query ) : object
storageType StorageTypes
dbConnString string
query string
return object

ExecuteScalar() public method

public ExecuteScalar ( StorageTypes storageType, string dbConnString, string query, object>.Dictionary parameters ) : object
storageType StorageTypes
dbConnString string
query string
parameters object>.Dictionary
return object

ExecuteScalar() public method

public ExecuteScalar ( string query ) : object
query string
return object

ExecuteScalar() public method

public ExecuteScalar ( string query, object>.Dictionary parameters ) : object
query string
parameters object>.Dictionary
return object

GetDataSet() public method

public GetDataSet ( StorageTypes storageType, string dbConnString, string query ) : DataSet
storageType StorageTypes
dbConnString string
query string
return DataSet

GetDataSet() public method

public GetDataSet ( string query ) : DataSet
query string
return DataSet

GetDbCommand() public static method

public static GetDbCommand ( StorageTypes storageType, IDbConnection dbConn, string cmdText ) : IDbCommand
storageType StorageTypes
dbConn IDbConnection
cmdText string
return IDbCommand

GetDbConnection() public static method

public static GetDbConnection ( StorageTypes storageType, string dbConnStr ) : IDbConnection
storageType StorageTypes
dbConnStr string
return IDbConnection

GetDbParameter() public static method

public static GetDbParameter ( StorageTypes storageType, string name, object value ) : IDataParameter
storageType StorageTypes
name string
value object
return IDataParameter

IsPooledConnectionString() public method

Used to determine whethe Npgsql will treat a connection string as pooling or not. Npgsql assumes a connection string is pooling by default.
public IsPooledConnectionString ( string dbConnStr ) : bool
dbConnStr string
return bool

StorageLayer() public method

public StorageLayer ( ) : NUnit.Framework
return NUnit.Framework

StorageLayer() public method

public StorageLayer ( StorageTypes storageType, string dbConnStr ) : NUnit.Framework
storageType StorageTypes
dbConnStr string
return NUnit.Framework

Property Details

MaxPoolSize public_oe static_oe property

public static string MaxPoolSize
return string

MinPoolSize public_oe static_oe property

public static string MinPoolSize
return string

Pooling public_oe static_oe property

public static string Pooling
return string