arangojs 10.1.2 → 10.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/cjs/collections.d.ts +2 -1
- package/cjs/collections.d.ts.map +1 -1
- package/cjs/collections.js.map +1 -1
- package/cjs/connection.d.ts +1 -0
- package/cjs/connection.d.ts.map +1 -1
- package/cjs/connection.js +74 -18
- package/cjs/connection.js.map +1 -1
- package/cjs/databases.d.ts +91 -0
- package/cjs/databases.d.ts.map +1 -1
- package/cjs/databases.js +140 -0
- package/cjs/databases.js.map +1 -1
- package/cjs/indexes.d.ts +24 -3
- package/cjs/indexes.d.ts.map +1 -1
- package/cjs/indexes.js.map +1 -1
- package/cjs/users.d.ts +91 -0
- package/cjs/users.d.ts.map +1 -1
- package/cjs/users.js.map +1 -1
- package/cjs/views.d.ts +69 -0
- package/cjs/views.d.ts.map +1 -1
- package/cjs/views.js.map +1 -1
- package/collections.d.ts +2 -1
- package/collections.d.ts.map +1 -1
- package/connection.d.ts +1 -0
- package/connection.d.ts.map +1 -1
- package/databases.d.ts +91 -0
- package/databases.d.ts.map +1 -1
- package/esm/collections.d.ts +2 -1
- package/esm/collections.d.ts.map +1 -1
- package/esm/collections.js.map +1 -1
- package/esm/connection.d.ts +1 -0
- package/esm/connection.d.ts.map +1 -1
- package/esm/connection.js +74 -18
- package/esm/connection.js.map +1 -1
- package/esm/databases.d.ts +91 -0
- package/esm/databases.d.ts.map +1 -1
- package/esm/databases.js +140 -0
- package/esm/databases.js.map +1 -1
- package/esm/indexes.d.ts +24 -3
- package/esm/indexes.d.ts.map +1 -1
- package/esm/indexes.js.map +1 -1
- package/esm/users.d.ts +91 -0
- package/esm/users.d.ts.map +1 -1
- package/esm/users.js.map +1 -1
- package/esm/views.d.ts +69 -0
- package/esm/views.d.ts.map +1 -1
- package/esm/views.js.map +1 -1
- package/indexes.d.ts +24 -3
- package/indexes.d.ts.map +1 -1
- package/package.json +1 -1
- package/users.d.ts +91 -0
- package/users.d.ts.map +1 -1
- package/views.d.ts +69 -0
- package/views.d.ts.map +1 -1
package/esm/views.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"views.js","sourceRoot":"","sources":["../../src/views.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA8dhD,YAAY;AAEZ,oBAAoB;AACpB;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAS;IACpC,OAAO,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;AAC5C,CAAC;AAED,uEAAuE;AACvE,4EAA4E;AAC5E,6EAA6E;AAC7E,oEAAoE;AACpE,gBAAgB;AAEhB;;GAEG;AACH,MAAM,OAAO,IAAI;IACL,KAAK,CAAS;IACd,GAAG,CAAqB;IAElC;;OAEG;IACH,YAAY,EAAsB,EAAE,IAAY;QAC9C,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,QAAQ,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACzD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,MAAM;QACV,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YAC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uB;QAQvB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa;YACnE,IAAI,EAAE,UAAU,IAAI,EAAE;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CACrB;YACE,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACzD,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAC/B,CAAC;IACJ,CAAC;CACF;AACD,YAAY","sourcesContent":["/**\r\n * ```ts\r\n * import type { ArangoSearchView } from \"arangojs/views\";\r\n * ```\r\n *\r\n * The \"views\" module provides View related types and interfaces for\r\n * TypeScript.\r\n *\r\n * @packageDocumentation\r\n */\r\nimport * as connections from \"./connection.js\";\r\nimport * as databases from \"./databases.js\";\r\nimport * as errors from \"./errors.js\";\r\nimport { VIEW_NOT_FOUND } from \"./lib/codes.js\";\r\n\r\n//#region Shared types\r\n/**\r\n * Sorting direction. Descending or ascending.\r\n */\r\nexport type Direction = \"desc\" | \"asc\";\r\n\r\n/**\r\n * Compression for storing data.\r\n */\r\nexport type Compression = \"lz4\" | \"none\";\r\n\r\n/**\r\n * Policy to consolidate based on segment byte size and live document count as\r\n * dictated by the customization attributes.\r\n *\r\n * @deprecated The `bytes_accum` consolidation policy was deprecated in\r\n * ArangoDB 3.7 and should be replaced with the `tier` consolidation policy.\r\n */\r\nexport type BytesAccumConsolidationPolicy = {\r\n /**\r\n * Type of consolidation policy.\r\n */\r\n type: \"bytes_accum\";\r\n /**\r\n * Must be in the range of `0.0` to `1.0`.\r\n */\r\n threshold?: number;\r\n};\r\n\r\n/**\r\n * Policy to consolidate if the sum of all candidate segment byte size is less\r\n * than the total segment byte size multiplied by a given threshold.\r\n */\r\nexport type TierConsolidationPolicy = {\r\n /**\r\n * Type of consolidation policy.\r\n */\r\n type: \"tier\";\r\n /**\r\n * Size below which all segments are treated as equivalent.\r\n *\r\n * Default: `2097152` (2 MiB)\r\n */\r\n segmentsBytesFloor?: number;\r\n /**\r\n * Maximum allowed size of all consolidation segments.\r\n *\r\n * Default: `5368709120` (5 GiB)\r\n */\r\n segmentsBytesMax?: number;\r\n /**\r\n * Maximum number of segments that are evaluated as candidates for\r\n * consolidation.\r\n *\r\n * Default: `10`\r\n */\r\n segmentsMax?: number;\r\n /**\r\n * Minimum number of segments that are evaluated as candidates for\r\n * consolidation.\r\n *\r\n * Default: `1`\r\n */\r\n segmentsMin?: number;\r\n /**\r\n * Consolidation candidates with a score less than this value will be\r\n * filtered out.\r\n *\r\n * Default: `0`\r\n */\r\n minScore?: number;\r\n};\r\n\r\n/**\r\n * Type of a View.\r\n */\r\nexport type ViewType = ViewDescription[\"type\"];\r\n//#endregion\r\n\r\n//#region CreateViewOptions\r\n/**\r\n * Options for creating a View.\r\n */\r\nexport type CreateViewOptions =\r\n | CreateArangoSearchViewOptions\r\n | CreateSearchAliasViewOptions;\r\n\r\n/**\r\n * Shared attributes of all View creation options.\r\n */\r\nexport type CreateViewOptionsType<Type extends ViewType, extra extends {}> = {\r\n /**\r\n * Type of the View.\r\n */\r\n type: Type;\r\n} & extra;\r\n\r\n/**\r\n * Options for creating an ArangoSearch View.\r\n */\r\nexport type CreateArangoSearchViewOptions = CreateViewOptionsType<\r\n \"arangosearch\",\r\n ArangoSearchViewPropertiesOptions & {\r\n /**\r\n * Maximum number of writers cached in the pool.\r\n *\r\n * Default: `64`\r\n */\r\n writebufferIdle?: number;\r\n /**\r\n * Maximum number of concurrent active writers that perform a transaction.\r\n *\r\n * Default: `0`\r\n */\r\n writebufferActive?: number;\r\n /**\r\n * Maximum memory byte size per writer before a writer flush is triggered.\r\n *\r\n * Default: `33554432` (32 MiB)\r\n */\r\n writebufferSizeMax?: number;\r\n /**\r\n * Attribute path (`field`) for the value of each document that will be\r\n * used for sorting.\r\n *\r\n * If `direction` is set to `\"asc\"` or `asc` is set to `true`,\r\n * the primary sorting order will be ascending.\r\n *\r\n * If `direction` is set to `\"desc\"` or `asc` is set to `false`,\r\n * the primary sorting order will be descending.\r\n */\r\n primarySort?: CreateArangoSearchViewPrimarySortOptions[];\r\n /**\r\n * Compression to use for the primary sort data.\r\n *\r\n * Default: `\"lz4\"`\r\n */\r\n primarySortCompression?: Compression;\r\n /**\r\n * (Enterprise Edition only.) If set to `true`, then primary sort columns\r\n * will always be cached in memory.\r\n *\r\n * Default: `false`\r\n */\r\n primarySortCache?: boolean;\r\n /**\r\n * (Enterprise Edition only.) If set to `true`, then primary key columns\r\n * will always be cached in memory.\r\n *\r\n * Default: `false`\r\n */\r\n primaryKeyCache?: boolean;\r\n /**\r\n * Attribute paths for which values should be stored in the view index\r\n * in addition to those used for sorting via `primarySort`.\r\n */\r\n storedValues?:\r\n | CreateArangoSearchViewStoredValueOptions[]\r\n | string[]\r\n | string[][];\r\n /**\r\n * An array of strings defining sort expressions to optimize.\r\n */\r\n optimizeTopK?: string[];\r\n }\r\n>;\r\n\r\n/**\r\n * Options for creating a primary sort in an ArangoSearch View.\r\n */\r\nexport type CreateArangoSearchViewPrimarySortOptions =\r\n | {\r\n /**\r\n * Attribute path for the value of each document to use for\r\n * sorting.\r\n */\r\n field: string;\r\n /**\r\n * If set to `\"asc\"`, the primary sorting order will be ascending.\r\n * If set to `\"desc\"`, the primary sorting order will be descending.\r\n */\r\n direction: Direction;\r\n }\r\n | {\r\n /**\r\n * Attribute path for the value of each document to use for\r\n * sorting.\r\n */\r\n field: string;\r\n /**\r\n * If set to `true`, the primary sorting order will be ascending.\r\n * If set to `false`, the primary sorting order will be descending.\r\n */\r\n asc: boolean;\r\n };\r\n\r\n/**\r\n * Options for creating a stored value in an ArangoSearch View.\r\n */\r\nexport interface CreateArangoSearchViewStoredValueOptions {\r\n /**\r\n * Attribute paths for which values should be stored in the view index\r\n * in addition to those used for sorting via `primarySort`.\r\n */\r\n fields: string[];\r\n /**\r\n * How the attribute values should be compressed.\r\n *\r\n * Default: `\"lz4\"`\r\n */\r\n compression?: Compression;\r\n /**\r\n * (Enterprise Edition only.) If set to `true`, then stored values will\r\n * always be cached in memory.\r\n *\r\n * Default: `false`\r\n */\r\n cache?: boolean;\r\n}\r\n\r\n/**\r\n * Options for creating a SearchAlias View.\r\n */\r\nexport type CreateSearchAliasViewOptions = CreateViewOptionsType<\r\n \"search-alias\",\r\n SearchAliasViewPropertiesOptions\r\n>;\r\n//#endregion\r\n\r\n//#region UpdateViewPropertiesOptions\r\n/**\r\n * Options for partially modifying a View's properties.\r\n */\r\nexport type UpdateViewPropertiesOptions =\r\n | UpdateArangoSearchViewPropertiesOptions\r\n | UpdateSearchAliasViewPropertiesOptions;\r\n\r\n/**\r\n * Options for partially modifying the properties of an ArangoSearch View.\r\n */\r\nexport type UpdateArangoSearchViewPropertiesOptions =\r\n ArangoSearchViewPropertiesOptions;\r\n\r\n/**\r\n * Options for partially modifying the properties of a SearchAlias View.\r\n */\r\nexport type UpdateSearchAliasViewPropertiesOptions = {\r\n /**\r\n * An array of inverted indexes to add to the View.\r\n */\r\n indexes: UpdateSearchAliasViewIndexOptions[];\r\n};\r\n\r\n/**\r\n * Options defining an index to be modified in a SearchAlias View.\r\n */\r\nexport type UpdateSearchAliasViewIndexOptions = SearchAliasViewIndexOptions & {\r\n /**\r\n * Whether to add or remove the index.\r\n *\r\n * Default: `\"add\"`\r\n */\r\n operation?: \"add\" | \"del\";\r\n};\r\n\r\n//#endregion\r\n\r\n//#region ViewPropertiesOptions\r\n/**\r\n * Options for replacing a View's properties.\r\n */\r\nexport type ViewPropertiesOptions =\r\n | ArangoSearchViewPropertiesOptions\r\n | SearchAliasViewPropertiesOptions;\r\n\r\n/**\r\n * Options for modifying the properties of an ArangoSearch View.\r\n */\r\nexport type ArangoSearchViewPropertiesOptions = {\r\n /**\r\n * How many commits to wait between removing unused files.\r\n *\r\n * Default: `2`\r\n */\r\n cleanupIntervalStep?: number;\r\n /**\r\n * How long to wait between applying the `consolidationPolicy`.\r\n *\r\n * Default: `10000`\r\n */\r\n consolidationIntervalMsec?: number;\r\n /**\r\n * How long to wait between commiting View data store changes and making\r\n * documents visible to queries.\r\n *\r\n * Default: `1000`\r\n */\r\n commitIntervalMsec?: number;\r\n /**\r\n * Consolidation policy to apply for selecting which segments should be\r\n * merged.\r\n *\r\n * Default: `{ type: \"tier\" }`\r\n */\r\n consolidationPolicy?: TierConsolidationPolicy;\r\n /**\r\n * An object mapping names of linked collections to\r\n * {@link ArangoSearchViewLinkOptions} definitions.\r\n */\r\n links?: Record<string, Omit<ArangoSearchViewLinkOptions, \"nested\">>;\r\n};\r\n\r\n/**\r\n * A link definition for an ArangoSearch View.\r\n */\r\nexport type ArangoSearchViewLinkOptions = {\r\n /**\r\n * A list of names of Analyzers to apply to values of processed document\r\n * attributes.\r\n *\r\n * Default: `[\"identity\"]`\r\n */\r\n analyzers?: string[];\r\n /**\r\n * An object mapping names of attributes to process for each document to\r\n * {@link ArangoSearchViewLinkOptions} definitions.\r\n */\r\n fields?: Record<string, ArangoSearchViewLinkOptions>;\r\n /**\r\n * If set to `true`, all document attributes will be processed, otherwise\r\n * only the attributes in `fields` will be processed.\r\n *\r\n * Default: `false`\r\n */\r\n includeAllFields?: boolean;\r\n /**\r\n * (Enterprise Edition only.) An object mapping attribute names to\r\n * {@link ArangoSearchViewLinkOptions} definitions to index sub-objects\r\n * stored in an array.\r\n */\r\n nested?: Record<string, ArangoSearchViewLinkOptions>;\r\n /**\r\n * If set to `true`, the position of values in array values will be tracked,\r\n * otherwise all values in an array will be treated as equal alternatives.\r\n */\r\n trackListPositions?: boolean;\r\n /**\r\n * Controls how the view should keep track of the attribute values.\r\n *\r\n * Default: `\"none\"`\r\n */\r\n storeValues?: \"none\" | \"id\";\r\n /**\r\n * If set to `true`, then no exclusive lock is used on the source collection\r\n * during View index creation, so that it remains basically available.\r\n *\r\n * Default: `false`\r\n */\r\n inBackground?: boolean;\r\n /**\r\n * (Enterprise Edition only.) If set to `true`, then field normalization\r\n * values will always be cached in memory.\r\n *\r\n * Default: `false`\r\n */\r\n cache?: boolean;\r\n};\r\n\r\n/**\r\n * Options for modifying the properties of a SearchAlias View.\r\n */\r\nexport type SearchAliasViewPropertiesOptions = {\r\n /**\r\n * An array of inverted indexes to add to the View.\r\n */\r\n indexes: SearchAliasViewIndexOptions[];\r\n};\r\n\r\n/**\r\n * Options defining an index used in a SearchAlias View.\r\n */\r\nexport type SearchAliasViewIndexOptions = {\r\n /**\r\n * Name of a collection.\r\n */\r\n collection: string;\r\n /**\r\n * Name of an inverted index in the collection.\r\n */\r\n index: string;\r\n};\r\n//#endregion\r\n\r\n//#region ViewDescription\r\nexport type ViewDescription =\r\n | ArangoSearchViewDescription\r\n | SearchAliasViewDescription;\r\n\r\n/**\r\n * Generic description of a View.\r\n */\r\nexport type ViewDescriptionType<Type extends string> = {\r\n /**\r\n * Type of the View.\r\n */\r\n type: Type;\r\n /**\r\n * A globally unique identifier for this View.\r\n */\r\n globallyUniqueId: string;\r\n /**\r\n * An identifier for this View.\r\n */\r\n id: string;\r\n /**\r\n * Name of the View.\r\n */\r\n name: string;\r\n};\r\n\r\nexport type ArangoSearchViewDescription = ViewDescriptionType<\"arangosearch\">;\r\n\r\nexport type SearchAliasViewDescription = ViewDescriptionType<\"search-alias\">;\r\n//#endregion\r\n\r\n//#region ViewProperties\r\nexport type ViewProperties =\r\n | ArangoSearchViewProperties\r\n | SearchAliasViewProperties;\r\n\r\n/**\r\n * Properties of an ArangoSearch View.\r\n */\r\nexport type ArangoSearchViewProperties = ArangoSearchViewDescription & {\r\n cleanupIntervalStep: number;\r\n consolidationIntervalMsec: number;\r\n commitIntervalMsec: number;\r\n writebufferIdle: number;\r\n writebufferActive: number;\r\n writebufferSizeMax: number;\r\n consolidationPolicy: TierConsolidationPolicy | BytesAccumConsolidationPolicy;\r\n primarySort: {\r\n field: string;\r\n direction: Direction;\r\n }[];\r\n primarySortCompression: Compression;\r\n primarySortCache: boolean;\r\n primaryKeyCache: boolean;\r\n storedValues: {\r\n fields: string[];\r\n compression: Compression;\r\n cache: boolean;\r\n }[];\r\n links: Record<string, Omit<ArangoSearchViewLink, \"nested\">>;\r\n optimizeTopK: string[];\r\n};\r\n\r\n/**\r\n * A link definition for an ArangoSearch View.\r\n */\r\nexport type ArangoSearchViewLink = {\r\n analyzers: string[];\r\n fields: Record<string, ArangoSearchViewLink>;\r\n includeAllFields: boolean;\r\n nested?: Record<string, ArangoSearchViewLink>;\r\n trackListPositions: boolean;\r\n storeValues: \"none\" | \"id\";\r\n cache: boolean;\r\n};\r\n\r\n/**\r\n * Properties of a SearchAlias View.\r\n */\r\nexport type SearchAliasViewProperties = SearchAliasViewDescription & {\r\n indexes: { collection: string; index: string }[];\r\n};\r\n//#endregion\r\n\r\n//#region View class\r\n/**\r\n * Indicates whether the given value represents a {@link View}.\r\n *\r\n * @param view - A value that might be a View.\r\n */\r\nexport function isArangoView(view: any): view is View {\r\n return Boolean(view && view.isArangoView);\r\n}\r\n\r\n// Note: Resist the urge to attempt to create separate ArangoSearchView\r\n// and SearchAliasView classes or interfaces. The requirements for producing\r\n// a meaningful typedoc documentation, providing a nice API in the `Database`\r\n// class and having these as separate interfaces seem to be mutually\r\n// incompatible.\r\n\r\n/**\r\n * Represents a View in a {@link databases.Database}.\r\n */\r\nexport class View {\r\n protected _name: string;\r\n protected _db: databases.Database;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(db: databases.Database, name: string) {\r\n this._db = db;\r\n this._name = name;\r\n }\r\n\r\n /**\r\n * @internal\r\n *\r\n * Indicates that this object represents an ArangoDB View.\r\n */\r\n get isArangoView(): true {\r\n return true;\r\n }\r\n\r\n /**\r\n * Database this view belongs to.\r\n */\r\n get database() {\r\n return this._db;\r\n }\r\n\r\n /**\r\n * Name of the View.\r\n */\r\n get name() {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * Retrieves general information about the View.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const data = await view.get();\r\n * // data contains general information about the View\r\n * ```\r\n */\r\n get(): Promise<connections.ArangoApiResponse<ViewDescription>> {\r\n return this._db.request({\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}`,\r\n });\r\n }\r\n\r\n /**\r\n * Checks whether the View exists.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const exists = await view.exists();\r\n * console.log(exists); // indicates whether the View exists\r\n * ```\r\n */\r\n async exists(): Promise<boolean> {\r\n try {\r\n await this.get();\r\n return true;\r\n } catch (err: any) {\r\n if (errors.isArangoError(err) && err.errorNum === VIEW_NOT_FOUND) {\r\n return false;\r\n }\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a View with the given `options` and the instance's name.\r\n *\r\n * See also {@link databases.Database#createView}.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"potatoes\");\r\n * await view.create();\r\n * // the ArangoSearch View \"potatoes\" now exists\r\n * ```\r\n */\r\n create<Options extends CreateViewOptions>(\r\n options: CreateViewOptions\r\n ): Promise<\r\n typeof options extends CreateArangoSearchViewOptions\r\n ? ArangoSearchViewDescription\r\n : Options extends CreateSearchAliasViewOptions\r\n ? SearchAliasViewDescription\r\n : ViewDescription\r\n > {\r\n return this._db.request({\r\n method: \"POST\",\r\n pathname: \"/_api/view\",\r\n body: {\r\n ...options,\r\n name: this._name,\r\n },\r\n });\r\n }\r\n\r\n /**\r\n * Renames the View and updates the instance's `name` to `newName`.\r\n *\r\n * Additionally removes the instance from the {@link databases.Database}'s\r\n * internal cache.\r\n *\r\n * **Note**: Renaming Views may not be supported when ArangoDB is\r\n * running in a cluster configuration.\r\n *\r\n * @param newName - The new name of the View.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view1 = db.view(\"some-view\");\r\n * await view1.rename(\"other-view\");\r\n * const view2 = db.view(\"some-view\");\r\n * const view3 = db.view(\"other-view\");\r\n * // Note all three View instances are different objects but\r\n * // view1 and view3 represent the same ArangoDB view!\r\n * ```\r\n */\r\n async rename(\r\n newName: string\r\n ): Promise<connections.ArangoApiResponse<ViewDescription>> {\r\n const result = this._db.renameView(this._name, newName);\r\n this._name = newName;\r\n return result;\r\n }\r\n\r\n /**\r\n * Retrieves the View's properties.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const data = await view.properties();\r\n * // data contains the View's properties\r\n * ```\r\n */\r\n properties(): Promise<connections.ArangoApiResponse<ViewProperties>> {\r\n return this._db.request({\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}/properties`,\r\n });\r\n }\r\n\r\n /**\r\n * Updates the properties of the View.\r\n *\r\n * @param properties - Properties of the View to update.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const result = await view.updateProperties({\r\n * consolidationIntervalMsec: 234\r\n * });\r\n * console.log(result.consolidationIntervalMsec); // 234\r\n * ```\r\n */\r\n updateProperties<Properties extends UpdateViewPropertiesOptions | undefined>(\r\n properties?: Properties\r\n ): Promise<\r\n Properties extends UpdateArangoSearchViewPropertiesOptions\r\n ? ArangoSearchViewProperties\r\n : Properties extends UpdateSearchAliasViewPropertiesOptions\r\n ? SearchAliasViewProperties\r\n : ViewProperties\r\n > {\r\n return this._db.request({\r\n method: \"PATCH\",\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}/properties`,\r\n body: properties ?? {},\r\n });\r\n }\r\n\r\n /**\r\n * Replaces the properties of the View.\r\n *\r\n * @param properties - New properties of the View.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const result = await view.replaceProperties({\r\n * consolidationIntervalMsec: 234\r\n * });\r\n * console.log(result.consolidationIntervalMsec); // 234\r\n * ```\r\n */\r\n replaceProperties<Properties extends ViewPropertiesOptions | undefined>(\r\n properties?: Properties\r\n ): Promise<\r\n Properties extends ArangoSearchViewPropertiesOptions\r\n ? ArangoSearchViewProperties\r\n : Properties extends SearchAliasViewPropertiesOptions\r\n ? SearchAliasViewProperties\r\n : ViewProperties\r\n > {\r\n return this._db.request({\r\n method: \"PUT\",\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}/properties`,\r\n body: properties ?? {},\r\n });\r\n }\r\n\r\n /**\r\n * Deletes the View from the database.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * await view.drop();\r\n * // the View \"some-view\" no longer exists\r\n * ```\r\n */\r\n drop(): Promise<boolean> {\r\n return this._db.request(\r\n {\r\n method: \"DELETE\",\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}`,\r\n },\r\n (res) => res.parsedBody.result\r\n );\r\n }\r\n}\r\n//#endregion\r\n"]}
|
|
1
|
+
{"version":3,"file":"views.js","sourceRoot":"","sources":["../../src/views.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAmiBhD,YAAY;AAEZ,oBAAoB;AACpB;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAS;IACpC,OAAO,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;AAC5C,CAAC;AAED,uEAAuE;AACvE,4EAA4E;AAC5E,6EAA6E;AAC7E,oEAAoE;AACpE,gBAAgB;AAEhB;;GAEG;AACH,MAAM,OAAO,IAAI;IACL,KAAK,CAAS;IACd,GAAG,CAAqB;IAElC;;OAEG;IACH,YAAY,EAAsB,EAAE,IAAY;QAC9C,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI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ACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,QAAQ,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa;SACpE,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CACd,UAAuB;QAQvB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa;YACnE,IAAI,EAAE,UAAU,IAAI,EAAE;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,CACf,UAAuB;QAQvB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa;YACnE,IAAI,EAAE,UAAU,IAAI,EAAE;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CACrB;YACE,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACzD,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAC/B,CAAC;IACJ,CAAC;CACF;AACD,YAAY","sourcesContent":["/**\r\n * ```ts\r\n * import type { ArangoSearchView } from \"arangojs/views\";\r\n * ```\r\n *\r\n * The \"views\" module provides View related types and interfaces for\r\n * TypeScript.\r\n *\r\n * @packageDocumentation\r\n */\r\nimport * as connections from \"./connection.js\";\r\nimport * as databases from \"./databases.js\";\r\nimport * as errors from \"./errors.js\";\r\nimport { VIEW_NOT_FOUND } from \"./lib/codes.js\";\r\n\r\n//#region Shared types\r\n/**\r\n * Sorting direction. Descending or ascending.\r\n */\r\nexport type Direction = \"desc\" | \"asc\";\r\n\r\n/**\r\n * Compression for storing data.\r\n */\r\nexport type Compression = \"lz4\" | \"none\";\r\n\r\n/**\r\n * Policy to consolidate based on segment byte size and live document count as\r\n * dictated by the customization attributes.\r\n *\r\n * @deprecated The `bytes_accum` consolidation policy was deprecated in\r\n * ArangoDB 3.7 and should be replaced with the `tier` consolidation policy.\r\n */\r\nexport type BytesAccumConsolidationPolicy = {\r\n /**\r\n * Type of consolidation policy.\r\n */\r\n type: \"bytes_accum\";\r\n /**\r\n * Must be in the range of `0.0` to `1.0`.\r\n */\r\n threshold?: number;\r\n};\r\n\r\n/**\r\n * Policy to consolidate if the sum of all candidate segment byte size is less\r\n * than the total segment byte size multiplied by a given threshold.\r\n */\r\nexport type TierConsolidationPolicy = {\r\n /**\r\n * Type of consolidation policy.\r\n */\r\n type: \"tier\";\r\n /**\r\n * @deprecated This option is only available up to v3.12.6.\r\n * It is ignored by the server from v3.12.7 onwards.\r\n *\r\n * Size below which all segments are treated as equivalent.\r\n *\r\n * Default: `2097152` (2 MiB)\r\n */\r\n segmentsBytesFloor?: number;\r\n /**\r\n * Maximum allowed size of all consolidation segments.\r\n *\r\n * Default: `5368709120` (5 GiB)\r\n */\r\n segmentsBytesMax?: number;\r\n /**\r\n * @deprecated This option is only available up to v3.12.6.\r\n * It is ignored by the server from v3.12.7 onwards.\r\n *\r\n * Maximum number of segments that are evaluated as candidates for\r\n * consolidation.\r\n *\r\n * Default: `10`\r\n */\r\n segmentsMax?: number;\r\n /**\r\n * @deprecated This option is only available up to v3.12.6.\r\n * It is ignored by the server from v3.12.7 onwards.\r\n *\r\n * Minimum number of segments that are evaluated as candidates for\r\n * consolidation.\r\n *\r\n * Default: `1`\r\n */\r\n segmentsMin?: number;\r\n /**\r\n * @deprecated This option is only available up to v3.12.6.\r\n * It is ignored by the server from v3.12.7 onwards.\r\n *\r\n * Consolidation candidates with a score less than this value will be\r\n * filtered out.\r\n *\r\n * Default: `0`\r\n */\r\n minScore?: number;\r\n /**\r\n * This option is available from v3.12.7 onward.\r\n *\r\n * The skew describes how much segment files vary in file size. It is a number\r\n * between `0.0` and `1.0` and is calculated by dividing the largest file size\r\n * of a set of segment files by the total size. For example, the skew of a\r\n * 200 MiB, 300 MiB, and 500 MiB segment file is `0.5` (`500 / 1000`).\r\n *\r\n * A large `maxSkewThreshold` value allows merging large segment files with\r\n * smaller ones, consolidation occurs more frequently, and there are fewer\r\n * segment files on disk at all times. While this may potentially improve the\r\n * read performance and use fewer file descriptors, frequent consolidations\r\n * cause a higher write load and thus a higher write amplification.\r\n *\r\n * On the other hand, a small threshold value triggers the consolidation only\r\n * when there are a large number of segment files that don't vary in size a lot.\r\n * Consolidation occurs less frequently, reducing the write amplification, but\r\n * it can result in a greater number of segment files on disk.\r\n *\r\n * Multiple combinations of candidate segments are checked and the one with\r\n * the lowest skew value is selected for consolidation. The selection process\r\n * picks the greatest number of segments that together have the lowest skew value\r\n * while ensuring that the size of the new consolidated segment remains under\r\n * the configured `segmentsBytesMax`.\r\n *\r\n * Default: `0.4`\r\n */\r\n maxSkewThreshold?: number;\r\n /**\r\n * This option is available from v3.12.7 onward.\r\n *\r\n * The `minDeletionRatio` represents the minimum required deletion ratio\r\n * in one or more segments to perform a cleanup of those segments.\r\n * It is a number between `0.0` and `1.0`.\r\n *\r\n * The deletion ratio is the percentage of deleted documents across one or\r\n * more segment files and is calculated by dividing the number of deleted\r\n * documents by the total number of documents in a segment or a group of\r\n * segments. For example, if there is a segment with 1000 documents of which\r\n * 300 are deleted and another segment with 1000 documents of which 700 are\r\n * deleted, the deletion ratio is `0.5` (50%, calculated as `1000 / 2000`).\r\n *\r\n * The `minDeletionRatio` threshold must be carefully selected. A smaller\r\n * value leads to earlier cleanup of deleted documents from segments and\r\n * thus reclamation of disk space but it generates a higher write load.\r\n * A very large value lowers the write amplification but at the same time\r\n * the system can be left with a large number of segment files with a high\r\n * percentage of deleted documents that occupy disk space unnecessarily.\r\n *\r\n * During cleanup, the segment files are first arranged in decreasing\r\n * order of their individual deletion ratios. Then the largest subset of\r\n * segments whose collective deletion ratio is greater than or equal to\r\n * `minDeletionRatio` is picked.\r\n *\r\n * Default: `0.5`\r\n */\r\n minDeletionRatio?: number;\r\n};\r\n\r\n/**\r\n * Type of a View.\r\n */\r\nexport type ViewType = ViewDescription[\"type\"];\r\n//#endregion\r\n\r\n//#region CreateViewOptions\r\n/**\r\n * Options for creating a View.\r\n */\r\nexport type CreateViewOptions =\r\n | CreateArangoSearchViewOptions\r\n | CreateSearchAliasViewOptions;\r\n\r\n/**\r\n * Shared attributes of all View creation options.\r\n */\r\nexport type CreateViewOptionsType<Type extends ViewType, extra extends {}> = {\r\n /**\r\n * Type of the View.\r\n */\r\n type: Type;\r\n} & extra;\r\n\r\n/**\r\n * Options for creating an ArangoSearch View.\r\n */\r\nexport type CreateArangoSearchViewOptions = CreateViewOptionsType<\r\n \"arangosearch\",\r\n ArangoSearchViewPropertiesOptions & {\r\n /**\r\n * Maximum number of writers cached in the pool.\r\n *\r\n * Default: `64`\r\n */\r\n writebufferIdle?: number;\r\n /**\r\n * Maximum number of concurrent active writers that perform a transaction.\r\n *\r\n * Default: `0`\r\n */\r\n writebufferActive?: number;\r\n /**\r\n * Maximum memory byte size per writer before a writer flush is triggered.\r\n *\r\n * Default: `33554432` (32 MiB)\r\n */\r\n writebufferSizeMax?: number;\r\n /**\r\n * Attribute path (`field`) for the value of each document that will be\r\n * used for sorting.\r\n *\r\n * If `direction` is set to `\"asc\"` or `asc` is set to `true`,\r\n * the primary sorting order will be ascending.\r\n *\r\n * If `direction` is set to `\"desc\"` or `asc` is set to `false`,\r\n * the primary sorting order will be descending.\r\n */\r\n primarySort?: CreateArangoSearchViewPrimarySortOptions[];\r\n /**\r\n * Compression to use for the primary sort data.\r\n *\r\n * Default: `\"lz4\"`\r\n */\r\n primarySortCompression?: Compression;\r\n /**\r\n * (Enterprise Edition only.) If set to `true`, then primary sort columns\r\n * will always be cached in memory.\r\n *\r\n * Default: `false`\r\n */\r\n primarySortCache?: boolean;\r\n /**\r\n * (Enterprise Edition only.) If set to `true`, then primary key columns\r\n * will always be cached in memory.\r\n *\r\n * Default: `false`\r\n */\r\n primaryKeyCache?: boolean;\r\n /**\r\n * Attribute paths for which values should be stored in the view index\r\n * in addition to those used for sorting via `primarySort`.\r\n */\r\n storedValues?:\r\n | CreateArangoSearchViewStoredValueOptions[]\r\n | string[]\r\n | string[][];\r\n /**\r\n * An array of strings defining sort expressions to optimize.\r\n */\r\n optimizeTopK?: string[];\r\n }\r\n>;\r\n\r\n/**\r\n * Options for creating a primary sort in an ArangoSearch View.\r\n */\r\nexport type CreateArangoSearchViewPrimarySortOptions =\r\n | {\r\n /**\r\n * Attribute path for the value of each document to use for\r\n * sorting.\r\n */\r\n field: string;\r\n /**\r\n * If set to `\"asc\"`, the primary sorting order will be ascending.\r\n * If set to `\"desc\"`, the primary sorting order will be descending.\r\n */\r\n direction: Direction;\r\n }\r\n | {\r\n /**\r\n * Attribute path for the value of each document to use for\r\n * sorting.\r\n */\r\n field: string;\r\n /**\r\n * If set to `true`, the primary sorting order will be ascending.\r\n * If set to `false`, the primary sorting order will be descending.\r\n */\r\n asc: boolean;\r\n };\r\n\r\n/**\r\n * Options for creating a stored value in an ArangoSearch View.\r\n */\r\nexport interface CreateArangoSearchViewStoredValueOptions {\r\n /**\r\n * Attribute paths for which values should be stored in the view index\r\n * in addition to those used for sorting via `primarySort`.\r\n */\r\n fields: string[];\r\n /**\r\n * How the attribute values should be compressed.\r\n *\r\n * Default: `\"lz4\"`\r\n */\r\n compression?: Compression;\r\n /**\r\n * (Enterprise Edition only.) If set to `true`, then stored values will\r\n * always be cached in memory.\r\n *\r\n * Default: `false`\r\n */\r\n cache?: boolean;\r\n}\r\n\r\n/**\r\n * Options for creating a SearchAlias View.\r\n */\r\nexport type CreateSearchAliasViewOptions = CreateViewOptionsType<\r\n \"search-alias\",\r\n SearchAliasViewPropertiesOptions\r\n>;\r\n//#endregion\r\n\r\n//#region UpdateViewPropertiesOptions\r\n/**\r\n * Options for partially modifying a View's properties.\r\n */\r\nexport type UpdateViewPropertiesOptions =\r\n | UpdateArangoSearchViewPropertiesOptions\r\n | UpdateSearchAliasViewPropertiesOptions;\r\n\r\n/**\r\n * Options for partially modifying the properties of an ArangoSearch View.\r\n */\r\nexport type UpdateArangoSearchViewPropertiesOptions =\r\n ArangoSearchViewPropertiesOptions;\r\n\r\n/**\r\n * Options for partially modifying the properties of a SearchAlias View.\r\n */\r\nexport type UpdateSearchAliasViewPropertiesOptions = {\r\n /**\r\n * An array of inverted indexes to add to the View.\r\n */\r\n indexes: UpdateSearchAliasViewIndexOptions[];\r\n};\r\n\r\n/**\r\n * Options defining an index to be modified in a SearchAlias View.\r\n */\r\nexport type UpdateSearchAliasViewIndexOptions = SearchAliasViewIndexOptions & {\r\n /**\r\n * Whether to add or remove the index.\r\n *\r\n * Default: `\"add\"`\r\n */\r\n operation?: \"add\" | \"del\";\r\n};\r\n\r\n//#endregion\r\n\r\n//#region ViewPropertiesOptions\r\n/**\r\n * Options for replacing a View's properties.\r\n */\r\nexport type ViewPropertiesOptions =\r\n | ArangoSearchViewPropertiesOptions\r\n | SearchAliasViewPropertiesOptions;\r\n\r\n/**\r\n * Options for modifying the properties of an ArangoSearch View.\r\n */\r\nexport type ArangoSearchViewPropertiesOptions = {\r\n /**\r\n * How many commits to wait between removing unused files.\r\n *\r\n * Default: `2`\r\n */\r\n cleanupIntervalStep?: number;\r\n /**\r\n * How long to wait between applying the `consolidationPolicy`.\r\n *\r\n * Default: `10000`\r\n */\r\n consolidationIntervalMsec?: number;\r\n /**\r\n * How long to wait between commiting View data store changes and making\r\n * documents visible to queries.\r\n *\r\n * Default: `1000`\r\n */\r\n commitIntervalMsec?: number;\r\n /**\r\n * Consolidation policy to apply for selecting which segments should be\r\n * merged.\r\n *\r\n * Default: `{ type: \"tier\" }`\r\n */\r\n consolidationPolicy?: TierConsolidationPolicy;\r\n /**\r\n * An object mapping names of linked collections to\r\n * {@link ArangoSearchViewLinkOptions} definitions.\r\n */\r\n links?: Record<string, Omit<ArangoSearchViewLinkOptions, \"nested\">>;\r\n};\r\n\r\n/**\r\n * A link definition for an ArangoSearch View.\r\n */\r\nexport type ArangoSearchViewLinkOptions = {\r\n /**\r\n * A list of names of Analyzers to apply to values of processed document\r\n * attributes.\r\n *\r\n * Default: `[\"identity\"]`\r\n */\r\n analyzers?: string[];\r\n /**\r\n * An object mapping names of attributes to process for each document to\r\n * {@link ArangoSearchViewLinkOptions} definitions.\r\n */\r\n fields?: Record<string, ArangoSearchViewLinkOptions>;\r\n /**\r\n * If set to `true`, all document attributes will be processed, otherwise\r\n * only the attributes in `fields` will be processed.\r\n *\r\n * Default: `false`\r\n */\r\n includeAllFields?: boolean;\r\n /**\r\n * (Enterprise Edition only.) An object mapping attribute names to\r\n * {@link ArangoSearchViewLinkOptions} definitions to index sub-objects\r\n * stored in an array.\r\n */\r\n nested?: Record<string, ArangoSearchViewLinkOptions>;\r\n /**\r\n * If set to `true`, the position of values in array values will be tracked,\r\n * otherwise all values in an array will be treated as equal alternatives.\r\n */\r\n trackListPositions?: boolean;\r\n /**\r\n * Controls how the view should keep track of the attribute values.\r\n *\r\n * Default: `\"none\"`\r\n */\r\n storeValues?: \"none\" | \"id\";\r\n /**\r\n * If set to `true`, then no exclusive lock is used on the source collection\r\n * during View index creation, so that it remains basically available.\r\n *\r\n * Default: `false`\r\n */\r\n inBackground?: boolean;\r\n /**\r\n * (Enterprise Edition only.) If set to `true`, then field normalization\r\n * values will always be cached in memory.\r\n *\r\n * Default: `false`\r\n */\r\n cache?: boolean;\r\n};\r\n\r\n/**\r\n * Options for modifying the properties of a SearchAlias View.\r\n */\r\nexport type SearchAliasViewPropertiesOptions = {\r\n /**\r\n * An array of inverted indexes to add to the View.\r\n */\r\n indexes: SearchAliasViewIndexOptions[];\r\n};\r\n\r\n/**\r\n * Options defining an index used in a SearchAlias View.\r\n */\r\nexport type SearchAliasViewIndexOptions = {\r\n /**\r\n * Name of a collection.\r\n */\r\n collection: string;\r\n /**\r\n * Name of an inverted index in the collection.\r\n */\r\n index: string;\r\n};\r\n//#endregion\r\n\r\n//#region ViewDescription\r\nexport type ViewDescription =\r\n | ArangoSearchViewDescription\r\n | SearchAliasViewDescription;\r\n\r\n/**\r\n * Generic description of a View.\r\n */\r\nexport type ViewDescriptionType<Type extends string> = {\r\n /**\r\n * Type of the View.\r\n */\r\n type: Type;\r\n /**\r\n * A globally unique identifier for this View.\r\n */\r\n globallyUniqueId: string;\r\n /**\r\n * An identifier for this View.\r\n */\r\n id: string;\r\n /**\r\n * Name of the View.\r\n */\r\n name: string;\r\n};\r\n\r\nexport type ArangoSearchViewDescription = ViewDescriptionType<\"arangosearch\">;\r\n\r\nexport type SearchAliasViewDescription = ViewDescriptionType<\"search-alias\">;\r\n//#endregion\r\n\r\n//#region ViewProperties\r\nexport type ViewProperties =\r\n | ArangoSearchViewProperties\r\n | SearchAliasViewProperties;\r\n\r\n/**\r\n * Properties of an ArangoSearch View.\r\n */\r\nexport type ArangoSearchViewProperties = ArangoSearchViewDescription & {\r\n cleanupIntervalStep: number;\r\n consolidationIntervalMsec: number;\r\n commitIntervalMsec: number;\r\n writebufferIdle: number;\r\n writebufferActive: number;\r\n writebufferSizeMax: number;\r\n consolidationPolicy: TierConsolidationPolicy | BytesAccumConsolidationPolicy;\r\n primarySort: {\r\n field: string;\r\n direction: Direction;\r\n }[];\r\n primarySortCompression: Compression;\r\n primarySortCache: boolean;\r\n primaryKeyCache: boolean;\r\n storedValues: {\r\n fields: string[];\r\n compression: Compression;\r\n cache: boolean;\r\n }[];\r\n links: Record<string, Omit<ArangoSearchViewLink, \"nested\">>;\r\n optimizeTopK: string[];\r\n};\r\n\r\n/**\r\n * A link definition for an ArangoSearch View.\r\n */\r\nexport type ArangoSearchViewLink = {\r\n analyzers: string[];\r\n fields: Record<string, ArangoSearchViewLink>;\r\n includeAllFields: boolean;\r\n nested?: Record<string, ArangoSearchViewLink>;\r\n trackListPositions: boolean;\r\n storeValues: \"none\" | \"id\";\r\n cache: boolean;\r\n};\r\n\r\n/**\r\n * Properties of a SearchAlias View.\r\n */\r\nexport type SearchAliasViewProperties = SearchAliasViewDescription & {\r\n indexes: { collection: string; index: string }[];\r\n};\r\n//#endregion\r\n\r\n//#region View class\r\n/**\r\n * Indicates whether the given value represents a {@link View}.\r\n *\r\n * @param view - A value that might be a View.\r\n */\r\nexport function isArangoView(view: any): view is View {\r\n return Boolean(view && view.isArangoView);\r\n}\r\n\r\n// Note: Resist the urge to attempt to create separate ArangoSearchView\r\n// and SearchAliasView classes or interfaces. The requirements for producing\r\n// a meaningful typedoc documentation, providing a nice API in the `Database`\r\n// class and having these as separate interfaces seem to be mutually\r\n// incompatible.\r\n\r\n/**\r\n * Represents a View in a {@link databases.Database}.\r\n */\r\nexport class View {\r\n protected _name: string;\r\n protected _db: databases.Database;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(db: databases.Database, name: string) {\r\n this._db = db;\r\n this._name = name;\r\n }\r\n\r\n /**\r\n * @internal\r\n *\r\n * Indicates that this object represents an ArangoDB View.\r\n */\r\n get isArangoView(): true {\r\n return true;\r\n }\r\n\r\n /**\r\n * Database this view belongs to.\r\n */\r\n get database() {\r\n return this._db;\r\n }\r\n\r\n /**\r\n * Name of the View.\r\n */\r\n get name() {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * Retrieves general information about the View.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const data = await view.get();\r\n * // data contains general information about the View\r\n * ```\r\n */\r\n get(): Promise<connections.ArangoApiResponse<ViewDescription>> {\r\n return this._db.request({\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}`,\r\n });\r\n }\r\n\r\n /**\r\n * Checks whether the View exists.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const exists = await view.exists();\r\n * console.log(exists); // indicates whether the View exists\r\n * ```\r\n */\r\n async exists(): Promise<boolean> {\r\n try {\r\n await this.get();\r\n return true;\r\n } catch (err: any) {\r\n if (errors.isArangoError(err) && err.errorNum === VIEW_NOT_FOUND) {\r\n return false;\r\n }\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a View with the given `options` and the instance's name.\r\n *\r\n * See also {@link databases.Database#createView}.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"potatoes\");\r\n * await view.create();\r\n * // the ArangoSearch View \"potatoes\" now exists\r\n * ```\r\n */\r\n create<Options extends CreateViewOptions>(\r\n options: CreateViewOptions\r\n ): Promise<\r\n typeof options extends CreateArangoSearchViewOptions\r\n ? ArangoSearchViewDescription\r\n : Options extends CreateSearchAliasViewOptions\r\n ? SearchAliasViewDescription\r\n : ViewDescription\r\n > {\r\n return this._db.request({\r\n method: \"POST\",\r\n pathname: \"/_api/view\",\r\n body: {\r\n ...options,\r\n name: this._name,\r\n },\r\n });\r\n }\r\n\r\n /**\r\n * Renames the View and updates the instance's `name` to `newName`.\r\n *\r\n * Additionally removes the instance from the {@link databases.Database}'s\r\n * internal cache.\r\n *\r\n * **Note**: Renaming Views may not be supported when ArangoDB is\r\n * running in a cluster configuration.\r\n *\r\n * @param newName - The new name of the View.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view1 = db.view(\"some-view\");\r\n * await view1.rename(\"other-view\");\r\n * const view2 = db.view(\"some-view\");\r\n * const view3 = db.view(\"other-view\");\r\n * // Note all three View instances are different objects but\r\n * // view1 and view3 represent the same ArangoDB view!\r\n * ```\r\n */\r\n async rename(\r\n newName: string\r\n ): Promise<connections.ArangoApiResponse<ViewDescription>> {\r\n const result = this._db.renameView(this._name, newName);\r\n this._name = newName;\r\n return result;\r\n }\r\n\r\n /**\r\n * Retrieves the View's properties.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const data = await view.properties();\r\n * // data contains the View's properties\r\n * ```\r\n */\r\n properties(): Promise<connections.ArangoApiResponse<ViewProperties>> {\r\n return this._db.request({\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}/properties`,\r\n });\r\n }\r\n\r\n /**\r\n * Updates the properties of the View.\r\n *\r\n * @param properties - Properties of the View to update.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const result = await view.updateProperties({\r\n * consolidationIntervalMsec: 234\r\n * });\r\n * console.log(result.consolidationIntervalMsec); // 234\r\n * ```\r\n */\r\n updateProperties<Properties extends UpdateViewPropertiesOptions | undefined>(\r\n properties?: Properties\r\n ): Promise<\r\n Properties extends UpdateArangoSearchViewPropertiesOptions\r\n ? ArangoSearchViewProperties\r\n : Properties extends UpdateSearchAliasViewPropertiesOptions\r\n ? SearchAliasViewProperties\r\n : ViewProperties\r\n > {\r\n return this._db.request({\r\n method: \"PATCH\",\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}/properties`,\r\n body: properties ?? {},\r\n });\r\n }\r\n\r\n /**\r\n * Replaces the properties of the View.\r\n *\r\n * @param properties - New properties of the View.\r\n *\r\n * @example\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * const result = await view.replaceProperties({\r\n * consolidationIntervalMsec: 234\r\n * });\r\n * console.log(result.consolidationIntervalMsec); // 234\r\n * ```\r\n */\r\n replaceProperties<Properties extends ViewPropertiesOptions | undefined>(\r\n properties?: Properties\r\n ): Promise<\r\n Properties extends ArangoSearchViewPropertiesOptions\r\n ? ArangoSearchViewProperties\r\n : Properties extends SearchAliasViewPropertiesOptions\r\n ? SearchAliasViewProperties\r\n : ViewProperties\r\n > {\r\n return this._db.request({\r\n method: \"PUT\",\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}/properties`,\r\n body: properties ?? {},\r\n });\r\n }\r\n\r\n /**\r\n * Deletes the View from the database.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const db = new Database();\r\n * const view = db.view(\"some-view\");\r\n * await view.drop();\r\n * // the View \"some-view\" no longer exists\r\n * ```\r\n */\r\n drop(): Promise<boolean> {\r\n return this._db.request(\r\n {\r\n method: \"DELETE\",\r\n pathname: `/_api/view/${encodeURIComponent(this._name)}`,\r\n },\r\n (res) => res.parsedBody.result\r\n );\r\n }\r\n}\r\n//#endregion\r\n"]}
|
package/indexes.d.ts
CHANGED
|
@@ -519,14 +519,28 @@ export type EnsureVectorIndexOptions = EnsureIndexOptionsType<"vector", [
|
|
|
519
519
|
* The number of threads to use for indexing. Default is 2.
|
|
520
520
|
*/
|
|
521
521
|
parallelism?: number;
|
|
522
|
+
/**
|
|
523
|
+
* An array of attribute paths that will be stored in the index for
|
|
524
|
+
* efficient filtering. Unlike with other index types, this is not for
|
|
525
|
+
* covering projections with the index but for adding attributes that
|
|
526
|
+
* you filter on. This lets you make the lookup in the vector index
|
|
527
|
+
* more efficient because it avoids materializing documents twice,
|
|
528
|
+
* once for the filtering and once for the matches.
|
|
529
|
+
*
|
|
530
|
+
* The maximum number of attributes that you can use in storedValues is 32.
|
|
531
|
+
*
|
|
532
|
+
* Introduced in: ArangoDB 3.12.7
|
|
533
|
+
*/
|
|
534
|
+
storedValues?: string[];
|
|
522
535
|
/**
|
|
523
536
|
* Vector index parameters, following Faiss configuration.
|
|
524
537
|
*/
|
|
525
538
|
params: {
|
|
526
539
|
/**
|
|
527
|
-
* Whether to use cosine
|
|
540
|
+
* Whether to use cosine, l2 (Euclidean), or innerProduct distance.
|
|
541
|
+
* innerProduct was introduced in ArangoDB 3.12.6.
|
|
528
542
|
*/
|
|
529
|
-
metric: "cosine" | "l2";
|
|
543
|
+
metric: "cosine" | "l2" | "innerProduct";
|
|
530
544
|
/**
|
|
531
545
|
* Vector dimension. Must match the length of vectors in documents.
|
|
532
546
|
*/
|
|
@@ -796,8 +810,15 @@ export type VectorIndexDescription = IndexDescriptionType<"vector", [
|
|
|
796
810
|
], {
|
|
797
811
|
parallelism: number;
|
|
798
812
|
inBackground: boolean;
|
|
813
|
+
/**
|
|
814
|
+
* An array of attribute paths that are stored in the index for
|
|
815
|
+
* efficient filtering.
|
|
816
|
+
*
|
|
817
|
+
* Introduced in: ArangoDB 3.12.7
|
|
818
|
+
*/
|
|
819
|
+
storedValues?: string[];
|
|
799
820
|
params: {
|
|
800
|
-
metric: "cosine" | "l2";
|
|
821
|
+
metric: "cosine" | "l2" | "innerProduct";
|
|
801
822
|
dimension: number;
|
|
802
823
|
nLists: number;
|
|
803
824
|
defaultNProbe?: number;
|
package/indexes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexes.d.ts","sourceRoot":"","sources":["../src/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAGpC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAIjE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,4BAA4B,GAC5B,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,6BAA6B,GAC7B,0BAA0B,GAC1B,wBAAwB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAChC,IAAI,SAAS,SAAS,EACtB,MAAM,SAAS,GAAG,EAAE,EAC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CAAC;QACf,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CACF,CAAC;AAIF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,cAAc,GAAG,MAAM,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,aAAa,EACvB,cAAc,EAAE,MAAM,GACrB,MAAM,CAmBR"}
|
package/package.json
CHANGED
package/users.d.ts
CHANGED
|
@@ -93,4 +93,95 @@ export type ArangoUser = {
|
|
|
93
93
|
*/
|
|
94
94
|
extra: Record<string, any>;
|
|
95
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* Options for creating an access token.
|
|
98
|
+
*/
|
|
99
|
+
export type CreateAccessTokenOptions = {
|
|
100
|
+
/**
|
|
101
|
+
* Unique name for the access token.
|
|
102
|
+
* Must be unique per user.
|
|
103
|
+
*/
|
|
104
|
+
name: string;
|
|
105
|
+
/**
|
|
106
|
+
* Unix timestamp (in seconds) indicating when the token expires.
|
|
107
|
+
* If not provided, token does not expire.
|
|
108
|
+
*
|
|
109
|
+
* Note: Only Unix timestamp (number) is accepted, not Date objects.
|
|
110
|
+
*/
|
|
111
|
+
valid_until?: number;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Access token returned when creating a new token.
|
|
115
|
+
* This is the only time the token value is returned.
|
|
116
|
+
*/
|
|
117
|
+
export type AccessToken = {
|
|
118
|
+
/**
|
|
119
|
+
* Unique identifier for the token.
|
|
120
|
+
*/
|
|
121
|
+
id: number;
|
|
122
|
+
/**
|
|
123
|
+
* Name of the token.
|
|
124
|
+
*/
|
|
125
|
+
name: string;
|
|
126
|
+
/**
|
|
127
|
+
* Unix timestamp (in seconds) when the token expires.
|
|
128
|
+
*/
|
|
129
|
+
valid_until: number;
|
|
130
|
+
/**
|
|
131
|
+
* Unix timestamp (in seconds) when the token was created.
|
|
132
|
+
*/
|
|
133
|
+
created_at: number;
|
|
134
|
+
/**
|
|
135
|
+
* MD5 fingerprint of the token.
|
|
136
|
+
*/
|
|
137
|
+
fingerprint: string;
|
|
138
|
+
/**
|
|
139
|
+
* Whether the token is currently active.
|
|
140
|
+
*/
|
|
141
|
+
active: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* The actual token value.
|
|
144
|
+
* This is only present in the creation response and cannot be retrieved again.
|
|
145
|
+
*/
|
|
146
|
+
token: string;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Access token metadata (without the token value).
|
|
150
|
+
* Returned when listing tokens.
|
|
151
|
+
*/
|
|
152
|
+
export type AccessTokenMetadata = {
|
|
153
|
+
/**
|
|
154
|
+
* Unique identifier for the token.
|
|
155
|
+
*/
|
|
156
|
+
id: number;
|
|
157
|
+
/**
|
|
158
|
+
* Name of the token.
|
|
159
|
+
*/
|
|
160
|
+
name: string;
|
|
161
|
+
/**
|
|
162
|
+
* Unix timestamp (in seconds) when the token expires.
|
|
163
|
+
*/
|
|
164
|
+
valid_until: number;
|
|
165
|
+
/**
|
|
166
|
+
* Unix timestamp (in seconds) when the token was created.
|
|
167
|
+
*/
|
|
168
|
+
created_at: number;
|
|
169
|
+
/**
|
|
170
|
+
* MD5 fingerprint of the token.
|
|
171
|
+
*/
|
|
172
|
+
fingerprint: string;
|
|
173
|
+
/**
|
|
174
|
+
* Whether the token is currently active.
|
|
175
|
+
*/
|
|
176
|
+
active: boolean;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Response from listing access tokens.
|
|
180
|
+
*/
|
|
181
|
+
export type AccessTokenListResponse = {
|
|
182
|
+
/**
|
|
183
|
+
* Array of access token metadata.
|
|
184
|
+
*/
|
|
185
|
+
tokens: AccessTokenMetadata[];
|
|
186
|
+
};
|
|
96
187
|
//# sourceMappingURL=users.d.ts.map
|
package/users.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../src/users.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAG5C;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAI/C;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,GAAG,MAAM,CAAC;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,gBAAgB,GAAG,MAAM,CAAC;CACpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC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UAAU,GAAG;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAIF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,MAAM,EAAE,mBAAmB,EAAE,CAAC;CAC/B,CAAC"}
|
package/views.d.ts
CHANGED
|
@@ -45,6 +45,9 @@ export type TierConsolidationPolicy = {
|
|
|
45
45
|
*/
|
|
46
46
|
type: "tier";
|
|
47
47
|
/**
|
|
48
|
+
* @deprecated This option is only available up to v3.12.6.
|
|
49
|
+
* It is ignored by the server from v3.12.7 onwards.
|
|
50
|
+
*
|
|
48
51
|
* Size below which all segments are treated as equivalent.
|
|
49
52
|
*
|
|
50
53
|
* Default: `2097152` (2 MiB)
|
|
@@ -57,6 +60,9 @@ export type TierConsolidationPolicy = {
|
|
|
57
60
|
*/
|
|
58
61
|
segmentsBytesMax?: number;
|
|
59
62
|
/**
|
|
63
|
+
* @deprecated This option is only available up to v3.12.6.
|
|
64
|
+
* It is ignored by the server from v3.12.7 onwards.
|
|
65
|
+
*
|
|
60
66
|
* Maximum number of segments that are evaluated as candidates for
|
|
61
67
|
* consolidation.
|
|
62
68
|
*
|
|
@@ -64,6 +70,9 @@ export type TierConsolidationPolicy = {
|
|
|
64
70
|
*/
|
|
65
71
|
segmentsMax?: number;
|
|
66
72
|
/**
|
|
73
|
+
* @deprecated This option is only available up to v3.12.6.
|
|
74
|
+
* It is ignored by the server from v3.12.7 onwards.
|
|
75
|
+
*
|
|
67
76
|
* Minimum number of segments that are evaluated as candidates for
|
|
68
77
|
* consolidation.
|
|
69
78
|
*
|
|
@@ -71,12 +80,72 @@ export type TierConsolidationPolicy = {
|
|
|
71
80
|
*/
|
|
72
81
|
segmentsMin?: number;
|
|
73
82
|
/**
|
|
83
|
+
* @deprecated This option is only available up to v3.12.6.
|
|
84
|
+
* It is ignored by the server from v3.12.7 onwards.
|
|
85
|
+
*
|
|
74
86
|
* Consolidation candidates with a score less than this value will be
|
|
75
87
|
* filtered out.
|
|
76
88
|
*
|
|
77
89
|
* Default: `0`
|
|
78
90
|
*/
|
|
79
91
|
minScore?: number;
|
|
92
|
+
/**
|
|
93
|
+
* This option is available from v3.12.7 onward.
|
|
94
|
+
*
|
|
95
|
+
* The skew describes how much segment files vary in file size. It is a number
|
|
96
|
+
* between `0.0` and `1.0` and is calculated by dividing the largest file size
|
|
97
|
+
* of a set of segment files by the total size. For example, the skew of a
|
|
98
|
+
* 200 MiB, 300 MiB, and 500 MiB segment file is `0.5` (`500 / 1000`).
|
|
99
|
+
*
|
|
100
|
+
* A large `maxSkewThreshold` value allows merging large segment files with
|
|
101
|
+
* smaller ones, consolidation occurs more frequently, and there are fewer
|
|
102
|
+
* segment files on disk at all times. While this may potentially improve the
|
|
103
|
+
* read performance and use fewer file descriptors, frequent consolidations
|
|
104
|
+
* cause a higher write load and thus a higher write amplification.
|
|
105
|
+
*
|
|
106
|
+
* On the other hand, a small threshold value triggers the consolidation only
|
|
107
|
+
* when there are a large number of segment files that don't vary in size a lot.
|
|
108
|
+
* Consolidation occurs less frequently, reducing the write amplification, but
|
|
109
|
+
* it can result in a greater number of segment files on disk.
|
|
110
|
+
*
|
|
111
|
+
* Multiple combinations of candidate segments are checked and the one with
|
|
112
|
+
* the lowest skew value is selected for consolidation. The selection process
|
|
113
|
+
* picks the greatest number of segments that together have the lowest skew value
|
|
114
|
+
* while ensuring that the size of the new consolidated segment remains under
|
|
115
|
+
* the configured `segmentsBytesMax`.
|
|
116
|
+
*
|
|
117
|
+
* Default: `0.4`
|
|
118
|
+
*/
|
|
119
|
+
maxSkewThreshold?: number;
|
|
120
|
+
/**
|
|
121
|
+
* This option is available from v3.12.7 onward.
|
|
122
|
+
*
|
|
123
|
+
* The `minDeletionRatio` represents the minimum required deletion ratio
|
|
124
|
+
* in one or more segments to perform a cleanup of those segments.
|
|
125
|
+
* It is a number between `0.0` and `1.0`.
|
|
126
|
+
*
|
|
127
|
+
* The deletion ratio is the percentage of deleted documents across one or
|
|
128
|
+
* more segment files and is calculated by dividing the number of deleted
|
|
129
|
+
* documents by the total number of documents in a segment or a group of
|
|
130
|
+
* segments. For example, if there is a segment with 1000 documents of which
|
|
131
|
+
* 300 are deleted and another segment with 1000 documents of which 700 are
|
|
132
|
+
* deleted, the deletion ratio is `0.5` (50%, calculated as `1000 / 2000`).
|
|
133
|
+
*
|
|
134
|
+
* The `minDeletionRatio` threshold must be carefully selected. A smaller
|
|
135
|
+
* value leads to earlier cleanup of deleted documents from segments and
|
|
136
|
+
* thus reclamation of disk space but it generates a higher write load.
|
|
137
|
+
* A very large value lowers the write amplification but at the same time
|
|
138
|
+
* the system can be left with a large number of segment files with a high
|
|
139
|
+
* percentage of deleted documents that occupy disk space unnecessarily.
|
|
140
|
+
*
|
|
141
|
+
* During cleanup, the segment files are first arranged in decreasing
|
|
142
|
+
* order of their individual deletion ratios. Then the largest subset of
|
|
143
|
+
* segments whose collective deletion ratio is greater than or equal to
|
|
144
|
+
* `minDeletionRatio` is picked.
|
|
145
|
+
*
|
|
146
|
+
* Default: `0.5`
|
|
147
|
+
*/
|
|
148
|
+
minDeletionRatio?: number;
|
|
80
149
|
};
|
|
81
150
|
/**
|
|
82
151
|
* Type of a View.
|
package/views.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../src/views.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAK5C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb
|
|
1
|
+
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../src/views.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;A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