FSharp.QueryProvider


QueryTranslatorUtilities

Namespace: FSharp.QueryProvider

Nested types and modules

TypeDescription
Context

Context to be passed down when translating expressions.

DBType<'t>
GetColumnName

Signature for getting a column name

GetDBType<'t>

Signarture for getting a DBType

GetTableName

Signature for getting a table name

TypeSource

Wrap different sources of type.

ModuleDescription
List

Functions and values

Function or valueDescription
createNull columnIndex dbType
Signature: columnIndex:int -> dbType:DBType<'b> -> string list * PreparedParameter<'b> list * ConstructionInfo list
Type parameters: 'b

Create a DbNull parameter for a type.

createParameter columnIndex value dbType
Signature: columnIndex:'b -> value:'c -> dbType:'d -> PreparedParameter<'d>
Type parameters: 'b, 'c, 'd

Create a prepared parameter

getLambda m
Signature: m:MethodCallExpression -> LambdaExpression

Unwrap a method call expression and get its lambda argument.

getLocalValue e
Signature: e:Expression -> obj option

Take an expression for either a funciton or a member access chain and get the value.

getMethod name ml
Signature: name:string -> ml:MethodCallExpression list -> MethodCallExpression option * MethodCallExpression list

Gets a method by name from a list

getMethods names ml
Signature: names:string list -> ml:MethodCallExpression list -> MethodCallExpression list * MethodCallExpression list

Gets all methods with a particular name

getOperationsAndQueryable e
Signature: e:MethodCallExpression -> (IQueryable * MethodCallExpression list) option

Get all operations in a LINQ chain and the queryable they are operating on.

invoke m
Signature: m:MethodCallExpression -> obj

shorthand for invoking a MethodCallExpression

splitResults source
Signature: source:('a list * 'b list * 'c list) list -> 'a list * 'b list * 'c list
Type parameters: 'a, 'b, 'c

Take a list<'a list * 'b list * 'c list> and concat a, b, and c no themseleves, producing a 'a list 'b list 'c list

unionExactlyOneCaseOneField t
Signature: t:Type -> PropertyInfo

Assert that a union case has exactly one field, then return its Reflection.PropertyInfo

unwrapType t
Signature: t:Type -> Type

Gets the underlying type for fsharp types

unwrapValue value
Signature: value:obj -> obj

Get the actual value of an object. Unwraps options and unions

valueToQueryAndParam (...)
Signature: columnIndex:int -> dbType:DBType<'c> -> value:obj -> string list * PreparedParameter<'c> list * ConstructionInfo list
Type parameters: 'c

Create query and parametter

Active patterns

Active patternDescription
( |SingleSameSelect|_| ) l
Signature: l:LambdaExpression -> ParameterExpression option

Matches a lambda for fun p -> p

Fork me on GitHub