Skip to content

Commit 0b5136b

Browse files
committed
Inline Ref/Views.md
1 parent b81b5a8 commit 0b5136b

File tree

5 files changed

+163
-225
lines changed

5 files changed

+163
-225
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1919

2020
Graph traversals can still be performed via `graph.traversal`.
2121

22+
- Removed `ViewResponse` type
23+
24+
The type `ViewDescription` represents the same structure.
25+
26+
- Removed `ArangoSearchViewPropertiesResponse` type
27+
28+
The type `ArangoSearchViewProperties & ViewDescription` can be used
29+
to represent the same structure.
30+
2231
### Added
2332

2433
- Added `auth` option to configuration

docs/Drivers/JS/Reference/View.md

Lines changed: 0 additions & 139 deletions
This file was deleted.

src/collection.ts

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,17 @@
66
* } from "arangojs/collection";
77
* ```
88
*
9-
* TODO
9+
* The "collection" module provides collection related types and interfaces
10+
* for TypeScript.
1011
*
1112
* @packageDocumentation
1213
*/
1314
import { ArangoResponseMetadata, Params } from "./connection";
1415
import { ArrayCursor } from "./cursor";
1516
import { Database } from "./database";
16-
import {
17-
Document,
18-
DocumentData,
19-
DocumentMetadata,
20-
DocumentSelector,
21-
Edge,
22-
EdgeData,
23-
_documentHandle,
24-
} from "./documents";
17+
import { Document, DocumentData, DocumentMetadata, DocumentSelector, Edge, EdgeData, _documentHandle } from "./documents";
2518
import { isArangoError } from "./error";
26-
import {
27-
EnsureFulltextIndexOptions,
28-
EnsureGeoIndexOptions,
29-
EnsureHashIndexOptions,
30-
EnsurePersistentIndexOptions,
31-
EnsureSkiplistIndexOptions,
32-
EnsureTtlIndexOptions,
33-
FulltextIndex,
34-
GeoIndex,
35-
HashIndex,
36-
Index,
37-
IndexSelector,
38-
PersistentIndex,
39-
SkiplistIndex,
40-
TtlIndex,
41-
_indexHandle,
42-
} from "./indexes";
19+
import { EnsureFulltextIndexOptions, EnsureGeoIndexOptions, EnsureHashIndexOptions, EnsurePersistentIndexOptions, EnsureSkiplistIndexOptions, EnsureTtlIndexOptions, FulltextIndex, GeoIndex, HashIndex, Index, IndexSelector, PersistentIndex, SkiplistIndex, TtlIndex, _indexHandle } from "./indexes";
4320
import { Blob } from "./lib/blob";
4421
import { COLLECTION_NOT_FOUND, DOCUMENT_NOT_FOUND } from "./util/codes";
4522
import { Patch } from "./util/types";
@@ -1336,7 +1313,7 @@ export interface DocumentCollection<T extends object = any>
13361313
* Otherwise this will result in the collection being created with the
13371314
* default type (i.e. as a document collection).
13381315
*
1339-
* @param options - Options for creating the collection.s
1316+
* @param options - Options for creating the collection.
13401317
*
13411318
* @example
13421319
* ```js

src/database.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import {
5050
ArangoSearchViewPropertiesOptions,
5151
View,
5252
ViewDescription,
53-
ViewResponse,
5453
ViewType,
5554
} from "./view";
5655

@@ -951,7 +950,7 @@ export class Database {
951950
protected _analyzers = new Map<string, Analyzer>();
952951
protected _collections = new Map<string, Collection>();
953952
protected _graphs = new Map<string, Graph>();
954-
protected _views = new Map<string, View>();
953+
protected _views = new Map<string, ArangoSearchView>();
955954

956955
/**
957956
* Creates a new `Database` instance with its own connection pool.
@@ -1826,7 +1825,7 @@ export class Database {
18261825
viewName: string,
18271826
options?: ArangoSearchViewPropertiesOptions
18281827
): Promise<ArangoSearchView> {
1829-
const view = this.view(viewName) as View;
1828+
const view = this.view(viewName);
18301829
await view.create({ ...options, type: ViewType.ARANGOSEARCH_VIEW });
18311830
return view;
18321831
}
@@ -1846,7 +1845,7 @@ export class Database {
18461845
async renameView(
18471846
viewName: string,
18481847
newName: string
1849-
): Promise<ArangoResponseMetadata & ViewResponse> {
1848+
): Promise<ArangoResponseMetadata & ViewDescription> {
18501849
const result = await this.request(
18511850
{
18521851
method: "PUT",

0 commit comments

Comments
 (0)