Quantcast
Channel: Hone Watson Bookmarks » App Engine
Viewing all articles
Browse latest Browse all 8

App Engine StringListProperty Merge Join Attributes Pattern

$
0
0

App Engine StringListProperty and merge join queries offer the ability to perform searches for a variety of purposes.


class AttributeTags(db.model):
	tags = db.StringListProperty()

Say for instance you would like to create a data object which needs dynamic properties that are easily searchable – for example real estate.

Tags could be such:


a = AttributeTags(tags=['000_3_bedroom', '001_2_bathroom', '002_1_garage'])
a.put()
b = AttributeTags(tags=['000_5_bedroom', '001_4_bathroom', '002_3_garage'])
b.put()
c = AttributeTags(tags=['000_4_bedroom', '001_3_bathroom', '002_3_garage'])
c.put()

SELECT __keys__ FROM AttributeTags WHERE tags >= '000_3' AND tags < '000_4'



Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images