Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/advanced-algorithms/available-algorithms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,4 @@ This table shows the mapping between APOC functions/procedures and their Memgrap
| apoc.text.regReplace | Replaces substrings matching regex with replacement | [text.regReplace()](/advanced-algorithms/available-algorithms/text#regreplace) |
| apoc.util.md5 | Gets MD5 hash of concatenated string representations | [util_module.md5()](/advanced-algorithms/available-algorithms/util_module#md5) |
| apoc.util.validatePredicate | Raises exception if predicate yields true with parameter interpolation | [mgps.validate_predicate()](/advanced-algorithms/available-algorithms/mgps#validate_predicate) |
| db.awaitIndexes | No-op compatibility shim for clients that wait for index creation (e.g. the Neo4j Spark connector) | [mgps.await_indexes()](/advanced-algorithms/available-algorithms/mgps#await_indexes) |
23 changes: 23 additions & 0 deletions pages/advanced-algorithms/available-algorithms/mgps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,26 @@ MATCH (n:User)
WHERE mgps.validate_predicate(n.age < 0, "Invalid age: %i", [n.age])
RETURN n;
```

### `await_indexes()`

A no-op compatibility shim for Neo4j's `db.awaitIndexes`. Some clients
(notably the Neo4j Spark / PySpark connector) call `db.awaitIndexes`
during initialization to block until pending indexes are online. Memgraph
builds indexes synchronously, so there is nothing to wait for — this
procedure exists purely so those clients can connect without changes.

<Callout type="info">
This procedure is equivalent to **db.awaitIndexes**.
</Callout>

{<h4 className="custom-header"> Input: </h4>}

- `seconds: integer` ➡ Accepted for parity with the Neo4j signature.
The value is ignored.

{<h4 className="custom-header"> Usage: </h4>}

```cypher
CALL mgps.await_indexes(300);
```