google.appengine.ext.ndb.LocalStructuredProperty

Substructure that is serialized to an opaque blob.

Inherits From: BlobProperty, Property, ModelAttribute, expected_type

This looks like StructuredProperty on the Python side, but is written like a BlobProperty in Cloud Datastore. It is not indexed and you cannot query for subproperties. On the other hand, the on-disk representation is more efficient and can be made even more efficient by passing compressed=True, which compresses the blob data using gzip.

Methods

IN

View source

Comparison operator for the IN comparison operator.

The Python IN operator cannot be overloaded in the way we want to, so we define a method. For example:

Employee.query(Employee.rank.IN([4, 5, 6]))

Note that the method is called ._IN() but may normally be invoked as .IN(); ._IN() is provided for the case you have a StructuredProperty with a model that has a Property named IN.

__eq__

View source

Return a FilterNode instance representing the = comparison.

__ge__

View source

Return a FilterNode instance representing the >= comparison.

__gt__

View source

Return a FilterNode instance representing the > comparison.

__le__

View source

Return a FilterNode instance representing the <= comparison.

__lt__

View source

Return a FilterNode instance representing the < comparison.

__ne__

View source

Return a FilterNode instance representing the != comparison.

__neg__

View source

Return a descending sort order on this Property.

For example:

Employee.query().order(-Employee.rank)

__pos__

View source

Returns an ascending sort order on this property.

Note that this is redundant but provided for consistency with __neg__. For example, the following two are equivalent:

Employee.query().order(+Employee.rank)
Employee.query().order(Employee.rank)