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.date corresponding to the key fieldName.

Raises an error if there is no parameter fieldName.

getFloat(self, fieldName)

Returns a float corresponding to the key fieldName.

Raises an error if there is no parameter fieldName.

getInt(self, fieldName)

Returns an int corresponding to the key fieldName.

Raises an error if there is no parameter fieldName.

getInterval(self, fieldName)

Returns a datetime.timedelta corresponding to the key fieldName.

Raises an error if there is no parameter fieldName.

getIntervalYM(self, fieldName)

Returns a int corresponding to the key fieldName whose value represents an interval in months.

Raises an error if there is no parameter fieldName.

getNumeric(self, fieldName)

Returns a decimal.Decimal corresponding 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 str corresponding to the key fieldName.

Raises an error if there is no parameter fieldName.

getTime(self, fieldName)

Returns a datetime.time corresponding 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.time corresponding 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.datetime corresponding to the key fieldName.

Raises an error if there is no parameter fieldName.

getTimestampTz(self, fieldName)

Returns a datetime.datetime corresponding 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.datetime or datetime.date value for the parameter fieldName.

Returns None.

setFloat(self, fieldName, value)

Write a float value for the parameter fieldName.

Returns None.

setInt(self, fieldName, value)

Write an int value for the parameter fieldName.

Returns None.

setInterval(self, fieldName, value, precision, range)

Write a datetime.timedelta value for the parameter fieldName.

Returns None.

setIntervalYM(self, fieldName, value, range)

Write an int number of months as an IntervalYM for the parameter fieldName.

range is an int for the maximum range of the IntervalYM type.

Returns None.

setNumeric(self, fieldName, value, precision, scale)

Write a decimal.Decimal value 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 str value for the parameter fieldName.

Returns None.

setTime(self, fieldName, value, precision)

Write a datetime.time value for the parameter fieldName.

precision is the precision of the Time type.

Returns None.

setTimeTz(self, fieldName, value, precision)

Write a datetime.time value (with tzinfo) for the parameter fieldName.

precision is the precision of the Time type.

Returns None.

setTimestamp(self, fieldName, value, precision)

Write a datetime.datetime object with appropriate time-zone awareness for the parameter fieldName.

Returns None.

setTimestampTz(self, fieldName, value, precision)

Write a datetime.datetime object with appropriate time-zone awareness for the parameter fieldName.

Returns None.