Namespace Rinku
Classes
- BuilderStarter
Opens a builder for a QueryCommand. Use a builder when values are supplied in several steps or when code needs to choose which optional parts of the query are used.
- CachedTypeParser
Holds one result schema and caches a parser for every result type requested over it. A parameterless instance learns the schema from its first query. The instance can be shared across threads.
- CachedTypeParser<T>
Reads
Tfrom database commands created by the caller. Keep one instance and reuse it when those commands return compatible columns. The instance can be shared across threads.
- CallerParameter
Describes one value that is supplied directly by the generated caller instead of being resolved from the caller's first (mapped) argument.
- CallerParameter<T>
Describes a caller-supplied argument of type
T.
- ConnectionQueryExtensions
Runs SQL without declaring a QueryCommand first. Calls that use the same SQL string share one command. Use GetOrCreateCommand(string) to configure that command.
- DBCommandExtensions
Runs and reads a database command that the caller created.
- DirectBuildExtensions
Runs a QueryCommand with values from a parameter object. Use an overload with an
outcommand when output values must be read after execution.
- ErrorCodes
Stable codes for errors reported by Rinku. Use these constants when application code must identify a specific error.
- MethodCaller
Generates strongly typed delegates that call a method using Rinku's parameter-shape rules for the first delegate argument. Additional delegate arguments are passed directly to selected target parameters.
- MultiReader
Reads a command's several result sets in turn, mapping each to a type you pick as you go. Call Query<T>() once per set to take the whole set and move on, or Get<T>() and GetCurrentSetParser<T>() to walk a set row by row while keeping hold of the reader. It is itself a DbDataReader, so the raw reader methods stay available underneath.
- QueryBuilderCommandExtensions
Runs a query off a QueryBuilderCommand<TCommand>. The bound command already carries the builder's values, so these methods only render its text and execute, in the same shapes the command's own execution methods offer. Call them again after changing values to rerun the one command.
- QueryBuilderExtensions
Runs a query off an in-memory QueryBuilder. Once the builder holds the values you want, these methods turn them into a command on a connection and execute it, in the same shapes the command's own execution methods offer.
- QueryCommand
A reusable SQL query or stored procedure. Declare one in a
static readonlyfield and callQueryorExecuteon it. Use QueryBuilder when values are supplied in several steps.
- Refuse
Provides the standard failures used by custom Rinku components.
- RinkuBindingException
A command could not be prepared from a template and its values, see the
RINKU2###band.
- RinkuConfigurationException
A type's configuration was refused, see the
RINKU5###band.
- RinkuException
The base class for errors reported by Rinku. Use Code when application code must identify a specific error.
- RinkuInternalException
An invariant inside the library did not hold. Reaching one of these is a bug in RinkuLib rather than a mistake in the calling code, see the
RINKU9###band.
- RinkuMappingException
No parser could be built for the target type, see the
RINKU3###band.
- RinkuNoConnectionException
Reports that a command was run without a connection.
- RinkuNoParserException
Reports that the returned columns could not create the requested type.
- RinkuNoRowsException
Reports that a query requiring a row returned no rows.
- RinkuReadException
A result could not be read through its parser, see the
RINKU4###band.
- RinkuShapeException
Reports that the returned rows do not meet the rules of the requested result type.
- RinkuTemplateException
A template could not be read, see the
RINKU1###band.
- RinkuTrackingException
A tracked value could not be copied or edited, see the
RINKU6###band.
- SchemaExtractor
Describes the columns mapped by a type, constructor, or method. Use it when the generic TypeSchema<T> form does not fit.
- TypeSchema<T>
Describes the columns
Tmaps to without opening a database connection. Each item gives the column name, CLR type, and nullability.
Structs
- MaybeNull<T>
Reads one row whose value may be
NULL. A missing row still throws. Use OptionalNullable<T> when the row may also be missing.
- OptionalNullableStruct<T>
Reads one value type while accepting a missing row or a
NULLvalue. Both cases set HasValue to false.
- OptionalNullable<T>
Reads one reference value while accepting a missing row or a
NULLvalue. Both cases set HasValue to false.
- OptionalStruct<T>
Reads one value type or reports that no row was returned.
- Optional<T>
Reads one reference value or reports that no row was returned. A present
NULLstill throws. Use OptionalNullable<T> to accept it.
- QueryBuilder
Holds the values for one run of a QueryCommand. Use it when you want to set values and conditions one at a time before running the query.
- QueryBuilderCommand<TCommand>
Holds the values for a run and keeps a live IDbCommand in step with them. Each time you set a variable the matching command parameter is added, updated, or dropped on the spot, so the command is always ready to run. Bind one command and a loop reuses it across a batch without rebuilding it each pass.
- SingleOrDefaultNullableStruct<T>
Reads zero or one value type result while accepting a
NULLvalue. A missing row and aNULLvalue both give an empty value. A second result throws.
- SingleOrDefaultNullable<T>
Reads zero or one reference result while accepting a
NULLvalue. A missing row and aNULLvalue both give an empty value. A second result throws.
- SingleOrDefaultStruct<T>
Reads zero or one value type result. No result gives an empty value and a second result throws. A present
NULLstill throws.
- SingleOrDefault<T>
Reads zero or one reference result. No result gives an empty value and a second result throws. A present
NULLstill throws.
- Single<T>
Requires exactly one result. No result and a second result both throw.
Interfaces
- IWrapping<TSelf, T>
Lets a wrapper be used as a query result type. Implement this interface when a custom wrapper can be created from one value.
Enums
- ParameterAccessorKinds
Selects parameter accessors held by a command.
- QueryParserInvalidationScope
Selects where parser invalidation applies.