Skip to content

Commit

Permalink
Revert "[develop < T0048-GA] Update and extend code documentation (#116
Browse files Browse the repository at this point in the history
…)"

This reverts commit 58750b7.
  • Loading branch information
g-despot authored Apr 12, 2022
1 parent 58750b7 commit 3a38adb
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 704 deletions.
77 changes: 77 additions & 0 deletions docs/reference/gqlalchemy/connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
sidebar_label: connection
title: gqlalchemy.connection
---

## Connection Objects

```python
class Connection(ABC)
```

#### execute

```python
@abstractmethod
def execute(query: str) -> None
```

Executes Cypher query without returning any results.

#### execute\_and\_fetch

```python
@abstractmethod
def execute_and_fetch(query: str) -> 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

#### create

```python
@staticmethod
def create(**kwargs) -> "Connection"
```

Creates an instance of a connection.

## MemgraphConnection Objects

```python
class MemgraphConnection(Connection)
```

#### execute

```python
def execute(query: str) -> None
```

Executes Cypher query without returning any results.

#### execute\_and\_fetch

```python
def execute_and_fetch(query: str) -> 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

53 changes: 0 additions & 53 deletions docs/reference/gqlalchemy/disk_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ title: gqlalchemy.disk_storage
class OnDiskPropertyDatabase(ABC)
```

An abstract class for implementing on-disk storage features with specific databases.

#### save\_node\_property

```python
Expand Down Expand Up @@ -81,15 +79,6 @@ def execute_query(query: str) -> List[str]

Executes an SQL query on the on disk property database.

**Arguments**:

- `query` - A string representing an SQL query.


**Returns**:

A list of strings representing the results of the query.

#### drop\_database

```python
Expand All @@ -106,12 +95,6 @@ def save_node_property(node_id: int, property_name: str, property_value: str) ->

Saves a node property to an on disk database.

**Arguments**:

- `node_id` - An integer representing the internal id of the node.
- `property_name` - A string representing the name of the property.
- `property_value` - A string representing the value of the property.

#### load\_node\_property

```python
Expand All @@ -120,16 +103,6 @@ def load_node_property(node_id: int, property_name: str) -> Optional[str]

Loads a node property from an on disk database.

**Arguments**:

- `node_id` - An integer representing the internal id of the node.
- `property_name` - A string representing the name of the property.


**Returns**:

An optional string representing the property value.

#### delete\_node\_property

```python
Expand All @@ -138,11 +111,6 @@ def delete_node_property(node_id: int, property_name: str) -> None

Deletes a node property from an on disk database.

**Arguments**:

- `node_id` - An integer representing the internal id of the node.
- `property_name` - A string representing the name of the property.

#### save\_relationship\_property

```python
Expand All @@ -151,12 +119,6 @@ def save_relationship_property(relationship_id: int, property_name: str, propert

Saves a relationship property to an on disk database.

**Arguments**:

- `relationship_id` - An integer representing the internal id of the relationship.
- `property_name` - A string representing the name of the property.
- `property_value` - A string representing the value of the property.

#### load\_relationship\_property

```python
Expand All @@ -165,16 +127,6 @@ def load_relationship_property(relationship_id: int, property_name: str) -> Opti

Loads a relationship property from an on disk database.

**Arguments**:

- `relationship_id` - An integer representing the internal id of the relationship.
- `property_name` - A string representing the name of the property.


**Returns**:

An optional string representing the property value.

#### delete\_relationship\_property

```python
Expand All @@ -183,8 +135,3 @@ def delete_relationship_property(relationship_id: int, property_name: str) -> No

Deletes a node property from an on disk database.

**Arguments**:

- `relationship_id` - An integer representing the internal id of the relationship.
- `property_name` - A string representing the name of the property.

16 changes: 0 additions & 16 deletions docs/reference/gqlalchemy/memgraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,6 @@ fields from Memgraph and updates it&#x27;s fields.
Otherwise it creates a new node with the same properties.
Null properties are ignored.

#### save\_nodes

```python
def save_nodes(nodes: List[Node]) -> None
```

Saves a list of nodes to Memgraph.

#### save\_node\_with\_id

```python
Expand Down Expand Up @@ -311,14 +303,6 @@ If relationship._id is None, it creates a new relationship.
If you want to set a relationship._id instead of creating a new
relationship, use `load_relationship` first.

#### save\_relationships

```python
def save_relationships(relationships: List[Relationship]) -> None
```

Saves a list of relationships to Memgraph.

#### save\_relationship\_with\_id

```python
Expand Down
63 changes: 5 additions & 58 deletions docs/reference/gqlalchemy/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,88 +3,35 @@ sidebar_label: models
title: gqlalchemy.models
---

## TriggerEventType Objects

```python
class TriggerEventType()
```

An enum representing types of trigger events.

## TriggerEventObject Objects

```python
class TriggerEventObject()
```

An enum representing types of trigger objects.

NODE -&gt; `()`
RELATIONSHIP -&gt; `--&gt;`

## TriggerExecutionPhase Objects

```python
class TriggerExecutionPhase()
```

An enum representing types of trigger objects.

Enum:
BEFORE
AFTER

## MemgraphKafkaStream Objects

```python
@dataclass(frozen=True, eq=True)
class MemgraphKafkaStream(MemgraphStream)
```

A class for creating and managing Kafka streams in Memgraph.

**Arguments**:

- `name` - A string representing the stream name.
- `topics` - A list of strings representing the stream topics.
- `transform` - A string representing the name of the transformation procedure.
- `consumer_group` - A string representing the consumer group.
- `name` - A string representing the batch interval.
- `name` - A string representing the batch size.
- `name` - A string or list of strings representing bootstrap server addresses.

#### to\_cypher

```python
def to_cypher() -> str
```

Converts Kafka stream to a Cypher clause.
Converts Kafka stream to a cypher clause.

## MemgraphPulsarStream Objects

```python
@dataclass(frozen=True, eq=True)
class MemgraphPulsarStream(MemgraphStream)
```

A class for creating and managing Pulsar streams in Memgraph.

**Arguments**:

- `name` - A string representing the stream name.
- `topics` - A list of strings representing the stream topics.
- `transform` - A string representing the name of the transformation procedure.
- `consumer_group` - A string representing the consumer group.
- `name` - A string representing the batch interval.
- `name` - A string representing the batch size.
- `name` - A string or list of strings representing bootstrap server addresses.

#### to\_cypher

```python
def to_cypher() -> str
```

Converts Pulsar stream to a Cypher clause.
Converts Pulsar stream to a cypher clause.

## MemgraphTrigger Objects

Expand All @@ -110,7 +57,7 @@ class GraphObject(BaseModel)
#### \_\_init\_subclass\_\_

```python
def __init_subclass__(cls, type=None, label=None, labels=None, index=None, db=None)
def __init_subclass__(cls, type=None, label=None, labels=None)
```

Stores the subclass by type if type is specified, or by class name
Expand Down
Loading

0 comments on commit 3a38adb

Please sign in to comment.