Method: PG::CopyCoder#null_string=

Defined in:
ext/pg_copy_coder.c

#null_string=(null_string) ⇒ Object

Specifies the string that represents a null value. The default is \N (backslash-N) in text format. You might prefer an empty string even in text format for cases where you don’t want to distinguish nulls from empty strings.

This option is ignored when using binary format.



127
128
129
130
131
132
133
134
135
# File 'ext/pg_copy_coder.c', line 127

static VALUE
pg_copycoder_null_string_set(VALUE self, VALUE null_string)
{
  t_pg_copycoder *this = RTYPEDDATA_DATA(self);
  rb_check_frozen(self);
  StringValue(null_string);
  RB_OBJ_WRITE(self, &this->null_string, null_string);
  return null_string;
}