def serialize(self, placeholder_names, expression_attribute_values): split = not self.path.attribute_name path = substitute_names(self.path.path, placeholder_names, split=split) values = [ get_value_placeholder(value, expression_attribute_values) for value in self.values ] condition = self.format_string.format(*values, path=path, operator=self.operator) if self.logical_operator: other_condition = self.other_condition.serialize( placeholder_names, expression_attribute_values) return '{0} {1} {2}'.format(condition, self.logical_operator, other_condition) return condition
def serialize(self, placeholder_names, expression_attribute_values): return get_value_placeholder(self.value, expression_attribute_values)
def _get_values(self, placeholder_names, expression_attribute_values): return [ value.serialize(placeholder_names, expression_attribute_values) if isinstance(value, Condition) else get_value_placeholder( value, expression_attribute_values) for value in self.values ]
def serialize(self, placeholder_names, expression_attribute_values): return get_value_placeholder(self.value, expression_attribute_values)