Class Util
Inheritance
System.Object
Util
Assembly: netcore-psql-util.dll
Syntax
public static class Util : object
Methods
|
Improve this Doc
View Source
EnableFirstLastAggregateFunctions(DbContext)
Declaration
public static void EnableFirstLastAggregateFunctions(this DbContext ctx)
Parameters
Type |
Name |
Description |
DbContext |
ctx |
|
|
Improve this Doc
View Source
IsPsqlNull(Object)
states if given object is null or DBNull
Declaration
public static bool IsPsqlNull(this object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ToPsql(DateTime)
retrieve psql representation of datetime
'YYYY-MM-DD hh:mm:ss.millis'
Declaration
public static string ToPsql(this DateTime dt)
Parameters
Type |
Name |
Description |
DateTime |
dt |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(IEnumerable<Double>)
retrieve psql representation of double array
'{val1,val2,...,valn}'
list enquoted, using invariant culture
return "null" string if entire array is a null
Declaration
public static string ToPsql(this IEnumerable<double> ary)
Parameters
Type |
Name |
Description |
IEnumerable<System.Double> |
ary |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(IEnumerable<Nullable<Double>>)
retrieve psql representation of nullable double array
'{val1,val2,null,...,valn}'
list enquoted, using invariant culture and evaluating null to "null" strings
Declaration
public static string ToPsql(this IEnumerable<double?> ary)
Parameters
Type |
Name |
Description |
IEnumerable<System.Nullable<System.Double>> |
ary |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(Boolean)
retrieve psql representation of boolean
"TRUE" or "FALSE" string
Declaration
public static string ToPsql(this bool value)
Parameters
Type |
Name |
Description |
System.Boolean |
value |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(Double)
retrieve psql representation of double
(number without quotes)
Declaration
public static string ToPsql(this double value)
Parameters
Type |
Name |
Description |
System.Double |
value |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(Int32)
retrieve psql representation of integer
(number without quotes)
Declaration
public static string ToPsql(this int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(Nullable<DateTime>)
retrieve psql representation of datetime
'YYYY-MM-DD hh:mm:ss.millis'
or "null" string if given argument is null
Declaration
public static string ToPsql(this DateTime? dt)
Parameters
Type |
Name |
Description |
System.Nullable<DateTime> |
dt |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(Nullable<Boolean>)
retrieve psql representation of boolean
"TRUE" or "FALSE" string
or "null" string if given argument is null
Declaration
public static string ToPsql(this bool? value)
Parameters
Type |
Name |
Description |
System.Nullable<System.Boolean> |
value |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(Nullable<Double>)
retrieve psql representation of double
(number without quotes)
of "null" string if given argument is null
Declaration
public static string ToPsql(this double? value)
Parameters
Type |
Name |
Description |
System.Nullable<System.Double> |
value |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(Nullable<Int32>)
retrieve psql representation of integer
(number without quotes)
of "null" string if given argument is null
Declaration
public static string ToPsql(this int? value)
Parameters
Type |
Name |
Description |
System.Nullable<System.Int32> |
value |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToPsql(String)
retrieve psql repsentation of string
'string' enquoted and escaped
or "null" stringif given argument is null
Declaration
public static string ToPsql(this string str)
Parameters
Type |
Name |
Description |
System.String |
str |
|
Returns
Type |
Description |
System.String |
|