25 for p
in dsnamepattern:
26 p = p.replace(
'*',
'%')
27 dsselstring +=
"LOWER(DATASETNAME) like LOWER('%s') OR " % p
29 dsselstring =
'and (' + dsselstring[:len(dsselstring)-4] +
')'
32 while pos<len(runlist):
33 cursor.execute(
"SELECT DISTINCT RUNNR,DATASETNAME,TYPE,PSTATES,DDM,NFILES,TOTSIZE,TOTEVENTS,CREATIONTIME FROM dataset WHERE RUNNR in (%s) and TYPE!='LOG' %s and not DATASETNAME like '%%.LOG%%'"% (
','.
join([
str(i)
for i
in runlist[pos:pos+blocksize]]), dsselstring))
36 res.setdefault(e[0],[]).
append((e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]))