Package web2py :: Package gluon :: Module dal :: Class Set

[hide private]
[frames] | no frames]

# Class Set

source code

    object --+
             |
            Set

    a Set represents a set of records in the database,
    the records are identified by the query=Query(...) object.
    normally the Set is generated by DAL.__call__(Query(...))

    given a set, for example
       set = db(db.users.name=='Max')
    you can:
       set.update(db.users.name='Massimo')
       set.delete() # all elements in the set
       set.select(orderby=db.users.id, groupby=db.users.name, limitby=(0,10))
    and take subsets:
       subset = set(db.users.id<5)

Instance Methods | [hide private]

__init__(self, db, query, ignore_common_filters=global_settings.applications_parent) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

__call__(self, query, ignore_common_filters=True) | source code

_count(self, distinct=global_settings.applications_parent) | source code

_select(self, *fields, **attributes) | source code

_delete(self) | source code

_update(self, **update_fields) | source code

isempty(self) | source code

count(self, distinct=global_settings.applications_parent) | source code

select(self, *fields, **attributes) | source code

delete(self) | source code

update(self, **update_fields) | source code

validate_and_update(self, **update_fields) | source code

delete_uploaded_files(self, upload_fields=global_settings.applications_parent) | source code

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, db, query, ignore_common_filters=global_settings.applications_parent)
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
  (inherited documentation)