equal
deleted
inserted
replaced
12 |
12 |
13 from logilab.common.shellutils import ProgressBar |
13 from logilab.common.shellutils import ProgressBar |
14 |
14 |
15 from yams import schema as schemamod, buildobjs as ybo |
15 from yams import schema as schemamod, buildobjs as ybo |
16 |
16 |
17 from cubicweb.schema import CONSTRAINTS, ETYPE_NAME_MAP |
17 from cubicweb.schema import CONSTRAINTS, ETYPE_NAME_MAP, VIRTUAL_RTYPES |
18 from cubicweb.server import sqlutils |
18 from cubicweb.server import sqlutils |
19 |
19 |
20 def group_mapping(cursor, interactive=True): |
20 def group_mapping(cursor, interactive=True): |
21 """create a group mapping from an rql cursor |
21 """create a group mapping from an rql cursor |
22 |
22 |
292 if not verbose: |
292 if not verbose: |
293 pb.update() |
293 pb.update() |
294 groupmap = group_mapping(cursor, interactive=False) |
294 groupmap = group_mapping(cursor, interactive=False) |
295 for ertype in aller: |
295 for ertype in aller: |
296 # skip eid and has_text relations |
296 # skip eid and has_text relations |
297 if ertype in ('eid', 'identity', 'has_text',): |
297 if ertype in VIRTUAL_RTYPES: |
298 pb.update() |
298 pb.update() |
299 continue |
299 continue |
300 for rql, kwargs in erschema2rql(schema[ertype]): |
300 for rql, kwargs in erschema2rql(schema[ertype]): |
301 if verbose: |
301 if verbose: |
302 print rql % kwargs |
302 print rql % kwargs |