core.bones.selectBone

Module Contents

Classes

selectBone

Attributes

SelectBoneValue

SelectBoneMultiple

core.bones.selectBone.SelectBoneValue
core.bones.selectBone.SelectBoneMultiple
class core.bones.selectBone.selectBone(defaultValue: Union[None, Dict[str, Union[SelectBoneMultiple, SelectBoneValue]], SelectBoneMultiple] = None, values: Union[Dict, List, Tuple, Callable] = (), multiple: bool = False, languages: bool = False, *args, **kwargs)

Bases: viur.core.bones.baseBone

type = select
__getattribute__(self, item)
singleValueFromClient(self, value, skel, name, origData)
buildDBFilter__(self, name, skel, dbFilter, rawFilter, prefix=None)

Parses the searchfilter a client specified in his Request into something understood by the datastore. This function must:

  • Ignore all filters not targeting this bone

  • Safely handle malformed data in rawFilter

    (this parameter is directly controlled by the client)

Parameters
  • name (str) – The property-name this bone has in its Skeleton (not the description!)

  • skel (server.skeleton.Skeleton) – The server.db.Query this bone is part of

  • dbFilter (server.db.Query) – The current server.db.Query instance the filters should be applied to

  • rawFilter (dict) – The dictionary of filters the client wants to have applied

Returns

The modified server.db.Query