StreamWriter¶
-
class
vertica_sdk.
StreamWriter
¶ Iterator-based write interface for producing a stream of output tuples. Automatically makes space a block at a time, as needed.
-
getNumCols
(self)¶ Returns the number of columns held by this writer.
-
getTotalRowCount
(self)¶ Returns the total number of rows written.
-
getTypeMetadata
(self)¶ Returns a
vertica_sdk.SizedColumnTypes
object describing the column types of this writer.
-
next
(self)¶ Advance to the next row. If space is needed, it will be transparently allocated.
Returns True if there is space available to write more rows. Returns False otherwise.
-
setBinary
(self, idx, value)¶ Write a
bytes
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setBool
(self, idx, value)¶ Write a boolean value into the indicated zero-indexed column of the current row.
Returns
None
.
-
setDate
(self, idx, value)¶ Write a
datetime.datetime
ordatetime.date
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setFloat
(self, idx, value)¶ Write a
float
value into the indicated zero-indexed column of the current row.Returns
None
.
-
setInt
(self, idx, value)¶ Write an
int
value into the indicated zero-indexed column of the current row.Returns
None
.
-
setInterval
(self, idx, value)¶ Write a
datetime.timedelta
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setIntervalYM
(self, idx, value)¶ Write a
datetime.timedelta
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setNull
(self, idx)¶ Set the indicated zero-indexed column of the current row to NULL.
Returns
None
.
-
setNumeric
(self, idx, value)¶ Write a
decimal.Decimal
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setString
(self, idx, value)¶ Write a
str
into the indicated zero-indexed column of the current row.Returns
None
.
-
setTime
(self, idx, value)¶ Write a
datetime.time
object (with tzinfo) into the indicated zero-indexed column of the current row.Returns
None
.
-
setTimeTz
(self, idx, value)¶ Write a
datetime.time
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setTimestamp
(self, idx, value)¶ Write a
datetime.datetime
object with appropriate time-zone awareness into the indicated zero-indexed column of the current row.Returns
None
.
-
setTimestampTz
(self, idx, value)¶ Alias for setTimestamp().
-