gluon :: sql :: SQLSet :: Class SQLSet
[hide private]
[frames] | no frames]

Class SQLSet

source code

object --+
         |
        SQLSet


sn SQLSet represents a set of records in the database,
the records are identified by the where=SQLQuery(...) object.
normally the SQLSet is generated by SQLDB.__call__(SQLQuery(...))

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, where='')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__call__(self, where) source code
 
_select(self, *fields, **attributes) source code
 
select(self, *fields, **attributes)
Always returns a SQLRows object, even if it may be empty
source code
 
_delete(self) source code
 
delete(self) source code
 
_update(self, **fields) source code
 
update(self, **fields) 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, where='')
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)