C# Class LightFramework.Data.OracleHelperParameterCache

OracleHelperParameterCache provides functions to leverage a static cache of procedure parameters, and the ability to discover parameters for stored procedures at run-time.
显示文件 Open project: xianrendzw/LightFramework.Net

Public Methods

Method Description
CacheParameterSet ( string connectionString, string commandText ) : void

add parameter array to the cache

GetCachedParameterSet ( string connectionString, string commandText ) : OracleParameter[]

retrieve a parameter array from the cache

GetSpParameterSet ( string connectionString, string spName ) : OracleParameter[]

Retrieves the set of OracleParameters appropriate for the stored procedure

This method will query the database for this information, and then store it in a cache for future requests.

GetSpParameterSet ( string connectionString, string spName, bool includeReturnValueParameter ) : OracleParameter[]

Retrieves the set of OracleParameters appropriate for the stored procedure

This method will query the database for this information, and then store it in a cache for future requests.

Private Methods

Method Description
CloneParameters ( OracleParameter originalParameters ) : OracleParameter[]
DiscoverSpParameterSet ( string connectionString, string spName, bool includeReturnValueParameter ) : OracleParameter[]

resolve at run-time the appropriate set of OracleParameters for a stored procedure

OracleHelperParameterCache ( ) : System

Method Details

CacheParameterSet() public static method

add parameter array to the cache
public static CacheParameterSet ( string connectionString, string commandText ) : void
connectionString string a valid connection string for an OracleConnection
commandText string the stored procedure name or T-OleDb command
return void

GetCachedParameterSet() public static method

retrieve a parameter array from the cache
public static GetCachedParameterSet ( string connectionString, string commandText ) : OracleParameter[]
connectionString string a valid connection string for an OracleConnection
commandText string the stored procedure name or T-OleDb command
return OracleParameter[]

GetSpParameterSet() public static method

Retrieves the set of OracleParameters appropriate for the stored procedure
This method will query the database for this information, and then store it in a cache for future requests.
public static GetSpParameterSet ( string connectionString, string spName ) : OracleParameter[]
connectionString string a valid connection string for an OracleConnection
spName string the name of the stored procedure
return OracleParameter[]

GetSpParameterSet() public static method

Retrieves the set of OracleParameters appropriate for the stored procedure
This method will query the database for this information, and then store it in a cache for future requests.
public static GetSpParameterSet ( string connectionString, string spName, bool includeReturnValueParameter ) : OracleParameter[]
connectionString string a valid connection string for an OracleConnection
spName string the name of the stored procedure
includeReturnValueParameter bool a bool value indicating whether the return value parameter should be included in the results
return OracleParameter[]