MCPcopy Create free account
hub / github.com/abaplint/transpiler / buildHashFromData

Method buildHashFromData

packages/runtime/src/types/table.ts:157–184  ·  view source on GitHub ↗
(data: TableRowType)

Source from the content-addressed store, hash-verified

155 return copy;
156 }
157
158 public buildHashFromData(data: TableRowType): string {
159 let hash = "";
160 for (const k of this.options.primaryKey!.keyFields) {
161 if (k === "TABLE_LINE") {
162 if (data instanceof Structure) {
163 hash += k + ":" + data.getCharacter(true) + "|";
164 } else if (data instanceof ABAPObject) {
165 const moo = data.getInternalID();
166 hash += k + ":" + moo + "|";
167 } else {
168 // @ts-ignore
169 hash += k + ":" + data.get() + "|";
170 }
171 } else {
172 // @ts-ignore
173 let val = data.get()[k.toLowerCase()];
174 if (val instanceof Structure) {
175 val = val.getCharacter(true);
176 } else if (val instanceof ABAPObject) {
177 val = val.getInternalID();
178 } else {
179 val = val.get();
180 }
181 hash += k + ":" + val + "|";
182 }
183 }
184 return hash;
185 }
186
187 public deleteIndex(_index: number) {

Callers 3

deleteFromMethod · 0.95
insertMethod · 0.95
readTableFunction · 0.80

Calls 3

getCharacterMethod · 0.80
getInternalIDMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected