mirror: clean up references to “EAV” primitives (#1349)
Summary: The migration is complete; only EAV primitives remain, so they shall be called simply “primitives”. See #1313 and adjacent commits for context. Test Plan: Running `git grep -iw eav` no longer returns any results. wchargin-branch: mirror-eav-prune-names
This commit is contained in:
parent
dbf22cdcfc
commit
ebdd20b576
|
@ -1293,7 +1293,7 @@ export class Mirror {
|
|||
].join("_"): string): any);
|
||||
},
|
||||
};
|
||||
const updateEavPrimitive: ({|
|
||||
const updatePrimitive: ({|
|
||||
+id: Schema.ObjectId,
|
||||
+fieldname: string,
|
||||
+value: string | 0 | 1,
|
||||
|
@ -1327,7 +1327,7 @@ export class Mirror {
|
|||
}
|
||||
const jsonValue = JSON.stringify(primitive);
|
||||
primitives[parameterNameFor.topLevelField(fieldname)] = jsonValue;
|
||||
updateEavPrimitive({id: entry.id, fieldname, value: jsonValue});
|
||||
updatePrimitive({id: entry.id, fieldname, value: jsonValue});
|
||||
}
|
||||
|
||||
// Add nested primitives.
|
||||
|
@ -1347,7 +1347,7 @@ export class Mirror {
|
|||
}
|
||||
primitives[parameterNameFor.topLevelField(nestFieldname)] =
|
||||
topLevelNested == null ? 0 : 1;
|
||||
updateEavPrimitive({
|
||||
updatePrimitive({
|
||||
id: entry.id,
|
||||
fieldname: nestFieldname,
|
||||
value: topLevelNested == null ? 0 : 1,
|
||||
|
@ -1370,7 +1370,7 @@ export class Mirror {
|
|||
primitives[
|
||||
parameterNameFor.nestedField(nestFieldname, eggFieldname)
|
||||
] = jsonValue;
|
||||
updateEavPrimitive({
|
||||
updatePrimitive({
|
||||
id: entry.id,
|
||||
fieldname: `${nestFieldname}.${eggFieldname}`,
|
||||
value: jsonValue,
|
||||
|
|
|
@ -825,7 +825,7 @@ describe("graphql/mirror", () => {
|
|||
// Check that some objects have the right primitives.
|
||||
// (These poke at the internals of the storage format a bit.)
|
||||
|
||||
// Check primitives (EAV format).
|
||||
// Check primitives.
|
||||
expect(
|
||||
db
|
||||
.prepare(
|
||||
|
|
Loading…
Reference in New Issue