BlockReader

class vertica_sdk.BlockReader

Interface for reading a list of in-memory of tuples.

All rows have the same column types.

getBinary(self, idx)

Returns a bytes object.

getBool(self, idx)

Returns a int (SQL null means this has more than two values).

getDate(self, idx)

Returns a datetime.date.

getFloat(self, idx)

Returns a float.

getInt(self, idx)

Returns an int.

getInterval(self, idx)

Returns a datetime.timedelta.

The return value can be a negative interval. Use abs(val) to see the absolute value.

getIntervalYM(self, idx)

Returns an int that represents an interval in months.

The return value can be a negative interval.

getNumCols(self)

Returns the number of columns held by this reader.

getNumRows(self)

Returns the number of rows held by this reader.

getNumeric(self, idx)

Returns a decimal.Decimal.

getString(self, idx)

Returns a str (unicode code point values).

getTime(self, idx)

Returns a datetime.time.

getTimeTz(self, idx)

Returns a datetime.time with datetime.tzinfo set to constant offset.

getTimestamp(self, idx)

Returns a datetime.datetime.

getTimestampTz(self, idx)

Returns a datetime.datetime.

TimestampTz objects contain no timezone information in the Vertica SDK. All times are UTC.

getTypeMetaData(self)
getTypeMetadata(self)

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

isNull(self, col)

Returns True if the value in the indicated zero-indexed column of the current row is NULL, and False otherwise.

next(self)

Advances the block reader to the next row of input. Returns True if more input rows are available, and False otherwise.