ParamWriter¶
-
class
vertica_sdk.ParamWriter¶ Provides write access to a set of named parameters. Type-specific methods can be used to retrieve or set values.
-
containsParameter(self, fieldName)¶ Returns True if there is a value for fieldName and False otherwise.
-
getBool(self, fieldName)¶ Returns a boolean value corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
-
getDate(self, fieldName)¶ Returns a
datetime.datecorresponding to the key fieldName.Raises an error if there is no parameter fieldName.
-
getFloat(self, fieldName)¶ Returns a
floatcorresponding to the key fieldName.Raises an error if there is no parameter fieldName.
-
getInt(self, fieldName)¶ Returns an
intcorresponding to the key fieldName.Raises an error if there is no parameter fieldName.
-
getInterval(self, fieldName)¶ Returns a
datetime.timedeltacorresponding to the keyfieldName.Raises an error if there is no parameter fieldName.
-
getIntervalYM(self, fieldName)¶ Returns a
intcorresponding to the keyfieldNamewhose value represents an interval in months.Raises an error if there is no parameter fieldName.
-
getNumeric(self, fieldName)¶ Returns a
decimal.Decimalcorresponding to the key fieldName.Raises an error if there is no parameter fieldName.
-
getParamNames(self)¶ Returns a list containing the names of all of the parameters.
-
getString(self, fieldName)¶ Returns a
strcorresponding to the key fieldName.Raises an error if there is no parameter fieldName.
-
getTime(self, fieldName)¶ Returns a
datetime.timecorresponding to the key fieldName. The timezone is fixed to UTC.Raises an error if there is no parameter fieldName.
-
getTimeTz(self, fieldName)¶ Returns a
datetime.timecorresponding to then key fieldName. The timezone is a constant offset from UTC.Raises an error if there is no parameter fieldName.
-
getTimestamp(self, fieldName)¶ Returns a
datetime.datetimecorresponding to the key fieldName.Raises an error if there is no parameter fieldName.
-
getTimestampTz(self, fieldName)¶ Returns a
datetime.datetimecorresponding to the key fieldName.Raises an error if there is no parameter fieldName.
-
isEmpty(self)¶ Returns True if there are no parameters and False otherwise.
-
setBool(self, fieldName, value)¶ Write a boolean value for the parameter fieldName.
Returns
None.
-
setDate(self, fieldName, value)¶ Write a
datetime.datetimeordatetime.datevalue for the parameter fieldName.Returns
None.
-
setFloat(self, fieldName, value)¶ Write a
floatvalue for the parameter fieldName.Returns
None.
-
setInt(self, fieldName, value)¶ Write an
intvalue for the parameter fieldName.Returns
None.
-
setInterval(self, fieldName, value, precision, range)¶ Write a
datetime.timedeltavalue for the parameter fieldName.Returns
None.
-
setIntervalYM(self, fieldName, value, range)¶ Write an
intnumber of months as an IntervalYM for the parameter fieldName.range is an
intfor the maximum range of the IntervalYM type.Returns
None.
-
setNumeric(self, fieldName, value, precision, scale)¶ Write a
decimal.Decimalvalue for the parameter fieldName.precision and scale are the precision and scale of the Numeric type, respectively.
Returns
None.
-
setString(self, fieldName, value)¶ Write a
strvalue for the parameter fieldName.Returns None.
-
setTime(self, fieldName, value, precision)¶ Write a
datetime.timevalue for the parameter fieldName.precision is the precision of the Time type.
Returns
None.
-
setTimeTz(self, fieldName, value, precision)¶ Write a
datetime.timevalue (with tzinfo) for the parameter fieldName.precision is the precision of the Time type.
Returns
None.
-
setTimestamp(self, fieldName, value, precision)¶ Write a
datetime.datetimeobject with appropriate time-zone awareness for the parameter fieldName.Returns
None.
-
setTimestampTz(self, fieldName, value, precision)¶ Write a
datetime.datetimeobject with appropriate time-zone awareness for the parameter fieldName.Returns
None.
-