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.ArrayWriterobject 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.RowWriterobjects used to store row data.
-
getTypeMetadata(self)¶ Returns a
vertica_sdk.SizedColumnTypesobject 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
listobject as array data.Returns
None.
-
setBinary(self, value)¶ Stores a binary value for the current row. Raises a
RuntimeErrorwhen this block data type does not match.Returns
None.
-
setBool(self, value)¶ Stores a bool value for the current row. Raises a
RuntimeErrorwhen this block data type does not match.Returns
None.
-
setDate(self, value)¶ Stores a
datetime.datetimeordatetime.date. Raises aRuntimeErrorwhen this block data type does not match.Returns
None.
-
setFloat(self, value)¶ Stores a float value for the current row. Raises a
RuntimeErrorwhen this block data type does not match.Returns
None.
-
setHook(self)¶
-
setInt(self, value)¶ Stores an int value for the current row. Raises a
RuntimeErrorwhen this block data type does not match.Returns
None.
-
setInterval(self, value)¶ Stores a
datetime.timedelta. Raises aRuntimeErrorwhen this block data type does not match.Returns
None.
-
setIntervalYM(self, value)¶ Stores an
intnumber of months. Raises aRuntimeErrorwhen 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 aRuntimeErrorwhen 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 -dictorcollections.OrderedDict, where each key-value pair maps field name to field valueReturns
None.
-
setString(self, value)¶ Stores a string value for the current row. Raises a
RuntimeErrorwhen this block data type does not match.Returns
None.
-
setTime(self, value)¶ Stores a
datetime.time. Raises aRuntimeErrorwhen this block data type does not match.Returns
None.
-
setTimeTz(self, value)¶ Stores a
datetime.timewithdatetime.tzinfo. Raises aRuntimeErrorwhen this block data type does not match.Returns
None.
-
setTimestamp(self, value)¶ Stores a
datetime.datetimewith appropriate time-zone awareness. Raises aRuntimeErrorwhen this block data type does not match.Returns
None.
-
setTimestampTz(self, value)¶ Stores a
datetime.datetimewith appropriate time-zone awareness. Raises aRuntimeErrorwhen this block data type does not match.Returns
None.
-