def CheckProperty(request_trusted, request_app_id, prop, indexed=True):
 name = prop.name()
 value = prop.value()
 meaning = prop.meaning()
 Check((request_trusted or (not datastore_types.RESERVED_PROPERTY_NAME.match(name))), ("cannot store entity with reserved property name '%s'" % name))
 Check((prop.meaning() != entity_pb.Property.INDEX_VALUE), 'Entities with incomplete properties cannot be written.')
 is_blob = (meaning in _BLOB_MEANINGS)
 if indexed:
  Check((not is_blob), (('BLOB, ENITY_PROTO or TEXT property ' + name) + ' must be in a raw_property field'))
  max_length = datastore_types._MAX_STRING_LENGTH
 else:
  if is_blob:
   Check(value.has_stringvalue(), (('BLOB / ENTITY_PROTO / TEXT raw property ' + name) + 'must have a string value'))
  max_length = datastore_types._MAX_RAW_PROPERTY_BYTES
 if (meaning == entity_pb.Property.ATOM_LINK):
  max_length = datastore_types._MAX_LINK_PROPERTY_LENGTH
 CheckPropertyValue(name, value, max_length)

def CheckProperty ( request_trusted , request_app_id , prop , indexed = True ) : name = prop . name ( ) value = prop . value ( ) meaning = prop . meaning ( ) Check ( ( request_trusted or ( not datastore_types . RESERVED_PROPERTY_NAME . match ( name ) ) ) , ( "cannot store entity with reserved property name '%s'" % name ) ) Check ( ( prop . meaning ( ) != entity_pb . Property . INDEX_VALUE ) , 'Entities with incomplete properties cannot be written.' ) is_blob = ( meaning in _BLOB_MEANINGS ) if indexed : Check ( ( not is_blob ) , ( ( 'BLOB, ENITY_PROTO or TEXT property ' + name ) + ' must be in a raw_property field' ) ) max_length = datastore_types . _MAX_STRING_LENGTH else : if is_blob : Check ( value . has_stringvalue ( ) , ( ( 'BLOB / ENTITY_PROTO / TEXT raw property ' + name ) + 'must have a string value' ) ) max_length = datastore_types . _MAX_RAW_PROPERTY_BYTES if ( meaning == entity_pb . Property . ATOM_LINK ) : max_length = datastore_types . _MAX_LINK_PROPERTY_LENGTH CheckPropertyValue ( name , value , max_length )
check if this property can be stored .