BlockWriter

class vertica_sdk.BlockWriter

Interface for writing a list of in-memory tuples.

All rows have the same column types.

copyColumn(self, srcblock, srccol)

Copy a column from the current row of srcblock into the current row of this block.

Returns None.

getArrayWriter(self)

Returns a vertica_sdk.ArrayWriter object used to store array data.

getNumCols(self)

Returns the number of columns held by this writer.

getNumRows(self)

Returns the number of rows held by this writer.

getRowWriter(self)

Returns a vertica_sdk.RowWriter objects used to store row data.

getTypeMetadata(self)

Returns a vertica_sdk.SizedColumnTypes object describing the column types of this writer.

next(self)

Advances the block writer to the next row of output.

Returns None.

setArray(self, value)

Stores a list object as array data.

Returns None.

setBinary(self, value)

Stores a binary value for the current row. Raises a RuntimeError when this block data type does not match.

Returns None.

setBool(self, value)

Stores a bool value for the current row. Raises a RuntimeError when this block data type does not match.

Returns None.

setDate(self, value)

Stores a datetime.datetime or datetime.date. Raises a RuntimeError when this block data type does not match.

Returns None.

setFloat(self, value)

Stores a float value for the current row. Raises a RuntimeError when this block data type does not match.

Returns None.

setHook(self)
setInt(self, value)

Stores an int value for the current row. Raises a RuntimeError when this block data type does not match.

Returns None.

setInterval(self, value)

Stores a datetime.timedelta. Raises a RuntimeError when this block data type does not match.

Returns None.

setIntervalYM(self, value)

Stores an int number of months. Raises a RuntimeError when this block data type does not match.

Returns None.

setNull(self)

Sets the output for the current row to NULL.

Returns None.

setNumeric(self, value)

Stores a decimal.Decimal. Values will be rounded to the scale of the output type. Raises a RuntimeError when this block data type does not match.

Returns None.

setRow(self, value)

Stores row data. Supported input value formats are: - tuple, where each entry corresponds to a field in its corresponding field order - dict or collections.OrderedDict, where each key-value pair maps field name to field value

Returns None.

setString(self, value)

Stores a string value for the current row. Raises a RuntimeError when this block data type does not match.

Returns None.

setTime(self, value)

Stores a datetime.time. Raises a RuntimeError when this block data type does not match.

Returns None.

setTimeTz(self, value)

Stores a datetime.time with datetime.tzinfo. Raises a RuntimeError when this block data type does not match.

Returns None.

setTimestamp(self, value)

Stores a datetime.datetime with appropriate time-zone awareness. Raises a RuntimeError when this block data type does not match.

Returns None.

setTimestampTz(self, value)

Stores a datetime.datetime with appropriate time-zone awareness. Raises a RuntimeError when this block data type does not match.

Returns None.