Class PgParameterCollectionExtensions
This class adds extension methods which simplify setting PostgreSQL parameter values from .NET types.
Inheritance
Inherited Members
Namespace: ArgentSea.Pg
Assembly: ArgentSea.Pg.dll
Syntax
public static class PgParameterCollectionExtensions
Methods
| Improve this Doc View SourceAddPgArrayInputParameter(DbParameterCollection, String, Array, NpgsqlDbType)
Creates a parameter for providing a variable-sized byte array to a stored procedure. A null reference will save DBNull.
Declaration
public static DbParameterCollection AddPgArrayInputParameter(this DbParameterCollection prms, string parameterName, Array value, NpgsqlDbType npgsqlDbType)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Array | value | An array, or null. |
NpgsqlTypes.NpgsqlDbType | npgsqlDbType |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgArrayOutputParameter(DbParameterCollection, String, NpgsqlDbType)
Creates a parameter for obtaining a variable-sized byte array from a stored procedure.
Declaration
public static DbParameterCollection AddPgArrayOutputParameter(this DbParameterCollection prms, string parameterName, NpgsqlDbType npgsqlDbType)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
NpgsqlTypes.NpgsqlDbType | npgsqlDbType |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgBigintInputParameter(DbParameterCollection, String, Int64)
Creates a parameter for providing a 64-bit signed integer (long) to a stored procedure.
Declaration
public static DbParameterCollection AddPgBigintInputParameter(this DbParameterCollection prms, string parameterName, long value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Int64 | value | A 64-bit signed integer value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgBigintInputParameter(DbParameterCollection, String, Nullable<Int64>)
Creates a parameter for providing a 64-bit signed integer (long) or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgBigintInputParameter(this DbParameterCollection prms, string parameterName, long? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Int64> | value | A 64-bit signed integer value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgBigintOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a 64-bit signed integer (long) from a stored procedure.
Declaration
public static DbParameterCollection AddPgBigintOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgBooleanInputParameter(DbParameterCollection, String, Boolean)
Creates a parameter for providing a boolean value (bool) to a stored procedure.
Declaration
public static DbParameterCollection AddPgBooleanInputParameter(this DbParameterCollection prms, string parameterName, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Boolean | value | A boolean value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgBooleanInputParameter(DbParameterCollection, String, Nullable<Boolean>)
Creates a parameter for providing a boolean value (bool) or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgBooleanInputParameter(this DbParameterCollection prms, string parameterName, bool? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Boolean> | value | A boolean value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgBooleanOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a boolean value (bool) from a stored procedure.
Declaration
public static DbParameterCollection AddPgBooleanOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgByteaInputParameter(DbParameterCollection, String, Byte[], Int32)
Creates a parameter for providing a variable-sized byte array to a stored procedure. A null reference will save DBNull.
Declaration
public static DbParameterCollection AddPgByteaInputParameter(this DbParameterCollection prms, string parameterName, byte[] value, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Byte[] | value | An array of bytes, or null. |
System.Int32 | length | The maximum allowable number of bytes in the database column. Use -1 for varbinary(max). |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgByteaOutputParameter(DbParameterCollection, String, Int32)
Creates a parameter for obtaining a variable-sized byte array from a stored procedure.
Declaration
public static DbParameterCollection AddPgByteaOutputParameter(this DbParameterCollection prms, string parameterName, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Int32 | length | The maximum allowable number of bytes in the database column. Use -1 for varbinary(max). |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgCharInputParameter(DbParameterCollection, String, String, Int32)
Creates parameter for providing a fixed-length string or a DBNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgCharInputParameter(this DbParameterCollection prms, string parameterName, string value, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.String | value | An empty string will be saved as a zero-length string; a null string will be saved as a database null value. |
System.Int32 | length | Specifies the number of characters in the string. If the original string value is smaller than this length, the returned value will be padded with spaces. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgCharOutputParameter(DbParameterCollection, String, Int32)
Creates parameter for obtaining a fixed-length string from a stored procedure.
Declaration
public static DbParameterCollection AddPgCharOutputParameter(this DbParameterCollection prms, string parameterName, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Int32 | length | Specifies the number of characters in the string. If the original string value is smaller than this length, the returned value will be padded with spaces. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgDateInputParameter(DbParameterCollection, String, DateTime)
Creates a parameter for providing a date (sans time) to a stored procedure.
Declaration
public static DbParameterCollection AddPgDateInputParameter(this DbParameterCollection prms, string parameterName, DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.DateTime | value | A DateTime value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgDateInputParameter(DbParameterCollection, String, Nullable<DateTime>)
Creates a parameter for providing a date (sans time) or DbNull to a stored procedure.
Declaration
public static DbParameterCollection AddPgDateInputParameter(this DbParameterCollection prms, string parameterName, DateTime? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.DateTime> | value | A DateTime value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgDateOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a date (sans time) from a stored procedure.
Declaration
public static DbParameterCollection AddPgDateOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgDoubleInputParameter(DbParameterCollection, String, Double)
Creates a parameter for providing a 64-bit floating-point value (double) to a stored procedure. NaN will be converted to DbNull.
Declaration
public static DbParameterCollection AddPgDoubleInputParameter(this DbParameterCollection prms, string parameterName, double value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Double | value | A 64-bit floating-point value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgDoubleInputParameter(DbParameterCollection, String, Nullable<Double>)
Creates a parameter for providing a 64-bit floating-point value (double) or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgDoubleInputParameter(this DbParameterCollection prms, string parameterName, double? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Double> | value | A 64-bit floating-point value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgDoubleOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a 64-bit floating-point value (double) from a stored procedure.
Declaration
public static DbParameterCollection AddPgDoubleOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgHstoreInputParameter(DbParameterCollection, String, IDictionary<String, String>)
Creates a parameter for providing a variable-sized byte array to a stored procedure. A null reference will save DBNull.
Declaration
public static DbParameterCollection AddPgHstoreInputParameter(this DbParameterCollection prms, string parameterName, IDictionary<string, string> value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Collections.Generic.IDictionary<System.String, System.String> | value | An array of bytes, or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgHstoreOutputParameter(DbParameterCollection, String)
Creates a parameter for obtaining a variable-sized byte array from a stored procedure.
Declaration
public static DbParameterCollection AddPgHstoreOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgIntegerInputParameter(DbParameterCollection, String, Int32)
Creates a parameter for providing a 32-bit signed integer (int) to a stored procedure.
Declaration
public static DbParameterCollection AddPgIntegerInputParameter(this DbParameterCollection prms, string parameterName, int value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Int32 | value | A 32-bit signed integer value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgIntegerInputParameter(DbParameterCollection, String, Nullable<Int32>)
Creates a parameter for providing a 32-bit signed integer (int) or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgIntegerInputParameter(this DbParameterCollection prms, string parameterName, int? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Int32> | value | A 32-bit signed integer value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgIntegerOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a 32-bit signed integer (int) from a stored procedure.
Declaration
public static DbParameterCollection AddPgIntegerOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgInternalCharInputParameter(DbParameterCollection, String, Byte)
Creates a parameter for providing a 8-bit unsigned integer (byte) to a stored procedure.
Declaration
public static DbParameterCollection AddPgInternalCharInputParameter(this DbParameterCollection prms, string parameterName, byte value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Byte | value | An unsigned 8-bit integer value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgInternalCharInputParameter(DbParameterCollection, String, Nullable<Byte>)
Creates a parameter for providing a 8-bit unsigned integer (byte) or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgInternalCharInputParameter(this DbParameterCollection prms, string parameterName, byte? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Byte> | value | An unsigned 8-bit integer value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgInternalCharOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a 32-bit signed integer (byte) from a stored procedure.
Declaration
public static DbParameterCollection AddPgInternalCharOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgIntervalInputParameter(DbParameterCollection, String, Nullable<TimeSpan>)
Creates a parameter for providing a time value or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgIntervalInputParameter(this DbParameterCollection prms, string parameterName, TimeSpan? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.TimeSpan> | value | A time value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgIntervalInputParameter(DbParameterCollection, String, TimeSpan)
Creates a parameter for providing a time value to a stored procedure.
Declaration
public static DbParameterCollection AddPgIntervalInputParameter(this DbParameterCollection prms, string parameterName, TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.TimeSpan | value | A time value . |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgIntervalOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a time value from a stored procedure.
Declaration
public static DbParameterCollection AddPgIntervalOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgMoneyInputParameter(DbParameterCollection, String, Decimal)
Creates a parameter for providing a decmial value to a stored procedure.
Declaration
public static DbParameterCollection AddPgMoneyInputParameter(this DbParameterCollection prms, string parameterName, decimal value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Decimal | value | A decmial value . |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgMoneyInputParameter(DbParameterCollection, String, Nullable<Decimal>)
Creates a parameter for providing a decmial value or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgMoneyInputParameter(this DbParameterCollection prms, string parameterName, decimal? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Decimal> | value | A decmial value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgMoneyOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a decmial value from a stored procedure.
Declaration
public static DbParameterCollection AddPgMoneyOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgNumericInputParameter(DbParameterCollection, String, Decimal, Byte, Byte)
Creates a parameter for providing a decmial value to a stored procedure.
Declaration
public static DbParameterCollection AddPgNumericInputParameter(this DbParameterCollection prms, string parameterName, decimal value, byte precision, byte scale)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Decimal | value | A decmial value . |
System.Byte | precision | |
System.Byte | scale |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgNumericInputParameter(DbParameterCollection, String, Nullable<Decimal>, Byte, Byte)
Creates a parameter for providing a decmial value or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgNumericInputParameter(this DbParameterCollection prms, string parameterName, decimal? value, byte precision, byte scale)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Decimal> | value | A decmial value or null. |
System.Byte | precision | |
System.Byte | scale |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgNumericOutputParameter(DbParameterCollection, String, Byte, Byte)
Creates an output parameter for retrieving a decmial value from a stored procedure.
Declaration
public static DbParameterCollection AddPgNumericOutputParameter(this DbParameterCollection prms, string parameterName, byte precision, byte scale)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Byte | precision | Specifies the maximum number of digits used to store the number (inclusive of both sides of the decimal point). |
System.Byte | scale | Specifies the number of digits used in the fractional portion of the number (i.e. digits to the right of the decimal point). |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgRealInputParameter(DbParameterCollection, String, Nullable<Single>)
Creates a parameter for providing a 32-bit floating-point value (float) or DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgRealInputParameter(this DbParameterCollection prms, string parameterName, float? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Single> | value | A 32-bit floating point value (float) or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgRealInputParameter(DbParameterCollection, String, Single)
Creates a parameter for providing a 32-bit floating-point value (float) to a stored procedure. NaN will be converted to DbNull.
Declaration
public static DbParameterCollection AddPgRealInputParameter(this DbParameterCollection prms, string parameterName, float value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Single | value | A 32-bit floating point value (float). |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgRealOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a 32-bit floating-point value (float) from a stored procedure.
Declaration
public static DbParameterCollection AddPgRealOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgSmallintInputParameter(DbParameterCollection, String, Int16)
Creates a parameter for providing a 16-bit signed integer (short) to a stored procedure.
Declaration
public static DbParameterCollection AddPgSmallintInputParameter(this DbParameterCollection prms, string parameterName, short value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Int16 | value | A 16-bit signed integer value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgSmallintInputParameter(DbParameterCollection, String, Nullable<Int16>)
Creates a parameter for providing a 16-bit signed integer (short) or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgSmallintInputParameter(this DbParameterCollection prms, string parameterName, short? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Int16> | value | A 16-bit signed integer value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgSmallintOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a 32-bit signed integer (short) from a stored procedure.
Declaration
public static DbParameterCollection AddPgSmallintOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTextInputParameter(DbParameterCollection, String, String)
Creates parameter for providing a string or a DBNull value to a stored procedure, which is converted to the target ANSI code page (if possible).
Declaration
public static DbParameterCollection AddPgTextInputParameter(this DbParameterCollection prms, string parameterName, string value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.String | value | An empty string will be saved as a zero-length string; a null string will be saved as a database null value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTextOutputParameter(DbParameterCollection, String)
Creates parameter for obtaining a string from a stored procedure, which has been converted from the source ANSI code page.
Declaration
public static DbParameterCollection AddPgTextOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimeInputParameter(DbParameterCollection, String, Nullable<TimeSpan>)
Creates a parameter for providing a time value or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimeInputParameter(this DbParameterCollection prms, string parameterName, TimeSpan? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.TimeSpan> | value | A time value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimeInputParameter(DbParameterCollection, String, TimeSpan)
Creates a parameter for providing a time value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimeInputParameter(this DbParameterCollection prms, string parameterName, TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.TimeSpan | value | A time value . |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimeOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a time value from a stored procedure.
Declaration
public static DbParameterCollection AddPgTimeOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimestampInputParameter(DbParameterCollection, String, DateTime)
Creates a parameter for providing a date and time value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimestampInputParameter(this DbParameterCollection prms, string parameterName, DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.DateTime | value | A date and time value . |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimestampInputParameter(DbParameterCollection, String, Nullable<DateTime>)
Creates a parameter for providing a date and time value or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimestampInputParameter(this DbParameterCollection prms, string parameterName, DateTime? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.DateTime> | value | A date and time value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimestampOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a date and time value from a stored procedure.
Declaration
public static DbParameterCollection AddPgTimestampOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimestampTzInputParameter(DbParameterCollection, String, DateTimeOffset)
Creates a parameter for providing a DateTimeOffset value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimestampTzInputParameter(this DbParameterCollection prms, string parameterName, DateTimeOffset value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.DateTimeOffset | value | A DateTimeOffset value. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimestampTzInputParameter(DbParameterCollection, String, Nullable<DateTimeOffset>)
Creates a parameter for providing a DateTimeOffset or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimestampTzInputParameter(this DbParameterCollection prms, string parameterName, DateTimeOffset? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.DateTimeOffset> | value | A DateTimeOffset value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimestampTzOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a DateTimeOffset from a stored procedure.
Declaration
public static DbParameterCollection AddPgTimestampTzOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimeTzInputParameter(DbParameterCollection, String, DateTimeOffset)
Creates a parameter for providing a time value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimeTzInputParameter(this DbParameterCollection prms, string parameterName, DateTimeOffset value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.DateTimeOffset | value | A time value . |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimeTzInputParameter(DbParameterCollection, String, Nullable<DateTimeOffset>)
Creates a parameter for providing a time value or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimeTzInputParameter(this DbParameterCollection prms, string parameterName, DateTimeOffset? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.DateTimeOffset> | value | A time value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimeTzInputParameter(DbParameterCollection, String, Nullable<TimeSpan>)
Creates a parameter for providing a time value or a DbNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimeTzInputParameter(this DbParameterCollection prms, string parameterName, TimeSpan? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.TimeSpan> | value | A time value or null. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimeTzInputParameter(DbParameterCollection, String, TimeSpan)
Creates a parameter for providing a time value to a stored procedure.
Declaration
public static DbParameterCollection AddPgTimeTzInputParameter(this DbParameterCollection prms, string parameterName, TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.TimeSpan | value | A time value . |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgTimeTzOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a time value from a stored procedure.
Declaration
public static DbParameterCollection AddPgTimeTzOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgUuidInputParameter(DbParameterCollection, String, Guid)
Creates a parameter for providing a Guid or DBNull (via Guid.Empty) to a stored procedure.
Declaration
public static DbParameterCollection AddPgUuidInputParameter(this DbParameterCollection prms, string parameterName, Guid value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Guid | value | A Guid value. Will convert Guild.Empty to DBNull. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgUuidInputParameter(DbParameterCollection, String, Nullable<Guid>)
Creates a parameter for providing a Guid or DBNull (via null value) to a stored procedure.
Declaration
public static DbParameterCollection AddPgUuidInputParameter(this DbParameterCollection prms, string parameterName, Guid? value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Nullable<System.Guid> | value |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgUuidOutputParameter(DbParameterCollection, String)
Creates an output parameter for retrieving a Guid from a stored procedure.
Declaration
public static DbParameterCollection AddPgUuidOutputParameter(this DbParameterCollection prms, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgVarcharInputParameter(DbParameterCollection, String, String, Int32)
Creates parameter for providing a string or a DBNull value to a stored procedure.
Declaration
public static DbParameterCollection AddPgVarcharInputParameter(this DbParameterCollection prms, string parameterName, string value, int maxLength)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended. |
System.String | value | An empty string will be saved as a zero-length string; a null string will be saved as a database null value. |
System.Int32 | maxLength | This should match the size of the parameter, not the size of the input string (and certainly not the number of bytes). For nvarchar(max) parameters, specify -1. Setting the value correctly will help avoid plan cache pollution (when not using stored procedures) and minimize memory buffer allocations. |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |
AddPgVarcharOutputParameter(DbParameterCollection, String, Int32)
Creates parameter for obtaining a string from a stored procedure.
Declaration
public static DbParameterCollection AddPgVarcharOutputParameter(this DbParameterCollection prms, string parameterName, int maxLength)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbParameterCollection | prms | The existing parameter collection to which this output parameter should be added. |
System.String | parameterName | The name of the parameter. If the name doesn’t start with “:”, it will be automatically pre-pended. |
System.Int32 | maxLength |
Returns
Type | Description |
---|---|
System.Data.Common.DbParameterCollection | The DbParameterCollection to which the parameter was appended. |