Table of Contents

Class StringVariableHandler

Namespace
Rinku.Querying.Defaults
Assembly
Rinku.dll

Escapes and injects a string literal directly into the SQL text.

public class StringVariableHandler : IQuerySegmentHandler
Inheritance
StringVariableHandler
Implements
Inherited Members
Extension Methods

Remarks

Wraps the provided value in single quotes and doubles every single quote inside it, so the literal the value produces is the value and nothing more. If the value is not a string, it performs a ToString() conversion. Use this for values that should be treated as SQL string literals.

Constructors

StringVariableHandler()

Escapes and injects a string literal directly into the SQL text.

public StringVariableHandler()

Remarks

Wraps the provided value in single quotes and doubles every single quote inside it, so the literal the value produces is the value and nothing more. If the value is not a string, it performs a ToString() conversion. Use this for values that should be treated as SQL string literals.

Fields

Instance

Singleton for StringVariableHandler

public static readonly StringVariableHandler Instance

Field Value

StringVariableHandler

Methods

Build(string)

Used to create a HandlerGetter<T> delegate.

public static StringVariableHandler Build(string _)

Parameters

_ string

Returns

StringVariableHandler

Handle(ref ValueStringBuilder, object)

Writes the SQL for value into the query being built.

public void Handle(ref ValueStringBuilder sb, object value)

Parameters

sb ValueStringBuilder

The builder the query is being assembled in.

value object

The value bound to this spot for the current run.