internal static string ToTimeStamp(NpgsqlNativeTypeInfo typeInfo, object nativeData, Boolean ForExtendedQuery)
 {
     if (nativeData is DateTime)
     {
         return(BasicNativeToBackendTypeConverter.ToDateTime(typeInfo, nativeData, ForExtendedQuery));
     }
     else
     {
         return(nativeData.ToString());
     }
 }
Exemplo n.º 2
0
 internal static byte[] ToTimeStamp(NpgsqlNativeTypeInfo typeInfo, object nativeData, Boolean forExtendedQuery, NativeToBackendTypeConverterOptions options, bool arrayElement)
 {
     if (nativeData is DateTime)
     {
         return(BasicNativeToBackendTypeConverter.ToDateTime(typeInfo, nativeData, forExtendedQuery, options, arrayElement));
     }
     else
     {
         return(BackendEncoding.UTF8Encoding.GetBytes(nativeData.ToString()));
     }
 }