-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update reference guide * Update CODEOWNERS
- Loading branch information
1 parent
367f2ca
commit 07f2981
Showing
24 changed files
with
1,610 additions
and
87 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 +1 @@ | ||
* @Josipmrden @katarinasupe @brunos252 @as51340 | ||
* @Josipmrden @katarinasupe @brunos252 @as51340 @antepusic |
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,106 @@ | ||
--- | ||
sidebar_label: connection | ||
title: gqlalchemy.connection | ||
--- | ||
|
||
## Connection Objects | ||
|
||
```python | ||
class Connection(ABC) | ||
``` | ||
|
||
#### execute | ||
|
||
```python | ||
@abstractmethod | ||
def execute(query: str, parameters: Dict[str, Any] = {}) -> None | ||
``` | ||
|
||
Executes Cypher query without returning any results. | ||
|
||
#### execute\_and\_fetch | ||
|
||
```python | ||
@abstractmethod | ||
def execute_and_fetch( | ||
query: str, | ||
parameters: Dict[str, Any] = {}) -> Iterator[Dict[str, Any]] | ||
``` | ||
|
||
Executes Cypher query and returns iterator of results. | ||
|
||
#### is\_active | ||
|
||
```python | ||
@abstractmethod | ||
def is_active() -> bool | ||
``` | ||
|
||
Returns True if connection is active and can be used. | ||
|
||
## MemgraphConnection Objects | ||
|
||
```python | ||
class MemgraphConnection(Connection) | ||
``` | ||
|
||
#### execute | ||
|
||
```python | ||
@database_error_handler | ||
def execute(query: str, parameters: Dict[str, Any] = {}) -> None | ||
``` | ||
|
||
Executes Cypher query without returning any results. | ||
|
||
#### execute\_and\_fetch | ||
|
||
```python | ||
@database_error_handler | ||
def execute_and_fetch( | ||
query: str, | ||
parameters: Dict[str, Any] = {}) -> Iterator[Dict[str, Any]] | ||
``` | ||
|
||
Executes Cypher query and returns iterator of results. | ||
|
||
#### is\_active | ||
|
||
```python | ||
def is_active() -> bool | ||
``` | ||
|
||
Returns True if connection is active and can be used. | ||
|
||
## Neo4jConnection Objects | ||
|
||
```python | ||
class Neo4jConnection(Connection) | ||
``` | ||
|
||
#### execute | ||
|
||
```python | ||
def execute(query: str, parameters: Dict[str, Any] = {}) -> None | ||
``` | ||
|
||
Executes Cypher query without returning any results. | ||
|
||
#### execute\_and\_fetch | ||
|
||
```python | ||
def execute_and_fetch( | ||
query: str, | ||
parameters: Dict[str, Any] = {}) -> Iterator[Dict[str, Any]] | ||
``` | ||
|
||
Executes Cypher query and returns iterator of results. | ||
|
||
#### is\_active | ||
|
||
```python | ||
def is_active() -> bool | ||
``` | ||
|
||
Returns True if connection is active and can be used. | ||
|
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,29 @@ | ||
--- | ||
sidebar_label: exceptions | ||
title: gqlalchemy.exceptions | ||
--- | ||
|
||
#### connection\_handler | ||
|
||
```python | ||
def connection_handler(func, | ||
delay: float = 0.01, | ||
timeout: float = 5.0, | ||
backoff: int = 2) | ||
``` | ||
|
||
Wrapper for a wait on the connection. | ||
|
||
**Arguments**: | ||
|
||
- `func` - A function that tries to create the connection | ||
- `delay` - A float that defines how long to wait between retries. | ||
- `timeout` - A float that defines how long to wait for the port. | ||
- `backoff` - An integer used for multiplying the delay. | ||
|
||
|
||
**Raises**: | ||
|
||
- `GQLAlchemyWaitForConnectionError` - Raises an error | ||
after the timeout period has passed. | ||
|
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
Oops, something went wrong.