Local PostgreSQL container for query analysis / validation#4514
Local PostgreSQL container for query analysis / validation#4514nikolayk812 wants to merge 4 commits into
Conversation
|
I really like the idea of using containers in development! |
| Managed bool `json:"managed" yaml:"managed"` | ||
| URI string `json:"uri" yaml:"uri"` | ||
| Managed bool `json:"managed" yaml:"managed"` | ||
| TestcontainersImage string `json:"testcontainers_image" yaml:"testcontainers_image"` |
There was a problem hiding this comment.
Does it have to be called testcontainers_image? Why not just image or container_image to not leak implementation details about the library used to the public API?
|
@nikolayk812 sorry, I'm not interested in adding Docker / container support at this time. |
|
@kyleconroy fair enough. I got a feeling that in-memory mode of sqlc should be deprecated or discouraged. In-memory supports results in reimplementing lots of semantical validations in the generator, which DB can do automatically. But then current DB mode is limited, in a way that it requires migrations to be applied separately, outside of the generator if I understand correctly. Is this to give advantage to SQLc Cloud? |
Add a testcontainers_image field to the database config block. When set, sqlc automatically starts a local PostgreSQL Docker container, applies schema migrations, and uses it for analysis — then tears it down when done.
#4513