Exemplo n.º 1
0
 public override void Write(Instant value, NpgsqlWriteBuffer buf, NpgsqlParameter parameter)
 {
     if (_integerFormat)
     {
         TimestampHandler.WriteInteger(value, buf);
     }
     else
     {
         TimestampHandler.WriteDouble(value, buf);
     }
 }
        public override void Write(Instant value, NpgsqlWriteBuffer buf, NpgsqlParameter?parameter)
        {
            if (_convertInfinityDateTime)
            {
                if (value == Instant.MaxValue)
                {
                    buf.WriteInt64(long.MaxValue);
                    return;
                }

                if (value == Instant.MinValue)
                {
                    buf.WriteInt64(long.MinValue);
                    return;
                }
            }
            TimestampHandler.WriteInteger(value, buf);
        }