ParameterInfo Structure
Assembly: CodeEffects.Rule.Connection.dll
Namespace: CodeEffects.Rule.Connection
Summary
Describes one parameter of a statement the libraries send to the database: its name, its value, and optionally its type and size. An IDialect creates parameters with CreateParameter(..) and CreateLargeTextParameter(..), and the libraries add them to their commands.
Syntax
public readonly struct ParameterInfo
You meet this type only when you write a dialect of your own for a database the shipped providers do not cover. The shipped SQL Server and PostgreSQL dialects create every parameter themselves.
Constructors
ParameterInfo(..)
public ParameterInfo(string name, object value, DbType? dbType = null, int? size = null, int? providerSpecificType = null)
Initializes a new parameter.
Parameters
- name (
System.String) - The parameter's name, as the statement uses it.
- value (
System.Object) - The value. null is sent as a database null.
- dbType (
System.Data.DbType?) - The database type, or null to let the ADO.NET provider infer it.
- size (
System.Int32?) - The size, or null for the provider's default.
- providerSpecificType (
System.Int32?) - A provider's own type, as the number of its enumeration member, for a type that DbType cannot name. The dialect that creates it interprets it.
Properties
DbType
Type: System.Data.DbType?
Gets the database type, or null.
Name
Type: System.String
Gets the parameter's name.
ProviderSpecificType
Type: System.Int32?
Gets the provider's own type, or null.
Size
Type: System.Int32?
Gets the size, or null.
Value
Type: System.Object
Gets the value.