kyleconroy / sqlc - is it possible to handle cross-schema references while generating?
Asked Answered
C

0

6

I have two different schemas, and I want to generate SQL that references the other schema in a JOIN statement. However, SQLC throws an error saying "schema not found."

This means SQLC doesn't "remember" the schema state from one schema section to another. Is there any way to generate such sql?

I don't find it a good idea to:

  1. Put all SQL files into a single list under one schema.
  2. Merge all schemas into a single schema.
  3. Repeat the necessary parts of the schema definition within the required entry.

How do you usually solve such an issue with joins to other schemas using SQLC?

Celia answered 5/6, 2023 at 21:55 Comment(1)
Hey @James, i'm in the same situation. Did you find any solution for that?Mcdougal

© 2022 - 2024 — McMap. All rights reserved.