-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write relations directly as part of batch add / update of entities.
This implies a slight change of the CommonDatabase contract. The huge LDAP dataset is now down to 10s to write, both on postgres and sqlite.
- Loading branch information
Showing
6 changed files
with
169 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
'@backstage/plugin-catalog-backend': minor | ||
--- | ||
|
||
Write relations directly as part of batch add / update of entities. | ||
|
||
Slight change of the `CommonDatabase` contract: | ||
|
||
## `addEntity` removed | ||
|
||
This method was unused by the core, and rendered unnecessary when `addEntities` | ||
exists. | ||
|
||
If you were a user of `addEntity`, please call `addEntities` instead, with an | ||
array of one element. | ||
|
||
## `DbEntityRequest` has a new field `relations` | ||
|
||
This is the structure that is passed to `addEntities` and `updateEntity`. It | ||
used to be the case that you needed to call `setRelations` separately, but now | ||
this instead happens directly when you call `addEntities` or `updateEntity`. | ||
|
||
If you were using `addEntities` or `updateEntity` directly, please adapt your | ||
code to add the `relations` array to each request. If you were calling | ||
`setRelations` separately next to these methods, you no longer need to do so, | ||
after adding the relations to the `DbEntityRequest`s. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.