@@ -12,8 +12,21 @@ The `generate` command reads `sqlcj.yaml` from the directory it is run in:
1212sqlcj generate
1313```
1414
15- There is no configuration-path option and no configuration discovery in parent
16- directories.
15+ ` --config <path> ` selects another file, so generation can run from any working
16+ directory:
17+
18+ ``` bash
19+ sqlcj generate --config ../project/sqlcj.yaml
20+ ```
21+
22+ The option defaults to ` sqlcj.yaml ` , and a relative value is resolved against
23+ the directory the command is run in. Relative paths inside the file are still
24+ resolved against the directory that contains the file, not against the working
25+ directory. A missing or invalid explicit file reports the usual configuration
26+ diagnostic and exits with status ` 1 ` ; there is no fallback to ` sqlcj.yaml ` .
27+
28+ There is no short alias, no environment variable, and no configuration
29+ discovery in parent directories.
1730
1831## Supported Version
1932
@@ -109,8 +122,9 @@ generated/dev/example/generated/AuthorRepository.java
109122# # Path Resolution
110123
111124A relative `schema`, `queries`, or `java.out` path is resolved against the
112- directory that contains `sqlcj.yaml`, not against the process working directory
113- at a later point in time. An absolute path is used as-is.
125+ directory that contains the configuration file, whether that file is the
126+ default `sqlcj.yaml` or one named by `--config`, and not against the process
127+ working directory at a later point in time. An absolute path is used as-is.
114128
115129Resolved paths are normalized lexically, so `../sql/schema.sql` is supported.
116130Resolution does not require `java.out` to exist, does not expand `~`,
0 commit comments