Skip to content

Commit e4b6e09

Browse files
committed
Document mocking issue with context-aware interfaces
1 parent 6590ab1 commit e4b6e09

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

MIGRATION_GUIDE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,14 @@ are all internal to the driver.
367367
This should have 0 impact as they were internal utilities unreachable from
368368
the public APIs.
369369

370+
### Private functions in interfaces
371+
372+
Both `neo4j.SessionWithContext` and `neo4j.ResultWithContext` define unexported functions.
373+
These are needed to avoid duplication between the `context.Context`-aware interface and their legacy, pre v5, variants.
374+
This may, however, cause issues with mocking libraries based on code generation.
375+
376+
It is possible to mock these interfaces, as explained [here](https://groups.google.com/g/golang-nuts/c/6hpUErAfMHI).
377+
370378
### Behavior changes
371379

372380
#### `ResultSummary#ContainUpdates`

0 commit comments

Comments
 (0)