Skip to content
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ $client->transactions()->begin(['write' => ['users', 'teams']]);
2) [User schema](docs/schema-users.md)
3) [Collection schema](docs/schema-collections.md)
4) [Index schema](docs/schema-indexes.md)
5) [View schema](docs/schema-views.md)
6) [Graph schema](docs/schema-graphs.md)
5) [Graph schema](docs/schema-graphs.md)
6) [View schema](docs/schema-views.md)
7) [Analyzer schema](docs/schema-analyzers.md)
5) [Transaction manager](docs/transaction-manager.md)

## Related packages
Expand Down
43 changes: 43 additions & 0 deletions docs/schema-analyzers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Schema manager - Analyzers
You can use the schema manager to perform CRUD actions on ArangoDB analyzers.

## Analyzer functions
The schema manager supports the following analyzer functions:

### createAnalyzer(array $analyzer): stdClass
```
$arangoClient->schema()->createAnalyzer([
'name' => 'myAnalyzer',
'type' => 'identity',
]);
```

### getAnalyzer(string $name): stdClass
```
$arangoClient->schema()->getAnalyzer('myAnalyzer');
```

### getAnalyzers(): array
```
$arangoClient->schema()->getAnalyzers();
```

### hasAnalyzer(string $name): bool
```
$arangoClient->schema()->hasAnalyzer('myAnalyzer');
```

### replaceAnalyzer(string $name, array $newAnalyzer): stdClass|false
This will delete the old analyzer and create a new one under the same name.
```
$arangoClient->schema()->replaceAnalyzer('myAnalyzer', [
'name' => 'myAnalyzer',
'type' => 'identity',
]);
```

### deleteAnalyzer(string $name): bool
```
$arangoClient->schema()->deleteAnalyzer('myAnalyzer');
```

2 changes: 1 addition & 1 deletion docs/schema-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
You can use the schema manager to perform CRUD actions on ArangoSearch views.

## View functions
The schema manager supports the following index functions:
The schema manager supports the following view functions:

### createView(array $view): stdClass
```
Expand Down
2 changes: 1 addition & 1 deletion src/Statement/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Statement extends Manager implements IteratorAggregate
/**
* Statement constructor.
*
* @param ?array<mixed> $bindVars
* @param array<mixed>|null $bindVars
* @param array<mixed> $options
*/
public function __construct(protected ArangoClient $arangoClient, protected string $query, protected ?array $bindVars, protected array $options = []) {}
Expand Down