adds an alias to an existing modifier such that record[modifier] = record[alias]
| 94 | // adds an alias to an existing modifier |
| 95 | // such that record[modifier] = record[alias] |
| 96 | int OpBase_AliasModifier |
| 97 | ( |
| 98 | OpBase *op, // op |
| 99 | const char *modifier, // existing alias |
| 100 | const char *alias // new alias |
| 101 | ) { |
| 102 | rax *mapping = ExecutionPlan_GetMappings(op->plan); |
| 103 | void *id = raxFind(mapping, (unsigned char *)modifier, strlen(modifier)); |
| 104 | ASSERT(id != raxNotFound); |
| 105 | |
| 106 | // make sure to not introduce the same modifier twice |
| 107 | if(raxInsert(mapping, (unsigned char *)alias, strlen(alias), id, NULL)) { |
| 108 | array_append(op->modifies, alias); |
| 109 | } |
| 110 | |
| 111 | return (intptr_t)id; |
| 112 | } |
| 113 | |
| 114 | bool OpBase_ChildrenAware |
| 115 | ( |
nothing calls this directly
no test coverage detected