Skip to content

Commit

Permalink
Replace usage of removed db.indexes() with SHOW INDEXES
Browse files Browse the repository at this point in the history
  • Loading branch information
burqen committed Nov 17, 2021
1 parent 01647e5 commit d1caf51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private void exportSchema(PrintWriter out) {
}

private List<String> exportIndexes() {
return db.executeTransactionally("CALL db.indexes()", Collections.emptyMap(), result -> result.stream()
return db.executeTransactionally("SHOW INDEXES", Collections.emptyMap(), result -> result.stream()
.map(map -> {
if ("LOOKUP".equals(map.get("type"))) {
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.neo4j.driver.Record;
import org.neo4j.driver.Session;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import org.neo4j.driver.Record;
import org.neo4j.driver.Session;

import static apoc.util.TestContainerUtil.createEnterpriseDB;
import static apoc.util.TestContainerUtil.testCall;
import static apoc.util.TestContainerUtil.testResult;
Expand Down Expand Up @@ -285,7 +286,7 @@ public void testIndexOnMultipleProperties() {
});

String indexName = session.readTransaction(tx -> {
String name = tx.run("CALL db.indexes() YIELD name RETURN name").single().get("name").asString();
String name = tx.run("SHOW INDEXES YIELD name RETURN name").single().get("name").asString();
tx.commit();
return name;
});
Expand Down
1 change: 0 additions & 1 deletion full/src/test/resources/signatures.csv
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ db.index.fulltext.drop,db.index.fulltext.drop(indexName :: STRING?) :: VOID
db.index.fulltext.listAvailableAnalyzers,"db.index.fulltext.listAvailableAnalyzers() :: (analyzer :: STRING?, description :: STRING?)"
db.index.fulltext.queryNodes,"db.index.fulltext.queryNodes(indexName :: STRING?, queryString :: STRING?) :: (node :: NODE?, score :: FLOAT?)"
db.index.fulltext.queryRelationships,"db.index.fulltext.queryRelationships(indexName :: STRING?, queryString :: STRING?) :: (relationship :: RELATIONSHIP?, score :: FLOAT?)"
db.indexes,"db.indexes() :: (description :: STRING?, indexName :: STRING?, tokenNames :: LIST? OF STRING?, properties :: LIST? OF STRING?, state :: STRING?, type :: STRING?, progress :: FLOAT?, provider :: MAP?, id :: INTEGER?, failureMessage :: STRING?)"
db.labels,db.labels() :: (label :: STRING?)
db.propertyKeys,db.propertyKeys() :: (propertyKey :: STRING?)
db.relationshipTypes,db.relationshipTypes() :: (relationshipType :: STRING?)
Expand Down

0 comments on commit d1caf51

Please sign in to comment.