class CQL::Postgres::BinaryCopy::Writer

Overview

Writes rows of a COPY ... FROM STDIN (FORMAT binary). types are the OIDs of the columns in order; each value is encoded in the binary form of its column's type, so an Int goes into int2/int4/int8 only if it fits and nothing is converted between kinds. Only valid inside the block it was yielded to.

Defined in:

postgres/binary_copy.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(copy : CopyIn, types : Array(UInt32)) #

[View source]

Instance Method Detail

def row(*values) : Nil #

[View source]
def write_row(values : Array) : Nil #

A row held in an array (a single array-typed column goes through #row).


[View source]