Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Update query builder how-to guide #728

Merged
merged 7 commits into from
Feb 17, 2023
Merged
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
2 changes: 1 addition & 1 deletion gqlalchemy/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ guide](/how-to-guides/ogm.md) you can learn how to map Python classes to graph o
### 3. Learn how to use the query builder

There is no need to learn the Cypher query language when you can use the [query
builder](/how-to-guides/query-builder/create-nodes-relationships.md) in GQLAlchemy to perform
builder](/how-to-guides/query-builder.md) in GQLAlchemy to perform
the same tasks.
14 changes: 10 additions & 4 deletions gqlalchemy/how-to-guides/ogm.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ Through this guide, you will learn how to use GQLAlchemy object graph mapper to:
- [**Create indexes**](#create-indexes)
- [**Create constraints**](#create-constraints)

>Hopefully, this guide will teach you how to properly use GQLAlchemy object graph mapper. If you
>have any more questions, join our community and ping us on [Discord](https://discord.gg/memgraph).

:::info
To test the above features, you need a running Memgraph instance. If you're not sure how to run Memgraph, check out the Memgraph [Quick start](/memgraph/#quick-start).
To test the above features, you must [install GQLAlchemy](/gqlalchemy/installation) and have a running Memgraph instance. If you're unsure how to run Memgraph, check out the Memgraph [Quick start](/memgraph/#quick-start).
:::

## Map nodes and relationships
Expand Down Expand Up @@ -338,7 +341,7 @@ The indexes will be set on class definition, before instantiation. This ensures
print(db.get_indexes())
```

To learn more about indexes, head over to the [indexing reference guide](/docs/memgraph/reference-guide/indexing).
To learn more about indexes, head over to the [indexing reference guide](/memgraph/reference-guide/indexing).

## Create constraints

Expand All @@ -355,7 +358,7 @@ The above is the same as running the Cypher query:
CREATE CONSTRAINT ON (n:Language) ASSERT n.name IS UNIQUE;
```

Read more about it at [uniqueness constraint how-to guide](/docs/memgraph/how-to-guides/constraints/uniqueness-constraint).
Read more about it at [uniqueness constraint how-to guide](/memgraph/how-to-guides/constraints/uniqueness-constraint).

Existence constraint enforces that each vertex that has a specific label also must have the specified property. Here is how you can **enforce existence constraint** with GQLAlchemy's OGM:

Expand All @@ -372,7 +375,7 @@ The above is the same as running the Cypher query:
CREATE CONSTRAINT ON (n:Streamer) ASSERT EXISTS (n.username);
```

Read more about it at [existence constraint how-to guide](/docs/memgraph/how-to-guides/constraints/existence-constraint).
Read more about it at [existence constraint how-to guide](/memgraph/how-to-guides/constraints/existence-constraint).

To check which constraints have been created, run:

Expand Down Expand Up @@ -449,3 +452,6 @@ except:
print(db.get_indexes())
print(db.get_constraints())
```

>Hopefully, this guide has taught you how to properly use GQLAlchemy object graph mapper. If you
>have any more questions, join our community and ping us on [Discord](https://discord.gg/memgraph).
12 changes: 1 addition & 11 deletions gqlalchemy/how-to-guides/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,7 @@ To learn more about how to use OGM, take at [**OGM how-to guide**](/how-to-guide

When working with GQLAlchemy, you can connect to the database and execute Cypher
queries using the query builder. To learn more about how to create a query using
query builder, check out the following how-to guide:

- [**Create nodes and
relationships**](/how-to-guides/query-builder/create-nodes-relationships.md)
- [**Return results**](/how-to-guides/query-builder/return-results.md)
- [**Filter data**](/how-to-guides/query-builder/filter-data.md)
- [**Call query module
procedures**](/how-to-guides/query-builder/call-procedures.md)
- [**Delete and remove
objects**](/how-to-guides/query-builder/delete-remove-objects.md)
- [**Set or update objects**](/how-to-guides/query-builder/set-or-update-objects.md)
query builder, check out the [**query builder how-to guide**](/how-to-guides/query-builder.md).

## Stream & trigger support

Expand Down
Loading