sqlStatementsDirectory

Talks about:

Where the DDL describing your schema lives, when it is not among your statements.

Left empty — the default — the schema is read from the statements YoSQL already parses, so a project that keeps its create table statements alongside its queries needs no configuration at all.

Point this at a directory to read the DDL from somewhere else: a Flyway or Liquibase migrations directory, most usefully. Files are read in name order, and alter table applies to whatever came before it, which is what makes V1__create.sql followed by V2__add_column.sql describe the schema those two migrations leave behind.

DDL marked with a vendor builds that vendor’s schema rather than the shared one, so a project supporting several databases describes only the tables that differ more than once.

Also in this group: validation .

Tooling

Ant

In order to use YoSQL together with Ant , take a look at the tooling documentation for Ant .

Bazel

In order to use YoSQL together with Bazel , take a look at the tooling documentation for Bazel .

CLI

In order to use YoSQL on the command line, take a look at the tooling documentation for CLI .

yosql --schema-sql-statements-directory=configValue

As long as the name of the config option is unique across all configuration groups, you can use the shorter form:

yosql --sql-statements-directory=configValue

Gradle

In order to use YoSQL together with Gradle , take a look at the tooling documentation for Gradle . The sqlStatementsDirectory setting can be configured using Gradle in Kotlin syntax like this:

plugins {
  java
  id("wtf.metio.yosql") version "2023.2.22"
}

yosql {
  schema {
    sqlStatementsDirectory.set(configValue)
  }
}

or in Groovy syntax like this:

plugins {
  id "java"
  id "wtf.metio.yosql" version "2023.2.22"
}

yosql {
  schema {
    sqlStatementsDirectory = configValue
  }
}

Maven

In order to use YoSQL together with Maven , take a look at the tooling documentation for Maven . The sqlStatementsDirectory setting can be configured using Maven like this:

<build>
  <plugins>
    <plugin>
      <groupId>wtf.metio.yosql</groupId>
      <artifactId>yosql-tooling-maven</artifactId>
      <version>2023.2.22</version>
      <configuration>
        <schema>
          <sqlStatementsDirectory>configValue</sqlStatementsDirectory>
        </schema>
      </configuration>
    </plugin>
  </plugins>
</build>