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 python 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 an int.

getNumRows(self)

Returns an int.

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 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)

Returns SizedColumnTypes.

isNull(self, col)

Returns a bool.

next(self)

Returns a bool.

Advances the block reader to the next row of input. If no more rows are available, then it returns FALSE.