Table of Contents

Namespace Rinku.Querying

Classes

ConvertedDbParamInfo<T>

Base settings for a parameter whose value must be converted before it is sent to the database.

DbParamInfo

How one parameter is bound onto a command, add, set, update, remove. Subclass it to take over binding for a parameter, for a provider quirk or a custom type the default path handles wrong.

DbParameterDefaults

Provides the application wide defaults used to create database parameter settings.

LetterMap<T>

Maps ASCII letters to values without treating case as different. Other characters are not supported. Enumeration follows alphabetical order.

Mapper

Maps case insensitive names to stable indexes. Create a new mapper when the key set changes. Use GetKey(int) or GetSameKey(string) when reference comparison is useful.

QueryParameters

How a command binds each of its parameters, and how much it has learned so far. It holds the per-parameter binding strategy and answers, for a given run, whether any parameter still needs its provider metadata learned.

QueryText

Renders a query template for one run. Use Parse(object?[]) to inspect the SQL that a set of values produces without running a command.

RequiredHandlerValueException

Thrown when a required part of the query needs a handler value that the run did not supply.

Structs

Condition

One optional part of a query template and the segments its key turns on or off.

QueryFactory

Reads a SQL template into its text, conditional parts, handlers, and named value slots. Use it when subclassing QueryCommand to change how a template is read.

QuerySegment

One part of a query template. It contains literal text or a handler that writes a value.

ValueStringBuilder

Builds SQL text for a query handler. Append the text your handler wants to add to the command.

Interfaces

IDbParamCache

How a query keeps, per parameter, the learned strategy for binding it.

IDbParamInfoGetter

Reads a provider's real parameter metadata, its exact types and sizes, off a command, so a query binds parameters the way the database expects rather than inferring from the values. Register one for your provider in ParamGetterMakers, and the command uses it while learning its cache.

IDbParameterDefaults

The default parameter-binding services used when no provider-specific registration claims a parameter.

IQueryBuilder

Supplies a query's values from code instead of a parameter object. You set variables and switch conditional parts on or off, then run the command from the builder. Use it when values come from branching C# logic instead of one parameter object.

IQueryCommand

What it takes to turn a query and a set of values into a ready-to-run database command. The execution methods build on this, most code runs a QueryCommand through those rather than calling here.

IQuerySegmentHandler

Turns a variable's value into the SQL text that stands in its place, quoting a string, expanding a list, writing a number, or injecting raw text. Register your own under a suffix letter in BaseHandlerMapper to add a marker of your own.

IQueryText

Renders a template down to the SQL a single run sends, dropping the parts whose values are absent and filling in the handler spots.

Delegates

HandlerGetter<T>

Makes a handler for a specific marker, given the marker's full name as written in the query.

ParamInfoGetterMaker

Tries to make a metadata reader for a given command, taking a look at its concrete type first. Returns false to pass, letting the next maker try.