Commit 3ca7c47
committed
docs(codecs): thread the connection config in the SchemaCodec example
The subclass example omitted config= on both _build_path and _get_backend, so
a codec written from it resolves its store against the module-level dj.config
instead of the calling connection's. In a process holding connections for
several users that config belongs to none of them, and on a pod with no
ambient credentials it belongs to nothing at all.
The built-in object and npy codecs already read key["_config"] and pass it to
both helpers; the example now shows the same, and a note above it says why.
The example also omitted store_name on _build_path, which is where partition
and prefix settings come from.
Docs only: the executable AST is unchanged.1 parent 8e6ef31 commit 3ca7c47
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
42 | | - | |
43 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
48 | | - | |
| 57 | + | |
| 58 | + | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
| |||
0 commit comments