WX5.DB.Core.SQLEngine Class Reference

The base class for WXLib SQL engines. More...

Inheritance diagram for WX5.DB.Core.SQLEngine:
WX5.DB.Core.Imp.MSSQLEngine WX5.DB.Core.Imp.ODBCEngine WX5.DB.Core.Imp.OLEDBEngine

List of all members.

Classes

class  TypeSymbol
 L# type descriptor. More...

Public Member Functions

 SQLEngine ()
 Constructs and initializes SQLEngine instance.
virtual string CreateSQL (string expr)
 Creates a SQL string with parameters specific to concrete data provider.
abstract void CreateParameters (IDataParameterCollection pList, string expr)
 Fills up the IDataParameterCollection object with parameters.
SQLEngine Prepare (string expr)
 Prepare query: parse SQL and generate parameters.
SQLEngine ResetPrepared ()
 Clears the prepared data.
SQLEngine ResetEnvironment ()
 Resets L# environment for SQLEngine.

Protected Member Functions

List< IDataParameter > Parse (string expr)
 Extracts a list of data parameters from input string.
string GetNewParamName (string prefix)
 Returns unique parameter name.
abstract object CreateParameter (LISP.Cons args, LISP.Environment environment)
 L# "?" function implementation Should be overriden in the derived class.

Protected Attributes

Regex _rx
 A pattern to match L# expressions in the SQL query.
LISP.Environment _env
 L# environment for SQL engine.
List< IDataParameter > _preparedData
 Contains a list of parameters to pass into DBCommand.
bool _isPrepared
 This flag indicates the state of parsed SQL.
string _preparedExpr
 This memeber contain prepared expression (a SQL with replaced L# expressions).

Properties

LISP.Environment Environment [get]
 L# environment for SQLEngine.

Detailed Description

The base class for WXLib SQL engines.


Constructor & Destructor Documentation

WX5.DB.Core.SQLEngine.SQLEngine (  ) 

Constructs and initializes SQLEngine instance.


Member Function Documentation

abstract object WX5.DB.Core.SQLEngine.CreateParameter ( LISP.Cons  args,
LISP.Environment  environment 
) [protected, pure virtual]

L# "?" function implementation Should be overriden in the derived class.

Parameters:
args 
environment 
Returns:

Implemented in WX5.DB.Core.Imp.MSSQLEngine, WX5.DB.Core.Imp.ODBCEngine, and WX5.DB.Core.Imp.OLEDBEngine.

abstract void WX5.DB.Core.SQLEngine.CreateParameters ( IDataParameterCollection  pList,
string  expr 
) [pure virtual]

Fills up the IDataParameterCollection object with parameters.

Parameters:
pList 
expr 

Implemented in WX5.DB.Core.Imp.MSSQLEngine, WX5.DB.Core.Imp.ODBCEngine, and WX5.DB.Core.Imp.OLEDBEngine.

virtual string WX5.DB.Core.SQLEngine.CreateSQL ( string  expr  )  [virtual]

Creates a SQL string with parameters specific to concrete data provider.

Parameters:
expr input SQL with L# insertions
Returns:
string WX5.DB.Core.SQLEngine.GetNewParamName ( string  prefix  )  [protected]

Returns unique parameter name.

Parameters:
prefix parameter prefix (depends on data provider)
Returns:
parameter name
List<IDataParameter> WX5.DB.Core.SQLEngine.Parse ( string  expr  )  [protected]

Extracts a list of data parameters from input string.

Parameters:
expr SQL query with L# insertions
Returns:
a list of parameters
SQLEngine WX5.DB.Core.SQLEngine.Prepare ( string  expr  ) 

Prepare query: parse SQL and generate parameters.

Parameters:
expr SQL query with L# insertions
Returns:
SQLEngine WX5.DB.Core.SQLEngine.ResetEnvironment (  ) 

Resets L# environment for SQLEngine.

Returns:
SQLEngine WX5.DB.Core.SQLEngine.ResetPrepared (  ) 

Clears the prepared data.

Returns:

Member Data Documentation

LISP.Environment WX5.DB.Core.SQLEngine._env [protected]

L# environment for SQL engine.

This flag indicates the state of parsed SQL.

List<IDataParameter> WX5.DB.Core.SQLEngine._preparedData [protected]

Contains a list of parameters to pass into DBCommand.

This memeber contain prepared expression (a SQL with replaced L# expressions).

Regex WX5.DB.Core.SQLEngine._rx [protected]

A pattern to match L# expressions in the SQL query.


Property Documentation

LISP.Environment WX5.DB.Core.SQLEngine.Environment [get]

L# environment for SQLEngine.

Generated on Wed Jun 2 01:15:48 2010 for WX Library 5.0 documentation by  doxygen 1.6.3