Class NpgsqlLengthCache
An array of cached lengths for the parameters sending process.
When sending parameters, lengths need to be calculated more than once (once for Bind, once for
an array, once for the string within that array). This cache optimized that. Lengths are added
to the cache, and then retrieved at the same order.
Inheritance
NpgsqlLengthCache
Assembly: Npgsql.dll
Syntax
public sealed class NpgsqlLengthCache
Constructors
NpgsqlLengthCache()
Declaration
public NpgsqlLengthCache()
NpgsqlLengthCache(Int32)
Declaration
public NpgsqlLengthCache(int capacity)
Parameters
Type |
Name |
Description |
Int32 |
capacity |
|
Fields
IsPopulated
Declaration
Field Value
Lengths
Declaration
Field Value
Position
Declaration
Field Value
Methods
Get()
Retrieves a length value previously stored in the cache via Set(Int32).
Called at the writing phase, after validation has already occurred and the length cache is populated.
Declaration
Returns
Set(Int32)
Declaration
Parameters
Type |
Name |
Description |
Int32 |
len |
|
Returns
Type |
Description |
Int32 |
The length parameter.
|