C# Class IQ.Data.QueryMapping

Defines mapping information & rules for the query provider
Mostrar archivo Open project: maravillas/linq-to-delicious Class Usage Examples

Public Methods

Method Description
GetAggregator ( Type expectedType, Type actualType ) : LambdaExpression

Get a function that coerces an a sequence of one type into another type. This is primarily used for aggregators stored in ProjectionExpression's, which are used to represent the final transformation of the entire result set of a query.

GetAssociationKeys ( MemberInfo association, List &declaredTypeMembers, List &associatedMembers ) : void

Get the members for the key properities to be joined in an association relationship

GetColumnName ( MemberInfo member ) : string

The name of the corresponding table column

GetMappedMembers ( Type rowType ) : IEnumerable

A sequence of all the mapped members

GetMemberExpression ( Expression root, MemberInfo member ) : Expression

Get an expression for a mapped property relative to a root expression. The root is either a TableExpression or an expression defining an entity instance.

GetRelatedType ( MemberInfo member ) : Type

The type of the entity on the other side of the relationship

GetTableName ( Type rowType ) : string

The name of the corresponding database table

GetTableQuery ( Type rowType ) : ProjectionExpression

Get a query expression that selects all entities from a table

GetTypeProjection ( Expression root, Type type ) : Expression

Gets an expression that constructs an entity instance relative to a root. The root is most often a TableExpression, but may be any other experssion such as a ConstantExpression.

IsColumn ( MemberInfo member ) : bool

Determines if a property is mapped onto a column

IsEntity ( Type type ) : bool

Determines if a give CLR type is mapped as a database entity

IsIdentity ( MemberInfo member ) : bool

Determines if a property represents or is part of the entities unique identity (often primary key)

IsMapped ( MemberInfo member ) : bool

Deterimines is a property is mapped onto a column or relationship

IsRelationship ( MemberInfo member ) : bool

Determines if a property is mapped as a relationship

IsSingletonRelationship ( MemberInfo member ) : bool

Determines if a relationship property refers to a single optional entity (as opposed to a collection.)

Translate ( Expression expression ) : Expression

Apply mapping translations to this expression

Protected Methods

Method Description
QueryMapping ( QueryLanguage language ) : System

Private Methods

Method Description
CoerceElement ( Type expectedElementType, Expression expression ) : Expression

Method Details

GetAggregator() public method

Get a function that coerces an a sequence of one type into another type. This is primarily used for aggregators stored in ProjectionExpression's, which are used to represent the final transformation of the entire result set of a query.
public GetAggregator ( Type expectedType, Type actualType ) : LambdaExpression
expectedType System.Type
actualType System.Type
return System.Linq.Expressions.LambdaExpression

GetAssociationKeys() public abstract method

Get the members for the key properities to be joined in an association relationship
public abstract GetAssociationKeys ( MemberInfo association, List &declaredTypeMembers, List &associatedMembers ) : void
association System.Reflection.MemberInfo
declaredTypeMembers List
associatedMembers List
return void

GetColumnName() public abstract method

The name of the corresponding table column
public abstract GetColumnName ( MemberInfo member ) : string
member System.Reflection.MemberInfo
return string

GetMappedMembers() public method

A sequence of all the mapped members
public GetMappedMembers ( Type rowType ) : IEnumerable
rowType System.Type
return IEnumerable

GetMemberExpression() public method

Get an expression for a mapped property relative to a root expression. The root is either a TableExpression or an expression defining an entity instance.
public GetMemberExpression ( Expression root, MemberInfo member ) : Expression
root System.Linq.Expressions.Expression
member System.Reflection.MemberInfo
return System.Linq.Expressions.Expression

GetRelatedType() public abstract method

The type of the entity on the other side of the relationship
public abstract GetRelatedType ( MemberInfo member ) : Type
member System.Reflection.MemberInfo
return System.Type

GetTableName() public abstract method

The name of the corresponding database table
public abstract GetTableName ( Type rowType ) : string
rowType System.Type
return string

GetTableQuery() public method

Get a query expression that selects all entities from a table
public GetTableQuery ( Type rowType ) : ProjectionExpression
rowType System.Type
return ProjectionExpression

GetTypeProjection() public method

Gets an expression that constructs an entity instance relative to a root. The root is most often a TableExpression, but may be any other experssion such as a ConstantExpression.
public GetTypeProjection ( Expression root, Type type ) : Expression
root System.Linq.Expressions.Expression
type System.Type
return System.Linq.Expressions.Expression

IsColumn() public abstract method

Determines if a property is mapped onto a column
public abstract IsColumn ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
return bool

IsEntity() public abstract method

Determines if a give CLR type is mapped as a database entity
public abstract IsEntity ( Type type ) : bool
type System.Type
return bool

IsIdentity() public abstract method

Determines if a property represents or is part of the entities unique identity (often primary key)
public abstract IsIdentity ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
return bool

IsMapped() public abstract method

Deterimines is a property is mapped onto a column or relationship
public abstract IsMapped ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
return bool

IsRelationship() public abstract method

Determines if a property is mapped as a relationship
public abstract IsRelationship ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
return bool

IsSingletonRelationship() public method

Determines if a relationship property refers to a single optional entity (as opposed to a collection.)
public IsSingletonRelationship ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
return bool

QueryMapping() protected method

protected QueryMapping ( QueryLanguage language ) : System
language QueryLanguage
return System

Translate() public method

Apply mapping translations to this expression
public Translate ( Expression expression ) : Expression
expression System.Linq.Expressions.Expression
return System.Linq.Expressions.Expression