PEATDB/Search.py
def searchfunc(self, col, attr, val, op):
        """Must be overriden, this code is an example only
           col: field in DB
           attr: name of attribute to search
           val: value to search for
           op: relational operator to apply e.g. '>'
           returns a list of records that are True for the search
        """
        func = self.funcs[op]
        for rec in self.reclist:
            if not self.data[rec].has_key(col): continue
            if func(val,data[rec][col]):
                names.append(rec)
        return names
Must be overriden, this code is an example only
           col: field in DB
           attr: name of attribute to search
           val: value to search for
           op: relational operator to apply e.g. '>'
           returns a list of records that are True for the search
        
Must be overriden, this code is an example only
col: field in DB
attr: name of attribute to search
val: value to search for
op: relational operator to apply e.g. '>'
returns a list of records that are True for the search
Must be overriden this code is an example only col : field in DB attr : name of attribute to search val : value to search for op : relational operator to apply e . g . ' > ' returns a list of records that are True for the search
def searchfunc(self, col, attr, val, op):
        func = self.funcs[op]
        for rec in self.reclist:
            if not self.data[rec].has_key(col): continue
            if func(val,data[rec][col]):
                names.append(rec)
        return names
def searchfunc ( self , col , attr , val , op ) : func = self . funcs [ op ] for rec in self . reclist : if not self . data [ rec ] . has_key ( col ) : continue if func ( val , data [ rec ] [ col ] ) : names . append ( rec ) return names
Must be overriden, this code is an example only
col: field in DB
attr: name of attribute to search
val: value to search for
op: relational operator to apply e.g.
Must be overriden this code is an example only col : field in DB attr : name of attribute to search val : value to search for op : relational operator to apply e . g .
"""Must be overriden, this code is an example only
           col: field in DB
           attr: name of attribute to search
           val: value to search for
           op: relational operator to apply e.g. '>'
           returns a list of records that are True for the search
        """
self
col
attr
val
op