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:
William Chargin 2019-10-19 18:09:24 -07:00 committed by GitHub
parent dbf22cdcfc
commit ebdd20b576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -1293,7 +1293,7 @@ export class Mirror {
].join("_"): string): any); ].join("_"): string): any);
}, },
}; };
const updateEavPrimitive: ({| const updatePrimitive: ({|
+id: Schema.ObjectId, +id: Schema.ObjectId,
+fieldname: string, +fieldname: string,
+value: string | 0 | 1, +value: string | 0 | 1,
@ -1327,7 +1327,7 @@ export class Mirror {
} }
const jsonValue = JSON.stringify(primitive); const jsonValue = JSON.stringify(primitive);
primitives[parameterNameFor.topLevelField(fieldname)] = jsonValue; primitives[parameterNameFor.topLevelField(fieldname)] = jsonValue;
updateEavPrimitive({id: entry.id, fieldname, value: jsonValue}); updatePrimitive({id: entry.id, fieldname, value: jsonValue});
} }
// Add nested primitives. // Add nested primitives.
@ -1347,7 +1347,7 @@ export class Mirror {
} }
primitives[parameterNameFor.topLevelField(nestFieldname)] = primitives[parameterNameFor.topLevelField(nestFieldname)] =
topLevelNested == null ? 0 : 1; topLevelNested == null ? 0 : 1;
updateEavPrimitive({ updatePrimitive({
id: entry.id, id: entry.id,
fieldname: nestFieldname, fieldname: nestFieldname,
value: topLevelNested == null ? 0 : 1, value: topLevelNested == null ? 0 : 1,
@ -1370,7 +1370,7 @@ export class Mirror {
primitives[ primitives[
parameterNameFor.nestedField(nestFieldname, eggFieldname) parameterNameFor.nestedField(nestFieldname, eggFieldname)
] = jsonValue; ] = jsonValue;
updateEavPrimitive({ updatePrimitive({
id: entry.id, id: entry.id,
fieldname: `${nestFieldname}.${eggFieldname}`, fieldname: `${nestFieldname}.${eggFieldname}`,
value: jsonValue, value: jsonValue,

View File

@ -825,7 +825,7 @@ describe("graphql/mirror", () => {
// Check that some objects have the right primitives. // Check that some objects have the right primitives.
// (These poke at the internals of the storage format a bit.) // (These poke at the internals of the storage format a bit.)
// Check primitives (EAV format). // Check primitives.
expect( expect(
db db
.prepare( .prepare(