WIP: convert GORM to sqlc, for jobs/tasks #104304

Closed
Sybren A. Stüvel wants to merge 27 commits from sqlc-task into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

This PR tracks the work in progress for #104305. GORM is gradually replaced with sqlc.

What appears to be a single GORM query may be split up into several sqlc queries: one more minimal query that should actually be the only functionality of that particular function, and one or two more to keep the interface & the returned data the same for now.

This is a big enough change in itself, so the goal is to replace GORM with sqlc without changing the internal interface of the persistence service, or Flamenco's external API. This means that there is some (in the long run) unnecessary creation of GORM structs to return the data; this can be handled in a followup PR.

This PR tracks the work in progress for #104305. GORM is gradually replaced with [sqlc](https://sqlc.dev/). What appears to be a single GORM query may be split up into several sqlc queries: one more minimal query that should actually be the only functionality of that particular function, and one or two more to keep the interface & the returned data the same for now. This is a big enough change in itself, so the goal is to replace GORM with sqlc without changing the internal interface of the persistence service, or Flamenco's external API. This means that there is some (in the long run) unnecessary creation of GORM structs to return the data; this can be handled in a followup PR.
Sybren A. Stüvel added 8 commits 2024-05-10 12:02:36 +02:00
Sybren A. Stüvel changed title from WIP: convert GORM to SQLC, for jobs/tasks to WIP: convert GORM to sqlc, for jobs/tasks 2024-05-10 12:06:50 +02:00
Sybren A. Stüvel added 1 commit 2024-05-10 22:39:43 +02:00
Sybren A. Stüvel added 7 commits 2024-05-18 12:38:32 +02:00
Remove `SaveTask(...)` from the persistence layer interface as defined
by the `api_impl` package. It's not used.
Instead of waiting for 1ns, wait for 1ms. That's more stable on my laptop,
and still short enough to not really slow down the test.
Doesn't change anything function in the generated code, just the version
numbers & handling of empty comments in the query file.
Sybren A. Stüvel added 9 commits 2024-05-21 00:56:47 +02:00
Sybren A. Stüvel added 1 commit 2024-05-21 01:00:20 +02:00
Sybren A. Stüvel added 1 commit 2024-05-28 08:47:53 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.