pub fn write_sql_value(&self, writer: &mut dyn Write, value: &Value) -> Result<(), Error> {
        match value {
            Value::Null => writer.write_all(self.null_string.as_bytes()),
            Value::Number(number) => number.write_io(writer, &self.true_string, &self.false_string),
            Value::Bytes(bytes) => self.write_sql_bytes(writer, bytes),
            Value::Timestamp(timestamp, tz) => write_timestamp(writer, "'", &tz.from_utc_datetime(timestamp)),
            Value::Interval(interval) => write_interval(writer, "'", *interval),
            Value::Array(array) => {
                writer.write_all(b"ARRAY[")?;
                for (i, item) in array.iter().enumerate() {
                    if i != 0 {
                        writer.write_all(b", ")?;
                    }
                    self.write_sql_value(writer, item)?;
                }
                writer.write_all(b"]")
            }
        }
    }
/// Writes a value in SQL format.
Writes a value in SQL format.
Writes a value in SQL format .
pub fn write_sql_value(&self, writer: &mut dyn Write, value: &Value) -> Result<(), Error> {
        match value {
            Value::Null => writer.write_all(self.null_string.as_bytes()),
            Value::Number(number) => number.write_io(writer, &self.true_string, &self.false_string),
            Value::Bytes(bytes) => self.write_sql_bytes(writer, bytes),
            Value::Timestamp(timestamp, tz) => write_timestamp(writer, "'", &tz.from_utc_datetime(timestamp)),
            Value::Interval(interval) => write_interval(writer, "'", *interval),
            Value::Array(array) => {
                writer.write_all(b"ARRAY[")?;
                for (i, item) in array.iter().enumerate() {
                    if i != 0 {
                        writer.write_all(b", ")?;
                    }
                    self.write_sql_value(writer, item)?;
                }
                writer.write_all(b"]")
            }
        }
    }
pub fn write_sql_value ( & self , writer : & mut dyn Write , value : & Value ) -> Result < ( ) , Error > { match value { Value :: Null => writer . write_all ( self . null_string . as_bytes ( ) ) , Value :: Number ( number ) => number . write_io ( writer , & self . true_string , & self . false_string ) , Value :: Bytes ( bytes ) => self . write_sql_bytes ( writer , bytes ) , Value :: Timestamp ( timestamp , tz ) => write_timestamp ( writer , " " , & tz . from_utc_datetime ( timestamp ) ) , Value :: Interval ( interval ) => write_interval ( writer , " " , * interval ) , Value :: Array ( array ) => { writer . write_all ( b" " ) ? ; for ( i , item ) in array . iter ( ) . enumerate ( ) { if i != 0 { writer . write_all ( b" " ) ? ; } self . write_sql_value ( writer , item ) ? ; } writer . write_all ( b" " ) } } }
Writes a value in SQL format.
Writes a value in SQL format .
&self
writer
&mut dyn Write
value
&Value
&self
writer
&mut dyn Write
value
&Value