Skip to content

Commit 66dd4ee

Browse files
Release v1.8.0 (#367)
1 parent 49418e0 commit 66dd4ee

File tree

9 files changed

+155
-89
lines changed

9 files changed

+155
-89
lines changed

docs/changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v1.8.0 - June 12, 2025
4+
5+
### Features and improvements
6+
7+
* Added support for label-property composite, edge-type, edge-type property, global edge property and point indices in the object graph mapper. [#351](https://github.com/memgraph/gqlalchemy/pull/351)
8+
* From Memgraph 3.3.0, nested indices are supported. Tests for nested indices were added to show how they work the same as label-property indices. [#357](https://github.com/memgraph/gqlalchemy/pull/357)
9+
* Updated dependencies to support Python 3.9 - 3.12. [#355](https://github.com/memgraph/gqlalchemy/pull/355),[#358](https://github.com/memgraph/gqlalchemy/pull/358),[#347](https://github.com/memgraph/gqlalchemy/pull/347),[#349](https://github.com/memgraph/gqlalchemy/pull/349)
10+
311
## v1.7.0 - March 25, 2025
412

513
### Improvements

docs/reference/gqlalchemy/graph_algorithms/integrated_algorithms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ class BreadthFirstSearch(IntegratedAlgorithm)
5555
Build a BFS call for a Cypher query.
5656

5757
The Breadth-first search can be called in Memgraph with Cypher queries such
58-
as: `MATCH (a {id: 723})-[*BFS ..10 (r, n | r.x > 12 AND n.y < 3)]-() RETURN *;`
58+
as: `MATCH (a {id: 723})-[*BFS ..10 (r, n | r.x > 12 AND n.y < 3)]-() RETURN *;`
5959
It is called inside the relationship clause, `*BFS` naming the algorithm,
60-
`..10` specifying depth bounds, and `(r, n | &lt;expression&gt;)` is a filter
60+
`..10` specifying depth bounds, and `(r, n | <expression>)` is a filter
6161
lambda.
6262

6363
#### \_\_init\_\_

docs/reference/gqlalchemy/models.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TriggerEventObject()
2020
An enum representing types of trigger objects.
2121

2222
NODE -&gt; `()`
23-
RELATIONSHIP -&gt; `--&gt;`
23+
RELATIONSHIP -&gt; `-->`
2424

2525
## TriggerExecutionPhase Objects
2626

@@ -34,6 +34,20 @@ Enum:
3434
BEFORE
3535
AFTER
3636

37+
## IndexType Objects
38+
39+
```python
40+
class IndexType()
41+
```
42+
43+
An enum representing different types of indexes.
44+
45+
Enum:
46+
LABEL_INDEX_TYPE
47+
EDGE_INDEX_TYPE
48+
EDGE_GLOBAL_INDEX_TYPE
49+
POINT_INDEX_TYPE
50+
3751
## MemgraphKafkaStream Objects
3852

3953
```python

docs/reference/gqlalchemy/query_builders/declarative_base.md

Lines changed: 83 additions & 71 deletions
Large diffs are not rendered by default.

docs/reference/gqlalchemy/query_builders/memgraph_query_builder.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ Load data from a CSV file by executing a Cypher query for each row.
3434

3535
Load CSV with header:
3636

37-
- `Python` - `load_csv(path=&quot;path/to/my/file.csv&quot;, header=True, row=&quot;row&quot;).return_().execute()`
38-
- `Cypher` - `LOAD CSV FROM &#x27;path/to/my/file.csv&#x27; WITH HEADER AS row RETURN *;`
37+
- `Python` - `load_csv(path="path/to/my/file.csv", header=True, row="row").return_().execute()`
38+
- `Cypher` - `LOAD CSV FROM "path/to/my/file.csv" WITH HEADER AS row RETURN *;`
3939

4040
Load CSV without header:
4141

42-
- `Python` - `load_csv(path=&#x27;path/to/my/file.csv&#x27;, header=False, row=&#x27;row&#x27;).return_().execute()`
43-
- `Cypher` - `LOAD CSV FROM &#x27;path/to/my/file.csv&#x27; NO HEADER AS row RETURN *;`
42+
- `Python` - `load_csv(path="path/to/my/file.csv", header=False, row="row").return_().execute()`
43+
- `Cypher` - `LOAD CSV FROM "path/to/my/file.csv" NO HEADER AS row RETURN *;`
4444

4545
#### call
4646

@@ -55,7 +55,7 @@ def call(procedure: str,
5555
subgraph_path: str = None) -> "DeclarativeBase"
5656
```
5757

58-
Override of base class method to support Memgraph&#x27;s subgraph functionality.
58+
Override of base class method to support Memgraph subgraph functionality.
5959

6060
Method can be called with node labels and relationship types, both being optional, which are used to construct
6161
a subgraph, or if neither is provided, a subgraph query is used, which can be passed as a string representing a
@@ -82,15 +82,13 @@ Cypher query defining the MATCH clause which selects the nodes and relationships
8282

8383
**Examples**:
8484

85-
- `Python` - `call(&#x27;export_util.json&#x27;, &#x27;/home/user&#x27;, &quot;LABEL&quot;, [&quot;TYPE1&quot;, &quot;TYPE2&quot;]).execute()
86-
- `Cypher` - `MATCH p=(a)-[:TYPE1 | :TYPE2]-&gt;(b) WHERE (a:LABEL) AND (b:LABEL)
87-
WITH project(p) AS graph CALL export_util.json(graph, &#x27;/home/user&#x27;)`
85+
- `Python` - `call('export_util.json', '/home/user', "LABEL", ["TYPE1", "TYPE2"]).execute()`
86+
- `Cypher` - `MATCH p=(a)-[:TYPE1 | :TYPE2]->(b) WHERE (a:LABEL) AND (b:LABEL) WITH project(p) AS graph CALL export_util.json(graph, "/home/user")`
8887

8988
or
9089

91-
- `Python` - `call(&#x27;export_util.json&#x27;, &#x27;/home/user&#x27;, subgraph_path=&quot;(:LABEL)-[:TYPE]-&gt;(:LABEL)&quot;).execute()
92-
- `Cypher` - `MATCH p=(:LABEL)-[:TYPE1]-&gt;(:LABEL) WITH project(p) AS graph
93-
CALL export_util.json(graph, &#x27;/home/user&#x27;)`
90+
- `Python` - `call("export_util.json", "/home/user", subgraph_path="(:LABEL)-[:TYPE]->(:LABEL)").execute()`
91+
- `Cypher` - `MATCH p=(:LABEL)-[:TYPE1]->(:LABEL) WITH project(p) AS graph CALL export_util.json(graph, "/home/user")`
9492

9593
## ProjectPartialQuery Objects
9694

@@ -106,6 +104,6 @@ def construct_query() -> str
106104

107105
Constructs a Project partial query.
108106

109-
Given path part of a query (e.g. (:LABEL)-[:TYPE]-&gt;(:LABEL2)),
107+
Given path part of a query (e.g. (:LABEL)-[:TYPE]->(:LABEL2)),
110108
adds MATCH, a path identifier and appends the WITH clause.
111109

docs/reference/gqlalchemy/vendors/database_client.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,20 @@ Executes Cypher query without returning any results.
3333
#### create\_index
3434

3535
```python
36+
@abstractmethod
3637
def create_index(index: Index) -> None
3738
```
3839

39-
Creates an index (label or label-property type) in the database.
40+
Creates an index in the database.
4041

4142
#### drop\_index
4243

4344
```python
45+
@abstractmethod
4446
def drop_index(index: Index) -> None
4547
```
4648

47-
Drops an index (label or label-property type) in the database.
49+
Drops an index in the database.
4850

4951
#### get\_indexes
5052

docs/reference/gqlalchemy/vendors/memgraph.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ Create a MemgraphTerminatedTransaction object from transaction data.
4242
class Memgraph(DatabaseClient)
4343
```
4444

45+
#### create\_index
46+
47+
```python
48+
def create_index(index: Index) -> None
49+
```
50+
51+
Creates an index (label or label-property type) in the database.
52+
53+
#### drop\_index
54+
55+
```python
56+
def drop_index(index: Index) -> None
57+
```
58+
59+
Drops an index (label or label-property type) in the database.
60+
4561
#### get\_indexes
4662

4763
```python

docs/reference/gqlalchemy/vendors/neo4j.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ title: gqlalchemy.vendors.neo4j
99
class Neo4j(DatabaseClient)
1010
```
1111

12+
#### create\_index
13+
14+
```python
15+
def create_index(index: Index) -> None
16+
```
17+
18+
Creates an index (label or label-property type) in the database.
19+
20+
#### drop\_index
21+
22+
```python
23+
def drop_index(index: Index) -> None
24+
```
25+
26+
Drops an index (label or label-property type) in the database.
27+
1228
#### get\_indexes
1329

1430
```python

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "GQLAlchemy"
3-
version = "1.7.0"
3+
version = "1.8.0"
44

55
description = "GQLAlchemy is a library developed to assist with writing and running queries in Memgraph."
66
repository = "https://github.com/memgraph/gqlalchemy"

0 commit comments

Comments
 (0)