fix(storage,document): sequential upserts

This commit is contained in:
2023-02-17 22:26:12 +01:00
parent a13dfffd5c
commit c721d46218
5 changed files with 223 additions and 138 deletions

View File

@ -188,10 +188,6 @@ func (s *DocumentStore) Upsert(ctx context.Context, collection string, document
id = storage.NewDocumentID()
}
delete(document, storage.DocumentAttrID)
delete(document, storage.DocumentAttrCreatedAt)
delete(document, storage.DocumentAttrUpdatedAt)
args := []any{id, collection, JSONMap(document), now, now}
row := tx.QueryRowContext(ctx, query, args...)