Commit 56b5487
committed
Use
Follows up #451 with a significant code quality improvement in which we
can use `sqlc.embed` (which TIL about) to embed a `RiverJob` row
directly on the returned struct, which means we can use our normal
`jobRowFromInternal` to map it to a driver result instead of having to
manually construct `RiverJob` property by property.
Tipped off to the existence of `sqlc.embed` by @tadejsv [1]. Thank you!
[1] #451 (comment)sqlc.embed to embed a RiverJob row during unique insertion1 parent 439c789 commit 56b5487
5 files changed
Lines changed: 41 additions & 109 deletions
File tree
- riverdriver
- riverdatabasesql
- internal/dbsqlc
- riverpgxv5
- internal/dbsqlc
Lines changed: 19 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
| 305 | + | |
324 | 306 | | |
325 | 307 | | |
326 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 299 | + | |
318 | 300 | | |
319 | 301 | | |
320 | 302 | | |
| |||
0 commit comments