in exposed-gradle-plugin/plugin-build/exposed-code-generator/src/main/kotlin/org/jetbrains/exposed/gradle/MetadataGetter.kt [72:85]
fun getTables(): List<Table> {
val options = SchemaCrawlerOptionsBuilder.newSchemaCrawlerOptions()
.withLoadOptions(LoadOptionsBuilder.builder()
.withSchemaInfoLevel(SchemaInfoLevelBuilder.maximum())
.toOptions()
)
val connection = dataSource.get()
val retrievalOptions = SchemaRetrievalOptionsBuilder.builder().fromConnnection(connection).toOptions()
val catalog = SchemaCrawler(connection, retrievalOptions, options).crawl()
// return sortTablesByDependencies(catalog.schemas.flatMap { catalog.getTables(it) })
return catalog.schemas.flatMap { catalog.getTables(it) }
}