server/sources/__init__.py
branchstable
changeset 7779 3826d8480a68
parent 7697 ef50074a0314
child 7815 2a164a9cf81c
equal deleted inserted replaced
7778:262ff5d8fddc 7779:3826d8480a68
    35 from cubicweb.server.edition import EditedEntity
    35 from cubicweb.server.edition import EditedEntity
    36 
    36 
    37 
    37 
    38 def dbg_st_search(uri, union, varmap, args, cachekey=None, prefix='rql for'):
    38 def dbg_st_search(uri, union, varmap, args, cachekey=None, prefix='rql for'):
    39     if server.DEBUG & server.DBG_RQL:
    39     if server.DEBUG & server.DBG_RQL:
    40         print '  %s %s source: %s' % (prefix, uri, union.as_string())
    40         print '  %s %s source: %s' % (prefix, uri, repr(union.as_string()))
    41         if varmap:
    41         if varmap:
    42             print '    using varmap', varmap
    42             print '    using varmap', varmap
    43         if server.DEBUG & server.DBG_MORE:
    43         if server.DEBUG & server.DBG_MORE:
    44             print '    args', args
    44             print '    args', repr(args)
    45             print '    cache key', cachekey
    45             print '    cache key', cachekey
    46             print '    solutions', ','.join(str(s.solutions)
    46             print '    solutions', ','.join(str(s.solutions)
    47                                             for s in union.children)
    47                                             for s in union.children)
    48     # return true so it can be used as assertion (and so be killed by python -O)
    48     # return true so it can be used as assertion (and so be killed by python -O)
    49     return True
    49     return True