Bases: list
the surf.resource.value.ResourceValue class is used by the surf.resource.Resource class to lazy load instances of resources.
Note
the class also emulates a list, while in addition providing support for SuRF queries, as defined in the surf.query module.
Note
instances of this class must not be created manually, instead they are automatically generated by SuRF as needed
get the context query attribute. Syntactic sugar for surf.resource.Resource.query_attribute() method.
L.count(value) -> integer – return number of occurrences of value
get the desc query attribute. Syntactic sugar for surf.resource.Resource.query_attribute() method.
return the first resource or None otherwise.
get the full query attribute. Syntactic sugar for surf.resource.Resource.query_attribute() method.
get the get_by query attribute. Syntactic sugar for surf.resource.Resource.query_attribute() method.
return only one resource. If there are more resources available the surf.exc.NoResultFound exception is raised
L.index(value, [start, [stop]]) -> integer – return first index of value. Raises ValueError if the value is not present.
get the limit query attribute. Syntactic sugar for surf.resource.Resource.query_attribute() method.
get the offset query attribute. Syntactic sugar for surf.resource.Resource.query_attribute() method.
return only one resource. If there are more resources available the surf.exc.NoResultFound exception is raised
get the order query attribute. Syntactic sugar for surf.resource.Resource.query_attribute() method.
L.reverse() – reverse IN PLACE
mark this resource as dirty. By doing so, SuRF will refresh it’s content as soon as it’s necessary
L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE; cmp(x, y) -> -1, 0, 1