equal
deleted
inserted
replaced
37 # check the selected index node is a VariableRef (else we |
37 # check the selected index node is a VariableRef (else we |
38 # won't detect aggregate function |
38 # won't detect aggregate function |
39 if not isinstance(selected[i+1], nodes.VariableRef): |
39 if not isinstance(selected[i+1], nodes.VariableRef): |
40 return True |
40 return True |
41 # if this is not a final entity |
41 # if this is not a final entity |
42 if not schema.eschema(etype).is_final(): |
42 if not schema.eschema(etype).final: |
43 return True |
43 return True |
44 # if this is a final entity not linked to the main variable |
44 # if this is a final entity not linked to the main variable |
45 var = selected[i+1].variable |
45 var = selected[i+1].variable |
46 for vref in var.references(): |
46 for vref in var.references(): |
47 rel = vref.relation() |
47 rel = vref.relation() |
72 nb_rows = len(rset) |
72 nb_rows = len(rset) |
73 # empty resultset |
73 # empty resultset |
74 if nb_rows == 0 : |
74 if nb_rows == 0 : |
75 return 'noresult' |
75 return 'noresult' |
76 # entity result set |
76 # entity result set |
77 if not schema.eschema(rset.description[0][0]).is_final(): |
77 if not schema.eschema(rset.description[0][0]).final: |
78 if need_table_view(rset, schema): |
78 if need_table_view(rset, schema): |
79 return 'table' |
79 return 'table' |
80 if nb_rows == 1: |
80 if nb_rows == 1: |
81 if req.search_state[0] == 'normal': |
81 if req.search_state[0] == 'normal': |
82 return 'primary' |
82 return 'primary' |