C# Class IQMap.Impl.Support.ParameterParser

Handles processing of a query + parameters into something that can be run. Extracts special parameter types (CommandBehavior, Buffered, Transaction); turns a query that's a field + a single parameter into a select x=y query; turns a query that's a single field + a numeric parameter into a primary key selector
Mostrar archivo Open project: jamietre/IQMap Class Usage Examples

Protected Properties

Property Type Description
WhereClause IWhere
_Parameters List

Public Methods

Method Description
GetQuery ( ) : string
GetQuery ( QueryType type ) : string

Return the query string. The "type" parameter ensures that you know what you are doing; an error will result if you request the wrong type.

GetWhereClause ( ) : IWhere
ParameterParser ( string query ) : System

Protected Methods

Method Description
CleanParmName ( string text ) : string
GetProperties ( object obj ) : object>>.IEnumerable

Enumerate props/values for an object

IsParameterType ( Object obj ) : bool

Check the parameter to see if it's legitimate paramter values

ParseQueryType ( ) : void
ProcessParameters ( IEnumerable parameters ) : void
UnwrapParameters ( IEnumerable parameters ) : IEnumerable

Expands any arrays in a list

Private Methods

Method Description
CreateParameter ( string name, object value ) : IDataParameter

Method Details

CleanParmName() protected method

protected CleanParmName ( string text ) : string
text string
return string

GetProperties() protected method

Enumerate props/values for an object
protected GetProperties ( object obj ) : object>>.IEnumerable
obj object
return object>>.IEnumerable

GetQuery() public method

public GetQuery ( ) : string
return string

GetQuery() public method

Return the query string. The "type" parameter ensures that you know what you are doing; an error will result if you request the wrong type.
public GetQuery ( QueryType type ) : string
type QueryType
return string

GetWhereClause() public method

public GetWhereClause ( ) : IWhere
return IWhere

IsParameterType() protected method

Check the parameter to see if it's legitimate paramter values
protected IsParameterType ( Object obj ) : bool
obj Object
return bool

ParameterParser() public method

public ParameterParser ( string query ) : System
query string
return System

ParseQueryType() protected method

protected ParseQueryType ( ) : void
return void

ProcessParameters() protected method

protected ProcessParameters ( IEnumerable parameters ) : void
parameters IEnumerable
return void

UnwrapParameters() protected method

Expands any arrays in a list
protected UnwrapParameters ( IEnumerable parameters ) : IEnumerable
parameters IEnumerable
return IEnumerable

Property Details

WhereClause protected_oe property

protected IWhere WhereClause
return IWhere

_Parameters protected_oe property

protected List _Parameters
return List