Skip to content

Commit

Permalink
[NOID] fix tests and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Dec 3, 2024
1 parent 07335eb commit d20d521
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ Eclipse Public License - v 1.0
eclipse-collections-10.4.0.jar
eclipse-collections-api-10.4.0.jar
junit-4.13.2.jar
schemacrawler-15.04.01.jar
schemacrawler-16.22.2.jar
------------------------------------------------------------------------------

Eclipse Public License - v 1.0
Expand Down
6 changes: 3 additions & 3 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ Eclipse Public License - v 1.0
eclipse-collections-10.4.0.jar
eclipse-collections-api-10.4.0.jar
junit-4.13.2.jar
schemacrawler-15.04.01.jar
schemacrawler-16.22.2.jar

Eclipse Public License - v 1.0
logback-classic-1.2.10.jar
Expand Down Expand Up @@ -388,13 +388,13 @@ Eclipse Public License - v 2.0
osgi-resource-locator-1.0.3.jar

GNU General Public License
schemacrawler-15.04.01.jar
schemacrawler-16.22.2.jar

GNU General Public License (GPL), version 2, with the Classpath exception
jnr-posix-3.0.44.jar

GNU Lesser General Public License
schemacrawler-15.04.01.jar
schemacrawler-16.22.2.jar

GNU Lesser General Public License
logback-classic-1.2.10.jar
Expand Down
4 changes: 2 additions & 2 deletions full/src/main/java/apoc/load/Jdbc.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private Stream<RowResult> executeQuery(
String url = getUrlOrKey(urlOrKey);
String query = getSqlOrKey(tableOrSelect);
try {
Connection connection = (Connection) getConnection(url,loadJdbcConfig, Connection.class);
Connection connection = (Connection) getConnection(url, loadJdbcConfig, Connection.class);
// see https://jdbc.postgresql.org/documentation/91/query.html#query-with-cursors
connection.setAutoCommit(loadJdbcConfig.isAutoCommit());
try {
Expand Down Expand Up @@ -162,7 +162,7 @@ private Stream<RowResult> executeUpdate(
String url = getUrlOrKey(urlOrKey);
LoadJdbcConfig jdbcConfig = new LoadJdbcConfig(config);
try {
Connection connection = (Connection) getConnection(url,jdbcConfig, Connection.class);
Connection connection = (Connection) getConnection(url, jdbcConfig, Connection.class);
try {
PreparedStatement stmt =
connection.prepareStatement(query, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
Expand Down
19 changes: 8 additions & 11 deletions full/src/main/java/apoc/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,19 @@
import apoc.Extended;
import apoc.load.util.LoadJdbcConfig;
import apoc.result.VirtualNode;
import org.neo4j.graphdb.*;
import org.neo4j.procedure.Procedure;
import org.neo4j.procedure.*;
import us.fatehi.utility.datasource.DatabaseConnectionSource;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import org.neo4j.graphdb.*;
import org.neo4j.procedure.*;
import org.neo4j.procedure.Procedure;
import schemacrawler.schema.*;
import schemacrawler.schemacrawler.SchemaCrawlerOptions;
import schemacrawler.schemacrawler.SchemaCrawlerOptionsBuilder;
import schemacrawler.schemacrawler.SchemaInfoLevelBuilder;
import schemacrawler.tools.utility.SchemaCrawlerUtility;
import us.fatehi.utility.datasource.DatabaseConnectionSource;

@Extended
public class Model {
Expand Down Expand Up @@ -81,13 +79,12 @@ public Stream<DatabaseModel> jdbc(
throws Exception {
String url = getUrlOrKey(urlOrKey);

SchemaCrawlerOptionsBuilder optionsBuilder =
SchemaCrawlerOptionsBuilder.builder().withSchemaInfoLevel(SchemaInfoLevelBuilder.standard());
SchemaCrawlerOptions options = optionsBuilder.toOptions();
SchemaCrawlerOptions options = SchemaCrawlerOptionsBuilder.newSchemaCrawlerOptions();

DatabaseConnectionSource connectionSource = (DatabaseConnectionSource) getConnection( url, new LoadJdbcConfig(config), DatabaseConnectionSource.class );
DatabaseConnectionSource connectionSource = (DatabaseConnectionSource)
getConnection(url, new LoadJdbcConfig(config), DatabaseConnectionSource.class);
Catalog catalog = SchemaCrawlerUtility.getCatalog(connectionSource, options);

DatabaseModel databaseModel = new DatabaseModel();

ModelConfig modelConfig = new ModelConfig(config != null ? config : Collections.emptyMap());
Expand Down

0 comments on commit d20d521

Please sign in to comment.