-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
166 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## **`query.py`** | ||
|
||
The module within the orm sub-package provides functionalities and structures for ORM-based querying in | ||
relation to ArangoDB. | ||
It integrates with various parts of the ORM and aids in constructing and executing queries. | ||
|
||
#### Key Features | ||
|
||
- Automatic binding | ||
- `AQL` injection protection | ||
- query building | ||
|
||
## **`ORMQuery`** | ||
|
||
The `ORMQuery` class is a subclass of `AQLQuery`. | ||
It provides a Pythonic API for constructing queries for ArangoDB. | ||
|
||
## builder helpers | ||
|
||
### `for_()` | ||
|
||
the `for_()` method is used to specify the target vertex/edge collection of the query. | ||
|
||
```python | ||
from pydango.orm import for_ | ||
|
||
|
||
for_(User).filter(User.name == "John Doe").return_(User) | ||
``` | ||
|
||
### `traverse()` | ||
|
||
```python | ||
from pydango.orm import traverse | ||
from pydango.query.expressions import IteratorExpression | ||
from pydango.query import TraversalDirection | ||
|
||
edge = IteratorExpression() | ||
traverse( | ||
(User, edge), | ||
edges={"friends"}, | ||
start="people/1", | ||
depth=(0, 1), | ||
direction=TraversalDirection.OUTBOUND, | ||
).filter(User.name == "John Doe").return_(User) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Expressions | ||
# **Expressions** | ||
|
||
## **Basic Expressions** | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Functions | ||
# **Functions** | ||
|
||
## **Abstract Functions** | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## AQLQuery Usage | ||
## **AQLQuery** | ||
|
||
### 1. Simple Query to Fetch Data | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.