Sha256: db2e97d43aef9ad0493a08c9ed77d5795c0a4eda8b2f7a6768dc6e8ccbce63b9
Contents?: true
Size: 608 Bytes
Versions: 9
Compression:
Stored size: 608 Bytes
Contents
module NotRelational class StartsWithCondition attr_accessor :attribute_description attr_accessor :value def initialize(attribute_description,value) self.attribute_description=attribute_description self.value=value end def matches?(domain_model) if domain_model[attribute_description.name]==nil return value==nil || value==:NULL end return domain_model[attribute_description.name].index(value)==0 end def to_sdb_query return "'#{self.attribute_description.name}' starts-with '#{self.attribute_description.format_for_sdb(self.value)}'" end end end
Version data entries
9 entries across 9 versions & 1 rubygems