Namespace LinqToDB.Internal.Linq
Classes
- ColumnReaderAttribute
Attribute specify parameter index of reader column ordinal for custom reader method that accepts reader and column ordinal parameters. This information is used by mapper builder for queries with SequentialAccess behavior enabled. Alternative approach (when possible) is to move reading of raw value from reader to external expression and passing it to custom reader.
// such helper requires attribute to work in SequentialAccess mode [ColumnReader(1)] static int GetCustomInt(DbDataReader rd, int ordinal) => int.Parse(rd.GetString(ordinal)); ReaderExpressions[...] = (rd, i) => GetCustomInt(rd, i); // such helper will work without attribute static int GetCustomInt(string value) => int.Parse(value); ReaderExpressions[...] = (rd, i) => GetCustomInt(rd.GetString(i));
- EagerEvaluationAttribute
Marks an IQueryable-returning extension method whose call should be evaluated on the client during expression tree exposure, regardless of the shape of its source argument. The returned queryable's expression replaces the original method call before query translation.
- QueryCache
Global LINQ query cache. Buckets queries by a shallow composite key, then verifies candidates inside each bucket via Compare(IDataContext, IQueryExpressions, out IQueryExpressions?).
Interfaces
- IExpressionCacheKey
Marks a value stored in a ConstantExpression as participating in the linq2db query cache key. Types implementing this interface are kept in the cached expression (not replaced with a
ConstantPlaceholderExpression) so that distinct instances hash and compare by value via their own object.GetHashCode() and object.Equals(object) overrides.