From d62c10f4ff86297c0984a36fa215856ae7f756fa Mon Sep 17 00:00:00 2001 From: Enes Date: Wed, 13 Mar 2024 01:55:37 +0200 Subject: [PATCH 1/6] - docs update and fix --- app/package.json | 2 +- app/src/Collections/createCollection.ts | 9 ++++++++- app/src/Collections/deleteCollection.ts | 9 ++++++++- app/src/Collections/listCollections.ts | 7 +++++++ app/src/Collections/renameCollection.ts | 9 ++++++++- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/app/package.json b/app/package.json index 65349ac7..8961512b 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "@exweiv/weiv-data", - "version": "3.0.1", + "version": "3.0.2", "description": "Custom API Library for Wix sites to connect MongoDB. Designed to easily switch from wix-data APIs.", "main": "./lib/index.js", "files": [ diff --git a/app/src/Collections/createCollection.ts b/app/src/Collections/createCollection.ts index 58068589..8c93e800 100644 --- a/app/src/Collections/createCollection.ts +++ b/app/src/Collections/createCollection.ts @@ -6,7 +6,14 @@ import type { CreateCollectionOptions, Collection } from 'mongodb'; /** * Creates a new collection inside of a selected database. (User must have createCollection permission inside MongoDB dashboard, you can also use suppressAuth with options). * - * @param collectionId CollectionID (/). + * @example + * ```js + * import { createCollection } from '@exweiv/weiv-data'; + * + * createCollection('Database/NewCollectionName', { suppressAuth: true }); + * ``` + * + * @param collectionId CollectionID (< database >/< collection >). * @param options An object containing options to use when processing this operation. * @param createOptions Native options of MongoDB driver when creating a collection. [Checkout here.](https://mongodb.github.io/node-mongodb-native/6.5/interfaces/CreateCollectionOptions.html) * @returns {Promise} Fulfilled - The Collection cursor of native MongoDB driver. diff --git a/app/src/Collections/deleteCollection.ts b/app/src/Collections/deleteCollection.ts index 1fe94ec5..e6989a42 100644 --- a/app/src/Collections/deleteCollection.ts +++ b/app/src/Collections/deleteCollection.ts @@ -6,7 +6,14 @@ import type { DropCollectionOptions } from 'mongodb'; /** * Deletes a collection inside of a selected database. (User must have dropCollection permission inside MongoDB dashboard, you can also use suppressAuth with options). * - * @param collectionId CollectionID (/). + * @example + * ```js + * import { deleteCollection } from '@exweiv/weiv-data'; + * + * deleteCollection('Database/ExistingCollectionName', { suppressAuth: true }); + * ``` + * + * @param collectionId CollectionID (< database >/< collection >). * @param options An object containing options to use when processing this operation. * @param deleteOptions Native options of MongoDB driver when deleting a collection. [Checkout here.](https://mongodb.github.io/node-mongodb-native/6.5/interfaces/DropCollectionOptions.html) * @returns {Promise} Fulfilled - True if succeed. diff --git a/app/src/Collections/listCollections.ts b/app/src/Collections/listCollections.ts index 3273ba9b..0885f2f1 100644 --- a/app/src/Collections/listCollections.ts +++ b/app/src/Collections/listCollections.ts @@ -5,6 +5,13 @@ import type { ListCollectionsCursor, Document, ListCollectionsOptions } from 'mo /** * Lists collections inside of a selected database. (User must have listCollections permission inside MongoDB dashboard, you can also use suppressAuth with options). * + * @example + * ```js + * import { listCollections } from '@exweiv/weiv-data'; + * + * listCollections('DatabaseName', { suppressAuth: true }); + * ``` + * * @param databaseName Database name that you want to get the collections of. * @param options An object containing options to use when processing this operation. * @param filter MongoDB native filtering options. [Read more in native docs.](https://mongodb.github.io/node-mongodb-native/6.5/classes/Db.html#listCollections) diff --git a/app/src/Collections/renameCollection.ts b/app/src/Collections/renameCollection.ts index ec25507c..f4aed1bc 100644 --- a/app/src/Collections/renameCollection.ts +++ b/app/src/Collections/renameCollection.ts @@ -6,7 +6,14 @@ import type { Collection, RenameOptions } from 'mongodb'; /** * Renames a collection inside of a selected database. (User must have renameCollection permission inside MongoDB dashboard, you can also use suppressAuth with options). * - * @param collectionId CollectionID (/). + * @example + * ```js + * import { renameCollection } from '@exweiv/weiv-data'; + * + * renameCollection('Database/ExistingCollectionName', 'NewCollectionName', { suppressAuth: true }); + * ``` + * + * @param collectionId CollectionID (< database >/< collection >). * @param newCollectionName New name of collection. * @param options An object containing options to use when processing this operation. * @param renameOptions Native options of MongoDB driver when renaming a collection. [Checkout here.](https://mongodb.github.io/node-mongodb-native/6.5/classes/Db.html#renameCollection) From 0fd5c5ca30d9ad78f7ebf4a3f13ba2a9931ce95b Mon Sep 17 00:00:00 2001 From: ExWeiv GitHub BOT Date: Tue, 12 Mar 2024 23:55:57 +0000 Subject: [PATCH 2/6] Build and Generate Docs - BOT --- app/package-lock.json | 4 +- docs/classes/WeivDataAggregate.html | 28 +++++----- docs/classes/WeivDataFilter.html | 36 ++++++------- docs/classes/WeivDataQuery.html | 54 +++++++++---------- docs/functions/bulkInsert.html | 2 +- docs/functions/bulkRemove.html | 2 +- docs/functions/bulkSave.html | 2 +- docs/functions/bulkUpdate.html | 2 +- docs/functions/createCollection.html | 6 ++- docs/functions/deleteCollection.html | 6 ++- docs/functions/findOne.html | 2 +- docs/functions/flushCache.html | 2 +- docs/functions/get.html | 2 +- docs/functions/getAndRemove.html | 2 +- docs/functions/getAndReplace.html | 2 +- docs/functions/getAndUpdate.html | 2 +- docs/functions/idConverter.html | 2 +- docs/functions/increment.html | 2 +- docs/functions/insert.html | 2 +- docs/functions/insertReference.html | 2 +- docs/functions/isReferenced.html | 2 +- docs/functions/listCollections.html | 4 +- docs/functions/multiply.html | 2 +- docs/functions/native.html | 2 +- docs/functions/pull.html | 2 +- docs/functions/push.html | 2 +- docs/functions/queryReferenced.html | 2 +- docs/functions/remove.html | 2 +- docs/functions/removeReference.html | 2 +- docs/functions/renameCollection.html | 6 ++- docs/functions/replace.html | 2 +- docs/functions/replaceReferences.html | 2 +- docs/functions/save.html | 2 +- docs/functions/truncate.html | 2 +- docs/functions/update.html | 2 +- docs/interfaces/AggregateRunOptions.html | 6 +-- docs/interfaces/BulkInsertResult.html | 4 +- docs/interfaces/HookContext.html | 4 +- docs/interfaces/IncludeObject.html | 14 ++--- docs/interfaces/WeivDataAggregateResult.html | 10 ++-- docs/interfaces/WeivDataBulkRemoveResult.html | 6 +-- docs/interfaces/WeivDataBulkSaveResult.html | 10 ++-- docs/interfaces/WeivDataBulkUpdateResult.html | 6 +-- docs/interfaces/WeivDataOptions.html | 4 +- docs/interfaces/WeivDataOptionsCache.html | 4 +- .../WeivDataQueryReferencedResult.html | 14 ++--- docs/interfaces/WeivDataQueryResult.html | 22 ++++---- docs/interfaces/WeivDataSaveResult.html | 6 +-- docs/types/CacheSelections.html | 2 +- docs/types/CollectionID.html | 2 +- docs/types/EnableVisitorID.html | 2 +- docs/types/HookArgs.html | 2 +- docs/types/HookName.html | 2 +- docs/types/HooksResults.html | 2 +- docs/types/Item.html | 2 +- docs/types/ItemID.html | 2 +- docs/types/ItemIDs.html | 2 +- docs/types/Items.html | 2 +- docs/types/ReadConcern.html | 2 +- docs/types/ReferencedItem.html | 2 +- docs/types/ReferringItem.html | 2 +- docs/types/SuppressAuth.html | 2 +- docs/types/SuppressHooks.html | 2 +- .../types/WeivDataQueryReferencedOptions.html | 2 +- 64 files changed, 174 insertions(+), 166 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index 13446caa..c9ced05a 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "@exweiv/weiv-data", - "version": "3.0.1", + "version": "3.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@exweiv/weiv-data", - "version": "3.0.1", + "version": "3.0.2", "license": "Apache-2.0", "dependencies": { "crypto-js": "^4.2.0", diff --git a/docs/classes/WeivDataAggregate.html b/docs/classes/WeivDataAggregate.html index 0b9f98a9..30fb5428 100644 --- a/docs/classes/WeivDataAggregate.html +++ b/docs/classes/WeivDataAggregate.html @@ -6,7 +6,7 @@
  • Language Filters (Filter aggregations based on a language)
  • More!
  • -

    Hierarchy

    • InternalWeivDataAggregateResult
      • WeivDataAggregate

    Methods

    Hierarchy

    • InternalWeivDataAggregateResult
      • WeivDataAggregate

    Methods

    ascending avg count descending @@ -24,32 +24,32 @@

    Returns WeivDataAggregate

    A WeivDataAggregate object representing the refined aggregation.

    Example

    import weivData from '@exweiv/weiv-data';

    const aggregateResult = await weivData.aggregate("Clusters/AiModels")
    .ascending("modelType")
    .run(options)

    console.log(aggregateResult);
    -
    • Refines a WeivDataAggregate to only contain the average value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the average valu

      • projectedName: string = ...

        The name of the property in the aggregation results containing the average value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .avg("trainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to contain the item count of each group in the aggregation.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("modelType", "trainedDataSize")
      .count()
      .run(options)

      console.log(aggregateResult);
      -
    • Adds a sort to an aggregation, sorting by the items or groups by the specified properties in descending order.

      Parameters

      • propertyName: string

        The properties used in the sort.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .descending("modelType")
      .run(options)

      console.log(aggregateResult);
      -
    • Filters out items from being used in an aggregation.

      Parameters

      • filter: WeivDataFilter

        The filter to use to filter out items from being used in the aggregation.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let filter = weivData.filter().eq("modelType", "S1");

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .filter(filter)
      .run(options)

      console.log(aggregateResult);
      -
    • Groups items together in an aggregation.

      Parameters

      • Rest ...propertyName: string[]

        The property or properties to group on.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("t2Members", "t1Members")
      .run(options)

      console.log(aggregateResult);
      -
    • Filters out groups from being returned from an aggregation.

      Note: possible bug! This function may not work as you expect!

      @@ -57,37 +57,37 @@

    Returns WeivDataAggregate

    A WeivDataAggregate object representing the refined aggregation.

    Example

    import weivData from '@exweiv/weiv-data';

    let having = weivData.filter().gt("trainedDataSize", 100000000)

    const aggregateResult = await weivData.aggregate("Clusters/AiModels")
    .having(having)
    .max("trainedDataSize", "maxTrainedDataSize")
    .run(options)

    console.log(aggregateResult);
    -
    • Limits the number of items or groups the aggregation returns.

      Parameters

      • limit: number

        The number of items or groups to return.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let having = weivData.filter().gt("trainedDataSize", 100000000)

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .having(having)
      .max("trainedDataSize", "maxTrainedDataSize")
      .limit(150)
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to only contain the maximum value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the maximum value.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the maximum value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let having = weivData.filter().gt("trainedDataSize", 100000000)

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .having(having)
      .max("trainedDataSize", "maxTrainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to only contain the minimum value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the minimum value.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the minimum value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .min("trainedDataSize", "minTrainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Runs the aggregation and returns the results.

      Parameters

      Returns Promise<WeivDataAggregateResult>

      Fulfilled - A Promise that resolves to the results of the aggregation. Rejected - Error that caused the aggregation to fail.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter().gt("trainedDataSize", 100000000);

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("modelType", "trainedDataSize", "t1Members")
      .filter(filter)
      .descending("trainedDataSize")
      .skip(5)
      .limit(118)
      .run({suppressAuth: true})

      console.log(aggregateResult);
      -
    • Sets the number of items or groups to skip before returning aggregation results.

      Parameters

      • skip: number

        The number of items or groups to skip in the aggregation results before returning the results.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .max("trainedDataSize", "maxTrainedDataSize")
      .skip(18)
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to contain the sum from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the sum.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the sum.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .sum("trainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/WeivDataFilter.html b/docs/classes/WeivDataFilter.html index ecdfd78a..51012465 100644 --- a/docs/classes/WeivDataFilter.html +++ b/docs/classes/WeivDataFilter.html @@ -5,7 +5,7 @@
  • AI (AI based auto generated filters for some operations such as searhing products etc.)
  • Language (Language filtering method.)
  • -

    Methods

    and +

    Methods

    and between contains endsWith @@ -27,95 +27,95 @@

    Returns WeivDataFilter

    A WeivDataFilter object representing the refined filters.

    Example

    import weivData from '@exweiv/weiv-data';

    const orFilter = weivData.filter("Clusters/IST12").eq("balance", 0);
    const andFilter = weivData.filter("Clusters/IST12").gt("balance", 10000).or(orFilter);

    const filter = weivData.filter("Clusters/IST12")
    .eq("memberTier", 1)
    .and(andFilter)
    -
    • Refines a query or filter to match items whose specified property value is within a specified range.

      +
    • Refines a query or filter to match items whose specified property value is within a specified range.

      Parameters

      • propertyName: string

        The property whose value will be compared with rangeStart and rangeEnd.

      • rangeStart: any

        The beginning value of the range to match against.

      • rangeEnd: any

        The ending value of the range to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").between("memberTier", 1, 2);
      -
    • Refines a query or filter to match items whose specified property value contains a specified string.

      Parameters

      • propertyName: string
      • string: string

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").contains("location", "IST");
      -
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the end of the specified property value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").endsWith("location", "1-2");
      -
    • Refines a query or filter to match items whose specified property value equals the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Istanbul").eq("location", "IST 1-2");
      -
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Uskudar").ge("balance", 1699);
      -
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Uskudar").gt("balance", 1699);
      -
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Besiktas")
      .gt("balance", 1699)
      .hasAll("availableCPUs", ["M1", "S1", "F2", "E7"])
      -
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Besiktas")
      .eq("genericAPIsEnabled", true)
      .hasSome("availableCPUs", ["M1", "T1"])
      -
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      Parameters

      • propertyName: string

        The the property in which to check for a value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").isEmpty("genericAPIsEnabled")
      -
    • Refines a query or filter to match items whose specified property has any value.

      Parameters

      • propertyName: string

        The property in which to check for a value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").isNotEmpty("genericAPIsEnabled")
      -
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").le("maxCPUTime", 200)
      -
    • Refines a query or filter to match items whose specified property value is less than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").lt("maxCPUTime", 50)
      -
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").ne("location", "Ankara")
      -
    • Adds a not condition to the query or filter.

      Parameters

      • query: WeivDataFilter

        A query to add to the initial query as a not condition.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const notFilter = weivData.filter("Clusters/IST12").eq("balance", 0).gt("balance", 1000);

      const filter = weivData.filter("Clusters/IST12")
      .eq("memberTier", 1)
      .not(notFilter)
      -
    • Adds an or condition to the query or filter.

      Parameters

      • query: WeivDataFilter

        A query to add to the initial query as an or condition.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const orFilter = weivData.filter("Clusters/IST12").eq("balance", 0);
      const andFilter = weivData.filter("Clusters/IST12").gt("balance", 10000).or(orFilter);

      const filter = weivData.filter("Clusters/IST12")
      .eq("memberTier", 1)
      .and(andFilter)
      -
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the beginning of the specified property value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").startsWith("location", "IST")
      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/WeivDataQuery.html b/docs/classes/WeivDataQuery.html index 4c075e94..92d78f36 100644 --- a/docs/classes/WeivDataQuery.html +++ b/docs/classes/WeivDataQuery.html @@ -7,7 +7,7 @@
  • Language (Auto language filtering)
  • More!
  • -

    Methods

    and +

    Methods

    and ascending between contains @@ -36,109 +36,109 @@

    Methods

    • Adds a sort to a query or sort, sorting by the specified properties in ascending order.

      Parameters

      • Rest ...propertyName: string[]

        The properties used in the sort.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).ascending("clusterType").find();
      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is within a specified range.

      +
    • Refines a query or filter to match items whose specified property value is within a specified range.

      Parameters

      • propertyName: string

        The property whose value will be compared with rangeStart and rangeEnd.

      • rangeStart: any

        The beginning value of the range to match against.

      • rangeEnd: any

        The ending value of the range to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value contains a specified string.

      +
    • Refines a query or filter to match items whose specified property value contains a specified string.

      Parameters

      • propertyName: string
      • string: string

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Returns the number of items that match the query.

      +
    • Returns the number of items that match the query.

      Parameters

      • options: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<number>

      Fulfilled - The number of items that match the query. Rejected - The errors that caused the rejection.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).count();
      console.log(queryResult);
      -
    • Adds a sort to a query or sort, sorting by the specified properties in descending order.

      Parameters

      • Rest ...propertyName: string[]

        The properties used in the sort.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).descending("clusterType").find();
      console.log(queryResult);
      -
    • Returns the distinct values that match the query, without duplicates.

      Parameters

      • propertyName: string

        The property whose value will be compared for distinct values.

      • options: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<WeivDataQueryResult>

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).distinct("clusterType");
      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      +
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the end of the specified property value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value equals the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Lists the fields to return in a query's results.

      Parameters

      • Rest ...propertyName: string[]

        Properties to return. To return multiple properties, pass properties as additional arguments.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).fields("clusterType", "balance", "_updatedDate").find({suppressHooks: true});
      console.log(queryResult);
      -
    • Returns the items that match the query.

      Parameters

      Returns Promise<WeivDataQueryResult>

      Fulfilled - A Promise that resolves to the results of the query. Rejected - Error that caused the query to fail.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .fields("clusterType", "balance", "_updatedDate")
      .find({suppressHooks: true, readConcern: true});

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Includes referenced items for the specified properties in a query's results.

      Parameters

      • Rest ...includes: IncludeObject[]

        Array of objects that you want to include with details

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .find({suppressHooks: true, readConcern: true});

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      +
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      Parameters

      • propertyName: string

        The the property in which to check for a value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property has any value.

      Parameters

      • propertyName: string

        The property in which to check for a value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Limits the number of items the query returns.

      Parameters

      • limit: number

        The number of items to return, which is also the pageSize of the results object.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .limit(20)
      .find();

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is less than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      +
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Sets the number of items to skip before returning query results.

      Parameters

      • skip: number

        The number of items to skip in the query results before returning the results.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .skip(20)
      .limit(200)
      .find();

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      +
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the beginning of the specified property value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkInsert.html b/docs/functions/bulkInsert.html index 6102d107..b9d0132a 100644 --- a/docs/functions/bulkInsert.html +++ b/docs/functions/bulkInsert.html @@ -5,4 +5,4 @@

    Returns Promise<BulkInsertResult>

    Fulfilled - The results of the bulk insert. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk inserted
    const itemsToInsert = [{...}, {...}, {...}]

    const result = await weivData.bulkInsert("Clusters/Odunpazari", itemsToInsert)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkRemove.html b/docs/functions/bulkRemove.html index 41f2538d..bccac970 100644 --- a/docs/functions/bulkRemove.html +++ b/docs/functions/bulkRemove.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkRemoveResult>

    Fulfilled - The results of the bulk remove. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item IDs that will be bulk removed
    const itemsToRemove = ["...", "...", "..."]

    const result = await weivData.bulkRemove("Clusters/Odunpazari", itemsToRemove)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkSave.html b/docs/functions/bulkSave.html index bf2aeef6..b4701dc5 100644 --- a/docs/functions/bulkSave.html +++ b/docs/functions/bulkSave.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkSaveResult>

    Fulfilled - The results of the bulk save. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk saved
    const itemsToSave = [{...}, {...}, {...}]

    const result = await weivData.bulkSave("Clusters/Odunpazari", itemsToSave)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkUpdate.html b/docs/functions/bulkUpdate.html index 67ae6d91..b6b6a877 100644 --- a/docs/functions/bulkUpdate.html +++ b/docs/functions/bulkUpdate.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkUpdateResult>

    Fulfilled - The results of the bulk save. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk updated
    const itemsToUpdate = [{...}, {...}, {...}]

    const result = await weivData.bulkUpdate("Clusters/Odunpazari", itemsToUpdate)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/createCollection.html b/docs/functions/createCollection.html index 8dec780a..64321149 100644 --- a/docs/functions/createCollection.html +++ b/docs/functions/createCollection.html @@ -1,6 +1,8 @@ createCollection | WeivData Library Documentation - ExWeiv Apps
    • Creates a new collection inside of a selected database. (User must have createCollection permission inside MongoDB dashboard, you can also use suppressAuth with options).

      -

      Parameters

      • collectionId: string

        CollectionID (/).

        +

        Parameters

        • collectionId: string

          CollectionID (< database >/< collection >).

        • Optional options: WeivDataOptions

          An object containing options to use when processing this operation.

        • Optional createOptions: CreateCollectionOptions

          Native options of MongoDB driver when creating a collection. Checkout here.

        Returns Promise<Collection>

        Fulfilled - The Collection cursor of native MongoDB driver.

        -

    Generated using TypeDoc

    \ No newline at end of file +

    Example

    import { createCollection } from '@exweiv/weiv-data';

    createCollection('Database/NewCollectionName', { suppressAuth: true }); +
    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/deleteCollection.html b/docs/functions/deleteCollection.html index 7084e221..3b9fbf51 100644 --- a/docs/functions/deleteCollection.html +++ b/docs/functions/deleteCollection.html @@ -1,6 +1,8 @@ deleteCollection | WeivData Library Documentation - ExWeiv Apps
    • Deletes a collection inside of a selected database. (User must have dropCollection permission inside MongoDB dashboard, you can also use suppressAuth with options).

      -

      Parameters

      • collectionId: string

        CollectionID (/).

        +

        Parameters

        • collectionId: string

          CollectionID (< database >/< collection >).

        • Optional options: WeivDataOptions

          An object containing options to use when processing this operation.

        • Optional deleteOptions: DropCollectionOptions

          Native options of MongoDB driver when deleting a collection. Checkout here.

        Returns Promise<boolean>

        Fulfilled - True if succeed.

        -

    Generated using TypeDoc

    \ No newline at end of file +

    Example

    import { deleteCollection } from '@exweiv/weiv-data';

    deleteCollection('Database/ExistingCollectionName', { suppressAuth: true }); +
    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/findOne.html b/docs/functions/findOne.html index cd5094db..498debde 100644 --- a/docs/functions/findOne.html +++ b/docs/functions/findOne.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const filteredItem = await weivData.findOne("Db/Collection", "name", "John");
    console.log(filteredItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/flushCache.html b/docs/functions/flushCache.html index 9496e1ec..1a79a9bd 100644 --- a/docs/functions/flushCache.html +++ b/docs/functions/flushCache.html @@ -1,3 +1,3 @@ flushCache | WeivData Library Documentation - ExWeiv Apps
    • Use when you want to flush the caches internally. You can choose caches to flush or pass empty array to flush all of them.

      Parameters

      • Optional filters: CacheSelections[]

        Filter which cache to flush. Pass empty array to flush all of them.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/get.html b/docs/functions/get.html index e54939f8..967bbfba 100644 --- a/docs/functions/get.html +++ b/docs/functions/get.html @@ -5,4 +5,4 @@

    Returns Promise<Item | null>

    Fulfilled - The retrieved item or null if not found. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item ID
    const itemId = "..."

    const result = await weivData.get("Clusters/All", itemId)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndRemove.html b/docs/functions/getAndRemove.html index af2d63e2..ec55dc0c 100644 --- a/docs/functions/getAndRemove.html +++ b/docs/functions/getAndRemove.html @@ -5,4 +5,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const removedItem = await weivData.getAndRemove("Db/Collection", itemId);
    console.log(removedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndReplace.html b/docs/functions/getAndReplace.html index 83084da7..80808357 100644 --- a/docs/functions/getAndReplace.html +++ b/docs/functions/getAndReplace.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const replacedItem = await weivData.getAndReplace("Db/Collection", itemId, {...});
    console.log(replacedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndUpdate.html b/docs/functions/getAndUpdate.html index 5fbc8a0a..4ad05503 100644 --- a/docs/functions/getAndUpdate.html +++ b/docs/functions/getAndUpdate.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const updatedItem = await weivData.getAndUpdate("Db/Collection", itemId, {...});
    console.log(updatedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/idConverter.html b/docs/functions/idConverter.html index eba022d5..65c7f1a9 100644 --- a/docs/functions/idConverter.html +++ b/docs/functions/idConverter.html @@ -2,4 +2,4 @@

    Parameters

    • id: string | ObjectId

      ID you want to convert can be string or a valid ObjectId

    • Optional stringMethod: "base64" | "hex"

      Optional converting method can be "base64" or "hex" defaults to "hex"

    Returns ObjectId | string

    ObjectId or string reverse of the input

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/increment.html b/docs/functions/increment.html index 94e4802d..e178d941 100644 --- a/docs/functions/increment.html +++ b/docs/functions/increment.html @@ -7,4 +7,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.increment("Db/Collection", itemId, "numberField", 18 {...});
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/insert.html b/docs/functions/insert.html index 063190c2..dd8743db 100644 --- a/docs/functions/insert.html +++ b/docs/functions/insert.html @@ -5,4 +5,4 @@

    Returns Promise<Item>

    Fulfilled - The item that was added. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item that will be inserted
    const item = {...}

    const result = await weivData.insert("Clusters/All", item)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/insertReference.html b/docs/functions/insertReference.html index 0c5099b8..f5c27e7b 100644 --- a/docs/functions/insertReference.html +++ b/docs/functions/insertReference.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been inserted. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be inserted. `ItemId[]`
    const cpus = ["cpuId2", "cpuId4"]

    const result = await weivData.insertReference("Clusters/Ortakoy", "availableCPUs", itemId, cpus)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/isReferenced.html b/docs/functions/isReferenced.html index ba086c06..163d15a8 100644 --- a/docs/functions/isReferenced.html +++ b/docs/functions/isReferenced.html @@ -7,4 +7,4 @@

    Returns Promise<boolean>

    Fulfilled - Whether the referring item contains a reference to the referenced item or not. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be checked if exists. `ItemId[]`
    const cpus = ["cpuId1"]

    const result = await weivData.isReferenced("Clusters/Ortakoy", "availableCPUs", itemId, cpus);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/listCollections.html b/docs/functions/listCollections.html index 42609a0a..37fae25b 100644 --- a/docs/functions/listCollections.html +++ b/docs/functions/listCollections.html @@ -4,4 +4,6 @@
  • Optional filter: Document

    MongoDB native filtering options. Read more in native docs.

  • Optional listOptions: ListCollectionsOptions

    MongoDB native listCollections options. Read more in native docs.

  • Returns Promise<ListCollectionsCursor>

    Fulfilled - Native ListCollectionsCursor of MongoDB driver.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Example

    import { listCollections } from '@exweiv/weiv-data';

    listCollections('DatabaseName', { suppressAuth: true }); +
    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/multiply.html b/docs/functions/multiply.html index f44f98b5..5d8d5a23 100644 --- a/docs/functions/multiply.html +++ b/docs/functions/multiply.html @@ -7,4 +7,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.multiply("Db/Collection", itemId, "numberField", 3 {...});
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/native.html b/docs/functions/native.html index 8a8b27ba..7da4efb9 100644 --- a/docs/functions/native.html +++ b/docs/functions/native.html @@ -6,4 +6,4 @@

    Returns Promise<Collection>

    Fulfilled - Native MongoDB Collection cursor.

    Example

    import weivData from '@exweiv/weiv-data';

    const nativeCollectionObject = await weivData.native("Finance/Income", false);

    // Perform actions with native collection cursor provided by MongoDB
    // Check [MongoDB Atlas APIs (JS)](https://mongodb.github.io/node-mongodb-native/5.9/) to udnerstand how to use it.
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/pull.html b/docs/functions/pull.html index 0c63a442..7acaba58 100644 --- a/docs/functions/pull.html +++ b/docs/functions/pull.html @@ -8,4 +8,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.pull("Db/Collection", itemId, "arrField", [...], -1);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/push.html b/docs/functions/push.html index d2c377f6..05925d2a 100644 --- a/docs/functions/push.html +++ b/docs/functions/push.html @@ -8,4 +8,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.push("Db/Collection", itemId, "arrField", [...], -1);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/queryReferenced.html b/docs/functions/queryReferenced.html index 93ad9a16..cfa76abb 100644 --- a/docs/functions/queryReferenced.html +++ b/docs/functions/queryReferenced.html @@ -8,4 +8,4 @@

    Returns Promise<WeivDataQueryReferencedResult>

    Fulfilled - The referenced items. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item ID that will be used when searching for references
    const itemId = "..."

    const result = await weivData.queryReferenced("Clusters/All", "clusterLocations", itemId, {readConcern: true})

    if (result.hasNext()) {
    const nextPage = await result.next();
    console.log(result, nextPage);
    } else {
    console.log(result);
    }
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/remove.html b/docs/functions/remove.html index e63748a5..002f077d 100644 --- a/docs/functions/remove.html +++ b/docs/functions/remove.html @@ -5,4 +5,4 @@

    Returns Promise<Item | null>

    Fulfilled - The removed item, or null if the item was not found. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // ID of item that will be removed
    const itemId = "..."

    const result = await weivData.remove("Clusters/Riva", itemId)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/removeReference.html b/docs/functions/removeReference.html index 9473516d..bdc976c3 100644 --- a/docs/functions/removeReference.html +++ b/docs/functions/removeReference.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been removed. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be removed. `ItemId[]`
    const cpus = ["cpuId1", "cpuId3"]

    const result = await weivData.removeReference("Clusters/Ortakoy", "availableCPUs", itemId, cpus, {suppressAuth: true})
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/renameCollection.html b/docs/functions/renameCollection.html index 839a348b..79627665 100644 --- a/docs/functions/renameCollection.html +++ b/docs/functions/renameCollection.html @@ -1,7 +1,9 @@ renameCollection | WeivData Library Documentation - ExWeiv Apps
    • Renames a collection inside of a selected database. (User must have renameCollection permission inside MongoDB dashboard, you can also use suppressAuth with options).

      -

      Parameters

      • collectionId: string

        CollectionID (/).

        +

        Parameters

        • collectionId: string

          CollectionID (< database >/< collection >).

        • newCollectionName: string

          New name of collection.

        • Optional options: WeivDataOptions

          An object containing options to use when processing this operation.

        • Optional renameOptions: RenameOptions

          Native options of MongoDB driver when renaming a collection. Checkout here.

        Returns Promise<Collection>

        Fulfilled - The Collection cursor of native MongoDB driver.

        -

    Generated using TypeDoc

    \ No newline at end of file +

    Example

    import { renameCollection } from '@exweiv/weiv-data';

    renameCollection('Database/ExistingCollectionName', 'NewCollectionName', { suppressAuth: true }); +
    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/replace.html b/docs/functions/replace.html index e613d751..48de3930 100644 --- a/docs/functions/replace.html +++ b/docs/functions/replace.html @@ -6,4 +6,4 @@

    Returns Promise<Item>

    Fulfilled - The object that was replaced. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item with an id
    const updatedVersion = {...}
    // Options for the operation
    const options = {suppressHooks: true};

    const result = await weivData.replace("Clusters/IST57", updatedVersion, options)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/replaceReferences.html b/docs/functions/replaceReferences.html index d7eb35fb..06ae4031 100644 --- a/docs/functions/replaceReferences.html +++ b/docs/functions/replaceReferences.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been inserted. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // New references
    const cpus = ["cpuId1", "cpuId2", "cpuId3", ...]

    const result = await weivData.replaceReferences("Clusters/Ortakoy", "availableCPUs", itemId, cpus, {suppressAuth: true})
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/save.html b/docs/functions/save.html index a6201a50..834f1ffa 100644 --- a/docs/functions/save.html +++ b/docs/functions/save.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataSaveResult>

    Fulfilled - The item that was either inserted or updated, depending on whether it previously existed in the collection. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item/object for save operation
    const item = {
    location: "Riva 7",
    _id: "...", // Item id (optional)
    availableCPUs: ["M1", "A7", "R1"]
    }

    const result = await weivData.save("Clusters/Riva", itemData)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/truncate.html b/docs/functions/truncate.html index 1749b8d3..3a227ef3 100644 --- a/docs/functions/truncate.html +++ b/docs/functions/truncate.html @@ -4,4 +4,4 @@

    Returns Promise<boolean>

    Fulfilled - When the items have been removed. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    const result = await weivData.truncate("Clusters/Uskudar");
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/update.html b/docs/functions/update.html index 976c6d1a..17b1b58c 100644 --- a/docs/functions/update.html +++ b/docs/functions/update.html @@ -9,4 +9,4 @@

    Returns Promise<Item>

    Fulfilled - The object that was updated. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item with an id
    const updatedVersion = {...}
    // Options for the operation
    const options = {suppressHooks: true};

    const result = await weivData.update("Clusters/IST12", updatedVersion, options)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/AggregateRunOptions.html b/docs/interfaces/AggregateRunOptions.html index 3043b8cd..61aa0ed5 100644 --- a/docs/interfaces/AggregateRunOptions.html +++ b/docs/interfaces/AggregateRunOptions.html @@ -1,6 +1,6 @@ AggregateRunOptions | WeivData Library Documentation - ExWeiv Apps

    Options to use when running an aggregation.

    -
    interface AggregateRunOptions {
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
    }

    Properties

    interface AggregateRunOptions {
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
    }

    Properties

    readConcern?: ReadConcernLevel

    Enable consistent read from clusters. This will change the readConvern to "majority", in this way you'll get the most up to date data.

    -
    suppressAuth?: boolean

    Bypass permissions of user when using aggregate. When set to true admin uri will be used automatically.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    suppressAuth?: boolean

    Bypass permissions of user when using aggregate. When set to true admin uri will be used automatically.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/BulkInsertResult.html b/docs/interfaces/BulkInsertResult.html index 48c5089d..8cbd1a9c 100644 --- a/docs/interfaces/BulkInsertResult.html +++ b/docs/interfaces/BulkInsertResult.html @@ -1,5 +1,5 @@ BulkInsertResult | WeivData Library Documentation - ExWeiv Apps

    Adds a number of items to a collection.

    -
    interface BulkInsertResult {
        inserted: number;
        insertedItemIds: {
            [key: number]: ObjectId;
        };
        insertedItems: Items;
    }

    Properties

    interface BulkInsertResult {
        inserted: number;
        insertedItemIds: {
            [key: number]: ObjectId;
        };
        insertedItems: Items;
    }

    Properties

    inserted: number
    insertedItemIds: {
        [key: number]: ObjectId;
    }

    Type declaration

    • [key: number]: ObjectId
    insertedItems: Items

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    inserted: number
    insertedItemIds: {
        [key: number]: ObjectId;
    }

    Type declaration

    • [key: number]: ObjectId
    insertedItems: Items

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/HookContext.html b/docs/interfaces/HookContext.html index 6c36fc8b..283db54f 100644 --- a/docs/interfaces/HookContext.html +++ b/docs/interfaces/HookContext.html @@ -1,5 +1,5 @@ -HookContext | WeivData Library Documentation - ExWeiv Apps
    interface HookContext {
        collectionName: string;
        dbName: string;
        userId?: string;
        userRoles: undefined | any[];
    }

    Properties

    collectionName +HookContext | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    collectionName: string
    dbName: string
    userId?: string
    userRoles: undefined | any[]

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/IncludeObject.html b/docs/interfaces/IncludeObject.html index 5c9ca2c0..9131bfea 100644 --- a/docs/interfaces/IncludeObject.html +++ b/docs/interfaces/IncludeObject.html @@ -1,13 +1,13 @@ -IncludeObject | WeivData Library Documentation - ExWeiv Apps
    interface IncludeObject {
        as?: string;
        collectionName: string;
        countItems?: boolean;
        fieldName: string;
        foreignField?: string;
        maxItems?: number;
    }

    Properties

    as? +IncludeObject | WeivData Library Documentation - ExWeiv Apps
    interface IncludeObject {
        as?: string;
        collectionName: string;
        countItems?: boolean;
        fieldName: string;
        foreignField?: string;
        maxItems?: number;
    }

    Properties

    as?: string

    Custom return name for included items. Defaults to fieldName.

    -
    collectionName: string

    Collection of referenced item/s (only collection name)

    -
    countItems?: boolean

    Enable counting total items or not. Defaults to false.

    -
    fieldName: string

    Property/field name of referenced items in the current item.

    -
    foreignField?: string

    Foreign field name. Defaults to _id.

    -
    maxItems?: number

    Maximum number of items to include. Defaults to 50.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    collectionName: string

    Collection of referenced item/s (only collection name)

    +
    countItems?: boolean

    Enable counting total items or not. Defaults to false.

    +
    fieldName: string

    Property/field name of referenced items in the current item.

    +
    foreignField?: string

    Foreign field name. Defaults to _id.

    +
    maxItems?: number

    Maximum number of items to include. Defaults to 50.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataAggregateResult.html b/docs/interfaces/WeivDataAggregateResult.html index c9280c5c..7906bf3e 100644 --- a/docs/interfaces/WeivDataAggregateResult.html +++ b/docs/interfaces/WeivDataAggregateResult.html @@ -1,10 +1,10 @@ -WeivDataAggregateResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataAggregateResult {
        items: Items;
        length: number;
        hasNext(): boolean;
        next(): Promise<WeivDataAggregateResult>;
    }

    Properties

    items +WeivDataAggregateResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataAggregateResult {
        items: Items;
        length: number;
        hasNext(): boolean;
        next(): Promise<WeivDataAggregateResult>;
    }

    Properties

    Methods

    Properties

    items: Items

    Gets the aggregated values.

    -
    length: number

    Returns the number of values in the aggregate results.

    -

    Methods

    length: number

    Returns the number of values in the aggregate results.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkRemoveResult.html b/docs/interfaces/WeivDataBulkRemoveResult.html index 3788976d..8207f7a6 100644 --- a/docs/interfaces/WeivDataBulkRemoveResult.html +++ b/docs/interfaces/WeivDataBulkRemoveResult.html @@ -1,6 +1,6 @@ WeivDataBulkRemoveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkRemove function.

    -
    interface WeivDataBulkRemoveResult {
        removed: number;
        removedItemIds: ItemIDs;
    }

    Properties

    interface WeivDataBulkRemoveResult {
        removed: number;
        removedItemIds: ItemIDs;
    }

    Properties

    removed: number

    Number of removed items.

    -
    removedItemIds: ItemIDs

    Removed item ids.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    removedItemIds: ItemIDs

    Removed item ids.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkSaveResult.html b/docs/interfaces/WeivDataBulkSaveResult.html index a9235c18..4b437ae8 100644 --- a/docs/interfaces/WeivDataBulkSaveResult.html +++ b/docs/interfaces/WeivDataBulkSaveResult.html @@ -1,10 +1,10 @@ WeivDataBulkSaveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkSave function.

    -
    interface WeivDataBulkSaveResult {
        inserted: number;
        insertedItemIds: ItemIDs;
        savedItems: Items;
        updated: number;
    }

    Properties

    interface WeivDataBulkSaveResult {
        inserted: number;
        insertedItemIds: ItemIDs;
        savedItems: Items;
        updated: number;
    }

    Properties

    inserted: number

    Number of inserted items.

    -
    insertedItemIds: ItemIDs

    Inserted item ids.

    -
    savedItems: Items

    Saved items.

    -
    updated: number

    Number of updated items.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    insertedItemIds: ItemIDs

    Inserted item ids.

    +
    savedItems: Items

    Saved items.

    +
    updated: number

    Number of updated items.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkUpdateResult.html b/docs/interfaces/WeivDataBulkUpdateResult.html index ca621faa..8b8f87d2 100644 --- a/docs/interfaces/WeivDataBulkUpdateResult.html +++ b/docs/interfaces/WeivDataBulkUpdateResult.html @@ -1,6 +1,6 @@ WeivDataBulkUpdateResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkUpdate function.

    -
    interface WeivDataBulkUpdateResult {
        updated: number;
        updatedItems: Items;
    }

    Properties

    interface WeivDataBulkUpdateResult {
        updated: number;
        updatedItems: Items;
    }

    Properties

    updated: number

    Number of updated items.

    -
    updatedItems: Items

    Updated items.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    updatedItems: Items

    Updated items.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataOptions.html b/docs/interfaces/WeivDataOptions.html index cedee58b..85056b84 100644 --- a/docs/interfaces/WeivDataOptions.html +++ b/docs/interfaces/WeivDataOptions.html @@ -1,6 +1,6 @@ WeivDataOptions | WeivData Library Documentation - ExWeiv Apps

    An object containing options to use when processing an operation in weiv-data.

    -
    interface WeivDataOptions {
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    interface WeivDataOptions {
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataOptionsCache.html b/docs/interfaces/WeivDataOptionsCache.html index c233d801..c3ee1fb0 100644 --- a/docs/interfaces/WeivDataOptionsCache.html +++ b/docs/interfaces/WeivDataOptionsCache.html @@ -1,8 +1,8 @@ WeivDataOptionsCache | WeivData Library Documentation - ExWeiv Apps

    Control the cache mechanism in weiv-data and optimize your read operations by saving results. Cache is disabled by default.

    -
    interface WeivDataOptionsCache {
        cacheTimeout?: number;
        enableCache?: boolean;
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    interface WeivDataOptionsCache {
        cacheTimeout?: number;
        enableCache?: boolean;
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    cacheTimeout?: number
    enableCache?: boolean
    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    cacheTimeout?: number
    enableCache?: boolean
    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataQueryReferencedResult.html b/docs/interfaces/WeivDataQueryReferencedResult.html index 64f6615c..27b730f1 100644 --- a/docs/interfaces/WeivDataQueryReferencedResult.html +++ b/docs/interfaces/WeivDataQueryReferencedResult.html @@ -1,16 +1,16 @@ WeivDataQueryReferencedResult | WeivData Library Documentation - ExWeiv Apps

    Result object of queryReferenced function.

    -
    interface WeivDataQueryReferencedResult {
        items: Items;
        totalCount: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryReferencedResult>;
        prev(): Promise<WeivDataQueryReferencedResult>;
    }

    Properties

    interface WeivDataQueryReferencedResult {
        items: Items;
        totalCount: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryReferencedResult>;
        prev(): Promise<WeivDataQueryReferencedResult>;
    }

    Properties

    items: Items

    Returns the items that match the reference query.

    -
    totalCount: number

    Returns the total number of items that match the reference query.

    -

    Methods

    totalCount: number

    Returns the total number of items that match the reference query.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataQueryResult.html b/docs/interfaces/WeivDataQueryResult.html index e21a64ec..4510a6c6 100644 --- a/docs/interfaces/WeivDataQueryResult.html +++ b/docs/interfaces/WeivDataQueryResult.html @@ -1,4 +1,4 @@ -WeivDataQueryResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataQueryResult {
        currentPage: number;
        items: Items;
        length: number;
        pageSize: number;
        totalCount: number;
        totalPages: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryResult>;
        prev(): Promise<WeivDataQueryResult>;
    }

    Properties

    currentPage +WeivDataQueryResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataQueryResult {
        currentPage: number;
        items: Items;
        length: number;
        pageSize: number;
        totalCount: number;
        totalPages: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryResult>;
        prev(): Promise<WeivDataQueryResult>;
    }

    Properties

    Properties

    currentPage: number

    Returns the index of the current results page number.

    -
    items: Items

    Returns the items that match the query.

    -
    length: number

    Returns the number of items in the current results page.

    -
    pageSize: number

    Returns the query page size.

    -
    totalCount: number

    Returns the total number of items that match the query.

    -
    totalPages: number

    Returns the total number of pages the query produced.

    -

    Methods

    items: Items

    Returns the items that match the query.

    +
    length: number

    Returns the number of items in the current results page.

    +
    pageSize: number

    Returns the query page size.

    +
    totalCount: number

    Returns the total number of items that match the query.

    +
    totalPages: number

    Returns the total number of pages the query produced.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataSaveResult.html b/docs/interfaces/WeivDataSaveResult.html index fb7d6084..15e6be68 100644 --- a/docs/interfaces/WeivDataSaveResult.html +++ b/docs/interfaces/WeivDataSaveResult.html @@ -1,6 +1,6 @@ WeivDataSaveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for save function.

    -
    interface WeivDataSaveResult {
        item: Document;
        upsertedId?: ItemID;
    }

    Properties

    interface WeivDataSaveResult {
        item: Document;
        upsertedId?: ItemID;
    }

    Properties

    Properties

    item: Document

    Saved item.

    -
    upsertedId?: ItemID

    Inserted item id. (Returned if item is inserted)

    -

    Generated using TypeDoc

    \ No newline at end of file +
    upsertedId?: ItemID

    Inserted item id. (Returned if item is inserted)

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/CacheSelections.html b/docs/types/CacheSelections.html index 6cc7442e..82522da8 100644 --- a/docs/types/CacheSelections.html +++ b/docs/types/CacheSelections.html @@ -1 +1 @@ -CacheSelections | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +CacheSelections | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/CollectionID.html b/docs/types/CollectionID.html index 25339617..9abf3f60 100644 --- a/docs/types/CollectionID.html +++ b/docs/types/CollectionID.html @@ -1,4 +1,4 @@ CollectionID | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/EnableVisitorID.html b/docs/types/EnableVisitorID.html index 42779ebe..31fe8b8b 100644 --- a/docs/types/EnableVisitorID.html +++ b/docs/types/EnableVisitorID.html @@ -1,3 +1,3 @@ EnableVisitorID | WeivData Library Documentation - ExWeiv Apps
    EnableVisitorID: boolean

    When you want to get not just only members or admins id (member id in Wix) also visitors id enable this and system will create a data using wix-data and then it will use the _owner field to get the current user temp id. Note: This will slow down the operation and not recommended always so do not use it when you don't need it. Carefully design your database systems/models and your apps workflows because you shouldn't need this in most cases.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HookArgs.html b/docs/types/HookArgs.html index 95795956..1860c37d 100644 --- a/docs/types/HookArgs.html +++ b/docs/types/HookArgs.html @@ -1,2 +1,2 @@ HookArgs | WeivData Library Documentation - ExWeiv Apps
    HookArgs<HookName>: HookName extends "beforeGet"
        ? [item: ItemID, context: HookContext]
        : HookName extends "beforeCount"
            ? [item: WeivDataQuery, context: HookContext]
            : HookName extends "afterCount"
                ? [item: number, context: HookContext]
                : HookName extends "beforeQuery"
                    ? [item: WeivDataQuery, context: HookContext]
                    : HookName extends "beforeRemove"
                        ? [item: ItemID, context: HookContext]
                        : HookName extends "beforeFindOne"
                            ? [item: {
                                propertyName: string;
                                value: any;
                            }, context: HookContext]
                            : HookName extends "beforeGetAndRemove"
                                ? [item: ItemID, context: HookContext]
                                : HookName extends "beforeIncrement"
                                    ? [item: {
                                        propertyName: string;
                                        value: number;
                                    }, context: HookContext]
                                    : HookName extends "beforeMultiply"
                                        ? [item: {
                                            propertyName: string;
                                            value: number;
                                        }, context: HookContext]
                                        : HookName extends "beforePush"
                                            ? [item: {
                                                propertyName: string;
                                                value: any;
                                            }, context: HookContext]
                                            : HookName extends "beforePull"
                                                ? [item: {
                                                    propertyName: string;
                                                    value: any;
                                                }, context: HookContext]
                                                : [item: Item, context: HookContext]

    List of hook params and values.

    -

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HookName.html b/docs/types/HookName.html index 78bce8ce..b864ac98 100644 --- a/docs/types/HookName.html +++ b/docs/types/HookName.html @@ -5,4 +5,4 @@

    You don't need to return a value in your hooks but if you return value should align with [HookResults](https://weiv-data.web.app/types/HooksResult.html). You can use async functions or not async functions in your hooks.

    Sometimes it takes few minutes to let hooks start working. Publish or save your site when you define new hooks.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HooksResults.html b/docs/types/HooksResults.html index 253f1aea..5b985a4f 100644 --- a/docs/types/HooksResults.html +++ b/docs/types/HooksResults.html @@ -1,2 +1,2 @@ HooksResults | WeivData Library Documentation - ExWeiv Apps
    HooksResults<HookName>: HookName extends "beforeGet"
        ? ItemID
        : HookName extends "beforeCount"
            ? WeivDataQuery
            : HookName extends "afterCount"
                ? number
                : HookName extends "beforeQuery"
                    ? WeivDataQuery
                    : HookName extends "beforeRemove"
                        ? ItemID
                        : HookName extends "beforeFindOne"
                            ? {
                                propertyName: string;
                                value: any;
                            }
                            : HookName extends "beforeGetAndRemove"
                                ? ItemID
                                : HookName extends "beforeIncrement"
                                    ? {
                                        propertyName: string;
                                        value: number;
                                    }
                                    : HookName extends "beforeMultiply"
                                        ? {
                                            propertyName: string;
                                            value: number;
                                        }
                                        : HookName extends "beforePush"
                                            ? {
                                                propertyName: string;
                                                value: any;
                                            }
                                            : HookName extends "beforePull"
                                                ? {
                                                    propertyName: string;
                                                    value: any;
                                                }
                                                : Item

    List of expected values from hooks if returns.

    -

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/Item.html b/docs/types/Item.html index 477b317d..1098b2eb 100644 --- a/docs/types/Item.html +++ b/docs/types/Item.html @@ -1,2 +1,2 @@ Item | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ItemID.html b/docs/types/ItemID.html index 7452ad71..d6d09b78 100644 --- a/docs/types/ItemID.html +++ b/docs/types/ItemID.html @@ -1,4 +1,4 @@ ItemID | WeivData Library Documentation - ExWeiv Apps
    ItemID: string | ObjectId

    Item id can be string or ObjectID, inside the library it's in ObjectId type in most cases but in your code it can be one of them. Don't worry you can always use string versions of ObjectIds weiv-data will convert them to ObjectId if needed.

    (We use ObjectId type to get better performance in MongoDB)

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ItemIDs.html b/docs/types/ItemIDs.html index a4865cc5..4d5d334b 100644 --- a/docs/types/ItemIDs.html +++ b/docs/types/ItemIDs.html @@ -1,3 +1,3 @@ ItemIDs | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/Items.html b/docs/types/Items.html index 5beb8204..f9c10866 100644 --- a/docs/types/Items.html +++ b/docs/types/Items.html @@ -1,2 +1,2 @@ Items | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReadConcern.html b/docs/types/ReadConcern.html index 015564d3..d0ed3053 100644 --- a/docs/types/ReadConcern.html +++ b/docs/types/ReadConcern.html @@ -1,2 +1,2 @@ ReadConcern | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReferencedItem.html b/docs/types/ReferencedItem.html index b293329f..76a1fca9 100644 --- a/docs/types/ReferencedItem.html +++ b/docs/types/ReferencedItem.html @@ -1,4 +1,4 @@ ReferencedItem | WeivData Library Documentation - ExWeiv Apps
    ReferencedItem: Item | ItemID | Items | ItemIDs

    Referenced item can be the item itself that contains the _id key or directly the item id. There can be more than one referenced item and if so you can put the values we defined above in an array. So it can also be Array or Array

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReferringItem.html b/docs/types/ReferringItem.html index d50f04e2..02a72fc5 100644 --- a/docs/types/ReferringItem.html +++ b/docs/types/ReferringItem.html @@ -1,2 +1,2 @@ ReferringItem | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/SuppressAuth.html b/docs/types/SuppressAuth.html index 4b7c0a27..a2ae2e8c 100644 --- a/docs/types/SuppressAuth.html +++ b/docs/types/SuppressAuth.html @@ -1,2 +1,2 @@ SuppressAuth | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/SuppressHooks.html b/docs/types/SuppressHooks.html index 46352c33..47c88e8b 100644 --- a/docs/types/SuppressHooks.html +++ b/docs/types/SuppressHooks.html @@ -1,2 +1,2 @@ SuppressHooks | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/WeivDataQueryReferencedOptions.html b/docs/types/WeivDataQueryReferencedOptions.html index 9d1df7a7..805790ca 100644 --- a/docs/types/WeivDataQueryReferencedOptions.html +++ b/docs/types/WeivDataQueryReferencedOptions.html @@ -1 +1 @@ -WeivDataQueryReferencedOptions | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +WeivDataQueryReferencedOptions | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file From 0d981b4bbf869eed95bde0ca8026487fd6ce83e3 Mon Sep 17 00:00:00 2001 From: ExWeiv GitHub BOT Date: Tue, 12 Mar 2024 23:56:30 +0000 Subject: [PATCH 3/6] Build and Generate Docs - BOT --- docs/classes/WeivDataAggregate.html | 28 +++++----- docs/classes/WeivDataFilter.html | 36 ++++++------- docs/classes/WeivDataQuery.html | 54 +++++++++---------- docs/functions/bulkInsert.html | 2 +- docs/functions/bulkRemove.html | 2 +- docs/functions/bulkSave.html | 2 +- docs/functions/bulkUpdate.html | 2 +- docs/functions/createCollection.html | 2 +- docs/functions/deleteCollection.html | 2 +- docs/functions/findOne.html | 2 +- docs/functions/flushCache.html | 2 +- docs/functions/get.html | 2 +- docs/functions/getAndRemove.html | 2 +- docs/functions/getAndReplace.html | 2 +- docs/functions/getAndUpdate.html | 2 +- docs/functions/idConverter.html | 2 +- docs/functions/increment.html | 2 +- docs/functions/insert.html | 2 +- docs/functions/insertReference.html | 2 +- docs/functions/isReferenced.html | 2 +- docs/functions/listCollections.html | 2 +- docs/functions/multiply.html | 2 +- docs/functions/native.html | 2 +- docs/functions/pull.html | 2 +- docs/functions/push.html | 2 +- docs/functions/queryReferenced.html | 2 +- docs/functions/remove.html | 2 +- docs/functions/removeReference.html | 2 +- docs/functions/renameCollection.html | 2 +- docs/functions/replace.html | 2 +- docs/functions/replaceReferences.html | 2 +- docs/functions/save.html | 2 +- docs/functions/truncate.html | 2 +- docs/functions/update.html | 2 +- docs/interfaces/AggregateRunOptions.html | 6 +-- docs/interfaces/BulkInsertResult.html | 4 +- docs/interfaces/HookContext.html | 4 +- docs/interfaces/IncludeObject.html | 14 ++--- docs/interfaces/WeivDataAggregateResult.html | 10 ++-- docs/interfaces/WeivDataBulkRemoveResult.html | 6 +-- docs/interfaces/WeivDataBulkSaveResult.html | 10 ++-- docs/interfaces/WeivDataBulkUpdateResult.html | 6 +-- docs/interfaces/WeivDataOptions.html | 4 +- docs/interfaces/WeivDataOptionsCache.html | 4 +- .../WeivDataQueryReferencedResult.html | 14 ++--- docs/interfaces/WeivDataQueryResult.html | 22 ++++---- docs/interfaces/WeivDataSaveResult.html | 6 +-- docs/types/CacheSelections.html | 2 +- docs/types/CollectionID.html | 2 +- docs/types/EnableVisitorID.html | 2 +- docs/types/HookArgs.html | 2 +- docs/types/HookName.html | 2 +- docs/types/HooksResults.html | 2 +- docs/types/Item.html | 2 +- docs/types/ItemID.html | 2 +- docs/types/ItemIDs.html | 2 +- docs/types/Items.html | 2 +- docs/types/ReadConcern.html | 2 +- docs/types/ReferencedItem.html | 2 +- docs/types/ReferringItem.html | 2 +- docs/types/SuppressAuth.html | 2 +- docs/types/SuppressHooks.html | 2 +- .../types/WeivDataQueryReferencedOptions.html | 2 +- 63 files changed, 161 insertions(+), 161 deletions(-) diff --git a/docs/classes/WeivDataAggregate.html b/docs/classes/WeivDataAggregate.html index 30fb5428..ba1bb6ea 100644 --- a/docs/classes/WeivDataAggregate.html +++ b/docs/classes/WeivDataAggregate.html @@ -6,7 +6,7 @@
  • Language Filters (Filter aggregations based on a language)
  • More!
  • -

    Hierarchy

    • InternalWeivDataAggregateResult
      • WeivDataAggregate

    Methods

    Hierarchy

    • InternalWeivDataAggregateResult
      • WeivDataAggregate

    Methods

    ascending avg count descending @@ -24,32 +24,32 @@

    Returns WeivDataAggregate

    A WeivDataAggregate object representing the refined aggregation.

    Example

    import weivData from '@exweiv/weiv-data';

    const aggregateResult = await weivData.aggregate("Clusters/AiModels")
    .ascending("modelType")
    .run(options)

    console.log(aggregateResult);
    -
    • Refines a WeivDataAggregate to only contain the average value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the average valu

      • projectedName: string = ...

        The name of the property in the aggregation results containing the average value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .avg("trainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to contain the item count of each group in the aggregation.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("modelType", "trainedDataSize")
      .count()
      .run(options)

      console.log(aggregateResult);
      -
    • Adds a sort to an aggregation, sorting by the items or groups by the specified properties in descending order.

      Parameters

      • propertyName: string

        The properties used in the sort.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .descending("modelType")
      .run(options)

      console.log(aggregateResult);
      -
    • Filters out items from being used in an aggregation.

      Parameters

      • filter: WeivDataFilter

        The filter to use to filter out items from being used in the aggregation.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let filter = weivData.filter().eq("modelType", "S1");

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .filter(filter)
      .run(options)

      console.log(aggregateResult);
      -
    • Groups items together in an aggregation.

      Parameters

      • Rest ...propertyName: string[]

        The property or properties to group on.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("t2Members", "t1Members")
      .run(options)

      console.log(aggregateResult);
      -
    • Filters out groups from being returned from an aggregation.

      Note: possible bug! This function may not work as you expect!

      @@ -57,37 +57,37 @@

    Returns WeivDataAggregate

    A WeivDataAggregate object representing the refined aggregation.

    Example

    import weivData from '@exweiv/weiv-data';

    let having = weivData.filter().gt("trainedDataSize", 100000000)

    const aggregateResult = await weivData.aggregate("Clusters/AiModels")
    .having(having)
    .max("trainedDataSize", "maxTrainedDataSize")
    .run(options)

    console.log(aggregateResult);
    -
    • Limits the number of items or groups the aggregation returns.

      Parameters

      • limit: number

        The number of items or groups to return.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let having = weivData.filter().gt("trainedDataSize", 100000000)

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .having(having)
      .max("trainedDataSize", "maxTrainedDataSize")
      .limit(150)
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to only contain the maximum value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the maximum value.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the maximum value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let having = weivData.filter().gt("trainedDataSize", 100000000)

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .having(having)
      .max("trainedDataSize", "maxTrainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to only contain the minimum value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the minimum value.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the minimum value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .min("trainedDataSize", "minTrainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Runs the aggregation and returns the results.

      Parameters

      Returns Promise<WeivDataAggregateResult>

      Fulfilled - A Promise that resolves to the results of the aggregation. Rejected - Error that caused the aggregation to fail.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter().gt("trainedDataSize", 100000000);

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("modelType", "trainedDataSize", "t1Members")
      .filter(filter)
      .descending("trainedDataSize")
      .skip(5)
      .limit(118)
      .run({suppressAuth: true})

      console.log(aggregateResult);
      -
    • Sets the number of items or groups to skip before returning aggregation results.

      Parameters

      • skip: number

        The number of items or groups to skip in the aggregation results before returning the results.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .max("trainedDataSize", "maxTrainedDataSize")
      .skip(18)
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to contain the sum from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the sum.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the sum.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .sum("trainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/WeivDataFilter.html b/docs/classes/WeivDataFilter.html index 51012465..a8d01dd5 100644 --- a/docs/classes/WeivDataFilter.html +++ b/docs/classes/WeivDataFilter.html @@ -5,7 +5,7 @@
  • AI (AI based auto generated filters for some operations such as searhing products etc.)
  • Language (Language filtering method.)
  • -

    Methods

    and +

    Methods

    and between contains endsWith @@ -27,95 +27,95 @@

    Returns WeivDataFilter

    A WeivDataFilter object representing the refined filters.

    Example

    import weivData from '@exweiv/weiv-data';

    const orFilter = weivData.filter("Clusters/IST12").eq("balance", 0);
    const andFilter = weivData.filter("Clusters/IST12").gt("balance", 10000).or(orFilter);

    const filter = weivData.filter("Clusters/IST12")
    .eq("memberTier", 1)
    .and(andFilter)
    -
    • Refines a query or filter to match items whose specified property value is within a specified range.

      +
    • Refines a query or filter to match items whose specified property value is within a specified range.

      Parameters

      • propertyName: string

        The property whose value will be compared with rangeStart and rangeEnd.

      • rangeStart: any

        The beginning value of the range to match against.

      • rangeEnd: any

        The ending value of the range to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").between("memberTier", 1, 2);
      -
    • Refines a query or filter to match items whose specified property value contains a specified string.

      Parameters

      • propertyName: string
      • string: string

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").contains("location", "IST");
      -
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the end of the specified property value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").endsWith("location", "1-2");
      -
    • Refines a query or filter to match items whose specified property value equals the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Istanbul").eq("location", "IST 1-2");
      -
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Uskudar").ge("balance", 1699);
      -
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Uskudar").gt("balance", 1699);
      -
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Besiktas")
      .gt("balance", 1699)
      .hasAll("availableCPUs", ["M1", "S1", "F2", "E7"])
      -
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Besiktas")
      .eq("genericAPIsEnabled", true)
      .hasSome("availableCPUs", ["M1", "T1"])
      -
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      Parameters

      • propertyName: string

        The the property in which to check for a value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").isEmpty("genericAPIsEnabled")
      -
    • Refines a query or filter to match items whose specified property has any value.

      Parameters

      • propertyName: string

        The property in which to check for a value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").isNotEmpty("genericAPIsEnabled")
      -
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").le("maxCPUTime", 200)
      -
    • Refines a query or filter to match items whose specified property value is less than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").lt("maxCPUTime", 50)
      -
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").ne("location", "Ankara")
      -
    • Adds a not condition to the query or filter.

      Parameters

      • query: WeivDataFilter

        A query to add to the initial query as a not condition.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const notFilter = weivData.filter("Clusters/IST12").eq("balance", 0).gt("balance", 1000);

      const filter = weivData.filter("Clusters/IST12")
      .eq("memberTier", 1)
      .not(notFilter)
      -
    • Adds an or condition to the query or filter.

      Parameters

      • query: WeivDataFilter

        A query to add to the initial query as an or condition.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const orFilter = weivData.filter("Clusters/IST12").eq("balance", 0);
      const andFilter = weivData.filter("Clusters/IST12").gt("balance", 10000).or(orFilter);

      const filter = weivData.filter("Clusters/IST12")
      .eq("memberTier", 1)
      .and(andFilter)
      -
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the beginning of the specified property value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").startsWith("location", "IST")
      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/WeivDataQuery.html b/docs/classes/WeivDataQuery.html index 92d78f36..931dcd09 100644 --- a/docs/classes/WeivDataQuery.html +++ b/docs/classes/WeivDataQuery.html @@ -7,7 +7,7 @@
  • Language (Auto language filtering)
  • More!
  • -

    Methods

    and +

    Methods

    and ascending between contains @@ -36,109 +36,109 @@

    Methods

    • Adds a sort to a query or sort, sorting by the specified properties in ascending order.

      Parameters

      • Rest ...propertyName: string[]

        The properties used in the sort.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).ascending("clusterType").find();
      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is within a specified range.

      +
    • Refines a query or filter to match items whose specified property value is within a specified range.

      Parameters

      • propertyName: string

        The property whose value will be compared with rangeStart and rangeEnd.

      • rangeStart: any

        The beginning value of the range to match against.

      • rangeEnd: any

        The ending value of the range to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value contains a specified string.

      +
    • Refines a query or filter to match items whose specified property value contains a specified string.

      Parameters

      • propertyName: string
      • string: string

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Returns the number of items that match the query.

      +
    • Returns the number of items that match the query.

      Parameters

      • options: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<number>

      Fulfilled - The number of items that match the query. Rejected - The errors that caused the rejection.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).count();
      console.log(queryResult);
      -
    • Adds a sort to a query or sort, sorting by the specified properties in descending order.

      Parameters

      • Rest ...propertyName: string[]

        The properties used in the sort.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).descending("clusterType").find();
      console.log(queryResult);
      -
    • Returns the distinct values that match the query, without duplicates.

      Parameters

      • propertyName: string

        The property whose value will be compared for distinct values.

      • options: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<WeivDataQueryResult>

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).distinct("clusterType");
      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      +
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the end of the specified property value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value equals the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Lists the fields to return in a query's results.

      Parameters

      • Rest ...propertyName: string[]

        Properties to return. To return multiple properties, pass properties as additional arguments.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).fields("clusterType", "balance", "_updatedDate").find({suppressHooks: true});
      console.log(queryResult);
      -
    • Returns the items that match the query.

      Parameters

      Returns Promise<WeivDataQueryResult>

      Fulfilled - A Promise that resolves to the results of the query. Rejected - Error that caused the query to fail.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .fields("clusterType", "balance", "_updatedDate")
      .find({suppressHooks: true, readConcern: true});

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Includes referenced items for the specified properties in a query's results.

      Parameters

      • Rest ...includes: IncludeObject[]

        Array of objects that you want to include with details

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .find({suppressHooks: true, readConcern: true});

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      +
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      Parameters

      • propertyName: string

        The the property in which to check for a value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property has any value.

      Parameters

      • propertyName: string

        The property in which to check for a value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Limits the number of items the query returns.

      Parameters

      • limit: number

        The number of items to return, which is also the pageSize of the results object.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .limit(20)
      .find();

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is less than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      +
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Sets the number of items to skip before returning query results.

      Parameters

      • skip: number

        The number of items to skip in the query results before returning the results.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .skip(20)
      .limit(200)
      .find();

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      +
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the beginning of the specified property value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkInsert.html b/docs/functions/bulkInsert.html index b9d0132a..baa5c3ed 100644 --- a/docs/functions/bulkInsert.html +++ b/docs/functions/bulkInsert.html @@ -5,4 +5,4 @@

    Returns Promise<BulkInsertResult>

    Fulfilled - The results of the bulk insert. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk inserted
    const itemsToInsert = [{...}, {...}, {...}]

    const result = await weivData.bulkInsert("Clusters/Odunpazari", itemsToInsert)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkRemove.html b/docs/functions/bulkRemove.html index bccac970..5b8c4f2a 100644 --- a/docs/functions/bulkRemove.html +++ b/docs/functions/bulkRemove.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkRemoveResult>

    Fulfilled - The results of the bulk remove. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item IDs that will be bulk removed
    const itemsToRemove = ["...", "...", "..."]

    const result = await weivData.bulkRemove("Clusters/Odunpazari", itemsToRemove)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkSave.html b/docs/functions/bulkSave.html index b4701dc5..b4a798a7 100644 --- a/docs/functions/bulkSave.html +++ b/docs/functions/bulkSave.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkSaveResult>

    Fulfilled - The results of the bulk save. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk saved
    const itemsToSave = [{...}, {...}, {...}]

    const result = await weivData.bulkSave("Clusters/Odunpazari", itemsToSave)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkUpdate.html b/docs/functions/bulkUpdate.html index b6b6a877..f67fad0c 100644 --- a/docs/functions/bulkUpdate.html +++ b/docs/functions/bulkUpdate.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkUpdateResult>

    Fulfilled - The results of the bulk save. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk updated
    const itemsToUpdate = [{...}, {...}, {...}]

    const result = await weivData.bulkUpdate("Clusters/Odunpazari", itemsToUpdate)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/createCollection.html b/docs/functions/createCollection.html index 64321149..9411faf5 100644 --- a/docs/functions/createCollection.html +++ b/docs/functions/createCollection.html @@ -5,4 +5,4 @@

    Returns Promise<Collection>

    Fulfilled - The Collection cursor of native MongoDB driver.

    Example

    import { createCollection } from '@exweiv/weiv-data';

    createCollection('Database/NewCollectionName', { suppressAuth: true });
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/deleteCollection.html b/docs/functions/deleteCollection.html index 3b9fbf51..4e5ee465 100644 --- a/docs/functions/deleteCollection.html +++ b/docs/functions/deleteCollection.html @@ -5,4 +5,4 @@

    Returns Promise<boolean>

    Fulfilled - True if succeed.

    Example

    import { deleteCollection } from '@exweiv/weiv-data';

    deleteCollection('Database/ExistingCollectionName', { suppressAuth: true });
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/findOne.html b/docs/functions/findOne.html index 498debde..e160d85d 100644 --- a/docs/functions/findOne.html +++ b/docs/functions/findOne.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const filteredItem = await weivData.findOne("Db/Collection", "name", "John");
    console.log(filteredItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/flushCache.html b/docs/functions/flushCache.html index 1a79a9bd..5af3b70b 100644 --- a/docs/functions/flushCache.html +++ b/docs/functions/flushCache.html @@ -1,3 +1,3 @@ flushCache | WeivData Library Documentation - ExWeiv Apps
    • Use when you want to flush the caches internally. You can choose caches to flush or pass empty array to flush all of them.

      Parameters

      • Optional filters: CacheSelections[]

        Filter which cache to flush. Pass empty array to flush all of them.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/get.html b/docs/functions/get.html index 967bbfba..39adfefa 100644 --- a/docs/functions/get.html +++ b/docs/functions/get.html @@ -5,4 +5,4 @@

    Returns Promise<Item | null>

    Fulfilled - The retrieved item or null if not found. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item ID
    const itemId = "..."

    const result = await weivData.get("Clusters/All", itemId)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndRemove.html b/docs/functions/getAndRemove.html index ec55dc0c..3368ffd7 100644 --- a/docs/functions/getAndRemove.html +++ b/docs/functions/getAndRemove.html @@ -5,4 +5,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const removedItem = await weivData.getAndRemove("Db/Collection", itemId);
    console.log(removedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndReplace.html b/docs/functions/getAndReplace.html index 80808357..c280ff21 100644 --- a/docs/functions/getAndReplace.html +++ b/docs/functions/getAndReplace.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const replacedItem = await weivData.getAndReplace("Db/Collection", itemId, {...});
    console.log(replacedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndUpdate.html b/docs/functions/getAndUpdate.html index 4ad05503..7d85064d 100644 --- a/docs/functions/getAndUpdate.html +++ b/docs/functions/getAndUpdate.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const updatedItem = await weivData.getAndUpdate("Db/Collection", itemId, {...});
    console.log(updatedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/idConverter.html b/docs/functions/idConverter.html index 65c7f1a9..be1de327 100644 --- a/docs/functions/idConverter.html +++ b/docs/functions/idConverter.html @@ -2,4 +2,4 @@

    Parameters

    • id: string | ObjectId

      ID you want to convert can be string or a valid ObjectId

    • Optional stringMethod: "base64" | "hex"

      Optional converting method can be "base64" or "hex" defaults to "hex"

    Returns ObjectId | string

    ObjectId or string reverse of the input

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/increment.html b/docs/functions/increment.html index e178d941..6087694e 100644 --- a/docs/functions/increment.html +++ b/docs/functions/increment.html @@ -7,4 +7,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.increment("Db/Collection", itemId, "numberField", 18 {...});
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/insert.html b/docs/functions/insert.html index dd8743db..317d7ff6 100644 --- a/docs/functions/insert.html +++ b/docs/functions/insert.html @@ -5,4 +5,4 @@

    Returns Promise<Item>

    Fulfilled - The item that was added. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item that will be inserted
    const item = {...}

    const result = await weivData.insert("Clusters/All", item)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/insertReference.html b/docs/functions/insertReference.html index f5c27e7b..59ba9707 100644 --- a/docs/functions/insertReference.html +++ b/docs/functions/insertReference.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been inserted. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be inserted. `ItemId[]`
    const cpus = ["cpuId2", "cpuId4"]

    const result = await weivData.insertReference("Clusters/Ortakoy", "availableCPUs", itemId, cpus)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/isReferenced.html b/docs/functions/isReferenced.html index 163d15a8..e4d6404e 100644 --- a/docs/functions/isReferenced.html +++ b/docs/functions/isReferenced.html @@ -7,4 +7,4 @@

    Returns Promise<boolean>

    Fulfilled - Whether the referring item contains a reference to the referenced item or not. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be checked if exists. `ItemId[]`
    const cpus = ["cpuId1"]

    const result = await weivData.isReferenced("Clusters/Ortakoy", "availableCPUs", itemId, cpus);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/listCollections.html b/docs/functions/listCollections.html index 37fae25b..24b5da43 100644 --- a/docs/functions/listCollections.html +++ b/docs/functions/listCollections.html @@ -6,4 +6,4 @@

    Returns Promise<ListCollectionsCursor>

    Fulfilled - Native ListCollectionsCursor of MongoDB driver.

    Example

    import { listCollections } from '@exweiv/weiv-data';

    listCollections('DatabaseName', { suppressAuth: true });
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/multiply.html b/docs/functions/multiply.html index 5d8d5a23..de0883c4 100644 --- a/docs/functions/multiply.html +++ b/docs/functions/multiply.html @@ -7,4 +7,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.multiply("Db/Collection", itemId, "numberField", 3 {...});
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/native.html b/docs/functions/native.html index 7da4efb9..6b7338d8 100644 --- a/docs/functions/native.html +++ b/docs/functions/native.html @@ -6,4 +6,4 @@

    Returns Promise<Collection>

    Fulfilled - Native MongoDB Collection cursor.

    Example

    import weivData from '@exweiv/weiv-data';

    const nativeCollectionObject = await weivData.native("Finance/Income", false);

    // Perform actions with native collection cursor provided by MongoDB
    // Check [MongoDB Atlas APIs (JS)](https://mongodb.github.io/node-mongodb-native/5.9/) to udnerstand how to use it.
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/pull.html b/docs/functions/pull.html index 7acaba58..d169b14b 100644 --- a/docs/functions/pull.html +++ b/docs/functions/pull.html @@ -8,4 +8,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.pull("Db/Collection", itemId, "arrField", [...], -1);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/push.html b/docs/functions/push.html index 05925d2a..6a0b529b 100644 --- a/docs/functions/push.html +++ b/docs/functions/push.html @@ -8,4 +8,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.push("Db/Collection", itemId, "arrField", [...], -1);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/queryReferenced.html b/docs/functions/queryReferenced.html index cfa76abb..46a3951e 100644 --- a/docs/functions/queryReferenced.html +++ b/docs/functions/queryReferenced.html @@ -8,4 +8,4 @@

    Returns Promise<WeivDataQueryReferencedResult>

    Fulfilled - The referenced items. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item ID that will be used when searching for references
    const itemId = "..."

    const result = await weivData.queryReferenced("Clusters/All", "clusterLocations", itemId, {readConcern: true})

    if (result.hasNext()) {
    const nextPage = await result.next();
    console.log(result, nextPage);
    } else {
    console.log(result);
    }
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/remove.html b/docs/functions/remove.html index 002f077d..3a7280ba 100644 --- a/docs/functions/remove.html +++ b/docs/functions/remove.html @@ -5,4 +5,4 @@

    Returns Promise<Item | null>

    Fulfilled - The removed item, or null if the item was not found. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // ID of item that will be removed
    const itemId = "..."

    const result = await weivData.remove("Clusters/Riva", itemId)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/removeReference.html b/docs/functions/removeReference.html index bdc976c3..67af059c 100644 --- a/docs/functions/removeReference.html +++ b/docs/functions/removeReference.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been removed. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be removed. `ItemId[]`
    const cpus = ["cpuId1", "cpuId3"]

    const result = await weivData.removeReference("Clusters/Ortakoy", "availableCPUs", itemId, cpus, {suppressAuth: true})
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/renameCollection.html b/docs/functions/renameCollection.html index 79627665..4be3d29a 100644 --- a/docs/functions/renameCollection.html +++ b/docs/functions/renameCollection.html @@ -6,4 +6,4 @@

    Returns Promise<Collection>

    Fulfilled - The Collection cursor of native MongoDB driver.

    Example

    import { renameCollection } from '@exweiv/weiv-data';

    renameCollection('Database/ExistingCollectionName', 'NewCollectionName', { suppressAuth: true });
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/replace.html b/docs/functions/replace.html index 48de3930..49d763c4 100644 --- a/docs/functions/replace.html +++ b/docs/functions/replace.html @@ -6,4 +6,4 @@

    Returns Promise<Item>

    Fulfilled - The object that was replaced. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item with an id
    const updatedVersion = {...}
    // Options for the operation
    const options = {suppressHooks: true};

    const result = await weivData.replace("Clusters/IST57", updatedVersion, options)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/replaceReferences.html b/docs/functions/replaceReferences.html index 06ae4031..e5ec4e83 100644 --- a/docs/functions/replaceReferences.html +++ b/docs/functions/replaceReferences.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been inserted. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // New references
    const cpus = ["cpuId1", "cpuId2", "cpuId3", ...]

    const result = await weivData.replaceReferences("Clusters/Ortakoy", "availableCPUs", itemId, cpus, {suppressAuth: true})
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/save.html b/docs/functions/save.html index 834f1ffa..5c086a50 100644 --- a/docs/functions/save.html +++ b/docs/functions/save.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataSaveResult>

    Fulfilled - The item that was either inserted or updated, depending on whether it previously existed in the collection. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item/object for save operation
    const item = {
    location: "Riva 7",
    _id: "...", // Item id (optional)
    availableCPUs: ["M1", "A7", "R1"]
    }

    const result = await weivData.save("Clusters/Riva", itemData)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/truncate.html b/docs/functions/truncate.html index 3a227ef3..11ad2ffb 100644 --- a/docs/functions/truncate.html +++ b/docs/functions/truncate.html @@ -4,4 +4,4 @@

    Returns Promise<boolean>

    Fulfilled - When the items have been removed. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    const result = await weivData.truncate("Clusters/Uskudar");
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/update.html b/docs/functions/update.html index 17b1b58c..732002ff 100644 --- a/docs/functions/update.html +++ b/docs/functions/update.html @@ -9,4 +9,4 @@

    Returns Promise<Item>

    Fulfilled - The object that was updated. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item with an id
    const updatedVersion = {...}
    // Options for the operation
    const options = {suppressHooks: true};

    const result = await weivData.update("Clusters/IST12", updatedVersion, options)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/AggregateRunOptions.html b/docs/interfaces/AggregateRunOptions.html index 61aa0ed5..82ee4a57 100644 --- a/docs/interfaces/AggregateRunOptions.html +++ b/docs/interfaces/AggregateRunOptions.html @@ -1,6 +1,6 @@ AggregateRunOptions | WeivData Library Documentation - ExWeiv Apps

    Options to use when running an aggregation.

    -
    interface AggregateRunOptions {
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
    }

    Properties

    interface AggregateRunOptions {
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
    }

    Properties

    readConcern?: ReadConcernLevel

    Enable consistent read from clusters. This will change the readConvern to "majority", in this way you'll get the most up to date data.

    -
    suppressAuth?: boolean

    Bypass permissions of user when using aggregate. When set to true admin uri will be used automatically.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    suppressAuth?: boolean

    Bypass permissions of user when using aggregate. When set to true admin uri will be used automatically.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/BulkInsertResult.html b/docs/interfaces/BulkInsertResult.html index 8cbd1a9c..45cf73ab 100644 --- a/docs/interfaces/BulkInsertResult.html +++ b/docs/interfaces/BulkInsertResult.html @@ -1,5 +1,5 @@ BulkInsertResult | WeivData Library Documentation - ExWeiv Apps

    Adds a number of items to a collection.

    -
    interface BulkInsertResult {
        inserted: number;
        insertedItemIds: {
            [key: number]: ObjectId;
        };
        insertedItems: Items;
    }

    Properties

    interface BulkInsertResult {
        inserted: number;
        insertedItemIds: {
            [key: number]: ObjectId;
        };
        insertedItems: Items;
    }

    Properties

    inserted: number
    insertedItemIds: {
        [key: number]: ObjectId;
    }

    Type declaration

    • [key: number]: ObjectId
    insertedItems: Items

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    inserted: number
    insertedItemIds: {
        [key: number]: ObjectId;
    }

    Type declaration

    • [key: number]: ObjectId
    insertedItems: Items

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/HookContext.html b/docs/interfaces/HookContext.html index 283db54f..eb4b5a3c 100644 --- a/docs/interfaces/HookContext.html +++ b/docs/interfaces/HookContext.html @@ -1,5 +1,5 @@ -HookContext | WeivData Library Documentation - ExWeiv Apps
    interface HookContext {
        collectionName: string;
        dbName: string;
        userId?: string;
        userRoles: undefined | any[];
    }

    Properties

    collectionName +HookContext | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    collectionName: string
    dbName: string
    userId?: string
    userRoles: undefined | any[]

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/IncludeObject.html b/docs/interfaces/IncludeObject.html index 9131bfea..ab862602 100644 --- a/docs/interfaces/IncludeObject.html +++ b/docs/interfaces/IncludeObject.html @@ -1,13 +1,13 @@ -IncludeObject | WeivData Library Documentation - ExWeiv Apps
    interface IncludeObject {
        as?: string;
        collectionName: string;
        countItems?: boolean;
        fieldName: string;
        foreignField?: string;
        maxItems?: number;
    }

    Properties

    as? +IncludeObject | WeivData Library Documentation - ExWeiv Apps
    interface IncludeObject {
        as?: string;
        collectionName: string;
        countItems?: boolean;
        fieldName: string;
        foreignField?: string;
        maxItems?: number;
    }

    Properties

    as?: string

    Custom return name for included items. Defaults to fieldName.

    -
    collectionName: string

    Collection of referenced item/s (only collection name)

    -
    countItems?: boolean

    Enable counting total items or not. Defaults to false.

    -
    fieldName: string

    Property/field name of referenced items in the current item.

    -
    foreignField?: string

    Foreign field name. Defaults to _id.

    -
    maxItems?: number

    Maximum number of items to include. Defaults to 50.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    collectionName: string

    Collection of referenced item/s (only collection name)

    +
    countItems?: boolean

    Enable counting total items or not. Defaults to false.

    +
    fieldName: string

    Property/field name of referenced items in the current item.

    +
    foreignField?: string

    Foreign field name. Defaults to _id.

    +
    maxItems?: number

    Maximum number of items to include. Defaults to 50.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataAggregateResult.html b/docs/interfaces/WeivDataAggregateResult.html index 7906bf3e..2c6b9603 100644 --- a/docs/interfaces/WeivDataAggregateResult.html +++ b/docs/interfaces/WeivDataAggregateResult.html @@ -1,10 +1,10 @@ -WeivDataAggregateResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataAggregateResult {
        items: Items;
        length: number;
        hasNext(): boolean;
        next(): Promise<WeivDataAggregateResult>;
    }

    Properties

    items +WeivDataAggregateResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataAggregateResult {
        items: Items;
        length: number;
        hasNext(): boolean;
        next(): Promise<WeivDataAggregateResult>;
    }

    Properties

    Methods

    Properties

    items: Items

    Gets the aggregated values.

    -
    length: number

    Returns the number of values in the aggregate results.

    -

    Methods

    length: number

    Returns the number of values in the aggregate results.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkRemoveResult.html b/docs/interfaces/WeivDataBulkRemoveResult.html index 8207f7a6..aaa7b305 100644 --- a/docs/interfaces/WeivDataBulkRemoveResult.html +++ b/docs/interfaces/WeivDataBulkRemoveResult.html @@ -1,6 +1,6 @@ WeivDataBulkRemoveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkRemove function.

    -
    interface WeivDataBulkRemoveResult {
        removed: number;
        removedItemIds: ItemIDs;
    }

    Properties

    interface WeivDataBulkRemoveResult {
        removed: number;
        removedItemIds: ItemIDs;
    }

    Properties

    removed: number

    Number of removed items.

    -
    removedItemIds: ItemIDs

    Removed item ids.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    removedItemIds: ItemIDs

    Removed item ids.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkSaveResult.html b/docs/interfaces/WeivDataBulkSaveResult.html index 4b437ae8..29333810 100644 --- a/docs/interfaces/WeivDataBulkSaveResult.html +++ b/docs/interfaces/WeivDataBulkSaveResult.html @@ -1,10 +1,10 @@ WeivDataBulkSaveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkSave function.

    -
    interface WeivDataBulkSaveResult {
        inserted: number;
        insertedItemIds: ItemIDs;
        savedItems: Items;
        updated: number;
    }

    Properties

    interface WeivDataBulkSaveResult {
        inserted: number;
        insertedItemIds: ItemIDs;
        savedItems: Items;
        updated: number;
    }

    Properties

    inserted: number

    Number of inserted items.

    -
    insertedItemIds: ItemIDs

    Inserted item ids.

    -
    savedItems: Items

    Saved items.

    -
    updated: number

    Number of updated items.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    insertedItemIds: ItemIDs

    Inserted item ids.

    +
    savedItems: Items

    Saved items.

    +
    updated: number

    Number of updated items.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkUpdateResult.html b/docs/interfaces/WeivDataBulkUpdateResult.html index 8b8f87d2..098f08d4 100644 --- a/docs/interfaces/WeivDataBulkUpdateResult.html +++ b/docs/interfaces/WeivDataBulkUpdateResult.html @@ -1,6 +1,6 @@ WeivDataBulkUpdateResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkUpdate function.

    -
    interface WeivDataBulkUpdateResult {
        updated: number;
        updatedItems: Items;
    }

    Properties

    interface WeivDataBulkUpdateResult {
        updated: number;
        updatedItems: Items;
    }

    Properties

    updated: number

    Number of updated items.

    -
    updatedItems: Items

    Updated items.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    updatedItems: Items

    Updated items.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataOptions.html b/docs/interfaces/WeivDataOptions.html index 85056b84..da6b9771 100644 --- a/docs/interfaces/WeivDataOptions.html +++ b/docs/interfaces/WeivDataOptions.html @@ -1,6 +1,6 @@ WeivDataOptions | WeivData Library Documentation - ExWeiv Apps

    An object containing options to use when processing an operation in weiv-data.

    -
    interface WeivDataOptions {
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    interface WeivDataOptions {
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataOptionsCache.html b/docs/interfaces/WeivDataOptionsCache.html index c3ee1fb0..92e2d23e 100644 --- a/docs/interfaces/WeivDataOptionsCache.html +++ b/docs/interfaces/WeivDataOptionsCache.html @@ -1,8 +1,8 @@ WeivDataOptionsCache | WeivData Library Documentation - ExWeiv Apps

    Control the cache mechanism in weiv-data and optimize your read operations by saving results. Cache is disabled by default.

    -
    interface WeivDataOptionsCache {
        cacheTimeout?: number;
        enableCache?: boolean;
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    interface WeivDataOptionsCache {
        cacheTimeout?: number;
        enableCache?: boolean;
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    cacheTimeout?: number
    enableCache?: boolean
    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    cacheTimeout?: number
    enableCache?: boolean
    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataQueryReferencedResult.html b/docs/interfaces/WeivDataQueryReferencedResult.html index 27b730f1..bbe2bba4 100644 --- a/docs/interfaces/WeivDataQueryReferencedResult.html +++ b/docs/interfaces/WeivDataQueryReferencedResult.html @@ -1,16 +1,16 @@ WeivDataQueryReferencedResult | WeivData Library Documentation - ExWeiv Apps

    Result object of queryReferenced function.

    -
    interface WeivDataQueryReferencedResult {
        items: Items;
        totalCount: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryReferencedResult>;
        prev(): Promise<WeivDataQueryReferencedResult>;
    }

    Properties

    interface WeivDataQueryReferencedResult {
        items: Items;
        totalCount: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryReferencedResult>;
        prev(): Promise<WeivDataQueryReferencedResult>;
    }

    Properties

    items: Items

    Returns the items that match the reference query.

    -
    totalCount: number

    Returns the total number of items that match the reference query.

    -

    Methods

    totalCount: number

    Returns the total number of items that match the reference query.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataQueryResult.html b/docs/interfaces/WeivDataQueryResult.html index 4510a6c6..5a8f3807 100644 --- a/docs/interfaces/WeivDataQueryResult.html +++ b/docs/interfaces/WeivDataQueryResult.html @@ -1,4 +1,4 @@ -WeivDataQueryResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataQueryResult {
        currentPage: number;
        items: Items;
        length: number;
        pageSize: number;
        totalCount: number;
        totalPages: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryResult>;
        prev(): Promise<WeivDataQueryResult>;
    }

    Properties

    currentPage +WeivDataQueryResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataQueryResult {
        currentPage: number;
        items: Items;
        length: number;
        pageSize: number;
        totalCount: number;
        totalPages: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryResult>;
        prev(): Promise<WeivDataQueryResult>;
    }

    Properties

    Properties

    currentPage: number

    Returns the index of the current results page number.

    -
    items: Items

    Returns the items that match the query.

    -
    length: number

    Returns the number of items in the current results page.

    -
    pageSize: number

    Returns the query page size.

    -
    totalCount: number

    Returns the total number of items that match the query.

    -
    totalPages: number

    Returns the total number of pages the query produced.

    -

    Methods

    items: Items

    Returns the items that match the query.

    +
    length: number

    Returns the number of items in the current results page.

    +
    pageSize: number

    Returns the query page size.

    +
    totalCount: number

    Returns the total number of items that match the query.

    +
    totalPages: number

    Returns the total number of pages the query produced.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataSaveResult.html b/docs/interfaces/WeivDataSaveResult.html index 15e6be68..88d1e1a1 100644 --- a/docs/interfaces/WeivDataSaveResult.html +++ b/docs/interfaces/WeivDataSaveResult.html @@ -1,6 +1,6 @@ WeivDataSaveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for save function.

    -
    interface WeivDataSaveResult {
        item: Document;
        upsertedId?: ItemID;
    }

    Properties

    interface WeivDataSaveResult {
        item: Document;
        upsertedId?: ItemID;
    }

    Properties

    Properties

    item: Document

    Saved item.

    -
    upsertedId?: ItemID

    Inserted item id. (Returned if item is inserted)

    -

    Generated using TypeDoc

    \ No newline at end of file +
    upsertedId?: ItemID

    Inserted item id. (Returned if item is inserted)

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/CacheSelections.html b/docs/types/CacheSelections.html index 82522da8..2068ee02 100644 --- a/docs/types/CacheSelections.html +++ b/docs/types/CacheSelections.html @@ -1 +1 @@ -CacheSelections | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +CacheSelections | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/CollectionID.html b/docs/types/CollectionID.html index 9abf3f60..b44623a8 100644 --- a/docs/types/CollectionID.html +++ b/docs/types/CollectionID.html @@ -1,4 +1,4 @@ CollectionID | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/EnableVisitorID.html b/docs/types/EnableVisitorID.html index 31fe8b8b..0096c9c6 100644 --- a/docs/types/EnableVisitorID.html +++ b/docs/types/EnableVisitorID.html @@ -1,3 +1,3 @@ EnableVisitorID | WeivData Library Documentation - ExWeiv Apps
    EnableVisitorID: boolean

    When you want to get not just only members or admins id (member id in Wix) also visitors id enable this and system will create a data using wix-data and then it will use the _owner field to get the current user temp id. Note: This will slow down the operation and not recommended always so do not use it when you don't need it. Carefully design your database systems/models and your apps workflows because you shouldn't need this in most cases.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HookArgs.html b/docs/types/HookArgs.html index 1860c37d..df2735a3 100644 --- a/docs/types/HookArgs.html +++ b/docs/types/HookArgs.html @@ -1,2 +1,2 @@ HookArgs | WeivData Library Documentation - ExWeiv Apps
    HookArgs<HookName>: HookName extends "beforeGet"
        ? [item: ItemID, context: HookContext]
        : HookName extends "beforeCount"
            ? [item: WeivDataQuery, context: HookContext]
            : HookName extends "afterCount"
                ? [item: number, context: HookContext]
                : HookName extends "beforeQuery"
                    ? [item: WeivDataQuery, context: HookContext]
                    : HookName extends "beforeRemove"
                        ? [item: ItemID, context: HookContext]
                        : HookName extends "beforeFindOne"
                            ? [item: {
                                propertyName: string;
                                value: any;
                            }, context: HookContext]
                            : HookName extends "beforeGetAndRemove"
                                ? [item: ItemID, context: HookContext]
                                : HookName extends "beforeIncrement"
                                    ? [item: {
                                        propertyName: string;
                                        value: number;
                                    }, context: HookContext]
                                    : HookName extends "beforeMultiply"
                                        ? [item: {
                                            propertyName: string;
                                            value: number;
                                        }, context: HookContext]
                                        : HookName extends "beforePush"
                                            ? [item: {
                                                propertyName: string;
                                                value: any;
                                            }, context: HookContext]
                                            : HookName extends "beforePull"
                                                ? [item: {
                                                    propertyName: string;
                                                    value: any;
                                                }, context: HookContext]
                                                : [item: Item, context: HookContext]

    List of hook params and values.

    -

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HookName.html b/docs/types/HookName.html index b864ac98..40213e9c 100644 --- a/docs/types/HookName.html +++ b/docs/types/HookName.html @@ -5,4 +5,4 @@

    You don't need to return a value in your hooks but if you return value should align with [HookResults](https://weiv-data.web.app/types/HooksResult.html). You can use async functions or not async functions in your hooks.

    Sometimes it takes few minutes to let hooks start working. Publish or save your site when you define new hooks.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HooksResults.html b/docs/types/HooksResults.html index 5b985a4f..d63dac1b 100644 --- a/docs/types/HooksResults.html +++ b/docs/types/HooksResults.html @@ -1,2 +1,2 @@ HooksResults | WeivData Library Documentation - ExWeiv Apps
    HooksResults<HookName>: HookName extends "beforeGet"
        ? ItemID
        : HookName extends "beforeCount"
            ? WeivDataQuery
            : HookName extends "afterCount"
                ? number
                : HookName extends "beforeQuery"
                    ? WeivDataQuery
                    : HookName extends "beforeRemove"
                        ? ItemID
                        : HookName extends "beforeFindOne"
                            ? {
                                propertyName: string;
                                value: any;
                            }
                            : HookName extends "beforeGetAndRemove"
                                ? ItemID
                                : HookName extends "beforeIncrement"
                                    ? {
                                        propertyName: string;
                                        value: number;
                                    }
                                    : HookName extends "beforeMultiply"
                                        ? {
                                            propertyName: string;
                                            value: number;
                                        }
                                        : HookName extends "beforePush"
                                            ? {
                                                propertyName: string;
                                                value: any;
                                            }
                                            : HookName extends "beforePull"
                                                ? {
                                                    propertyName: string;
                                                    value: any;
                                                }
                                                : Item

    List of expected values from hooks if returns.

    -

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/Item.html b/docs/types/Item.html index 1098b2eb..81f6e8a7 100644 --- a/docs/types/Item.html +++ b/docs/types/Item.html @@ -1,2 +1,2 @@ Item | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ItemID.html b/docs/types/ItemID.html index d6d09b78..719b9e97 100644 --- a/docs/types/ItemID.html +++ b/docs/types/ItemID.html @@ -1,4 +1,4 @@ ItemID | WeivData Library Documentation - ExWeiv Apps
    ItemID: string | ObjectId

    Item id can be string or ObjectID, inside the library it's in ObjectId type in most cases but in your code it can be one of them. Don't worry you can always use string versions of ObjectIds weiv-data will convert them to ObjectId if needed.

    (We use ObjectId type to get better performance in MongoDB)

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ItemIDs.html b/docs/types/ItemIDs.html index 4d5d334b..1d40dc3f 100644 --- a/docs/types/ItemIDs.html +++ b/docs/types/ItemIDs.html @@ -1,3 +1,3 @@ ItemIDs | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/Items.html b/docs/types/Items.html index f9c10866..8e1c9508 100644 --- a/docs/types/Items.html +++ b/docs/types/Items.html @@ -1,2 +1,2 @@ Items | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReadConcern.html b/docs/types/ReadConcern.html index d0ed3053..6859a2b2 100644 --- a/docs/types/ReadConcern.html +++ b/docs/types/ReadConcern.html @@ -1,2 +1,2 @@ ReadConcern | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReferencedItem.html b/docs/types/ReferencedItem.html index 76a1fca9..0305aa86 100644 --- a/docs/types/ReferencedItem.html +++ b/docs/types/ReferencedItem.html @@ -1,4 +1,4 @@ ReferencedItem | WeivData Library Documentation - ExWeiv Apps
    ReferencedItem: Item | ItemID | Items | ItemIDs

    Referenced item can be the item itself that contains the _id key or directly the item id. There can be more than one referenced item and if so you can put the values we defined above in an array. So it can also be Array or Array

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReferringItem.html b/docs/types/ReferringItem.html index 02a72fc5..95f5aeb2 100644 --- a/docs/types/ReferringItem.html +++ b/docs/types/ReferringItem.html @@ -1,2 +1,2 @@ ReferringItem | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/SuppressAuth.html b/docs/types/SuppressAuth.html index a2ae2e8c..784db1dd 100644 --- a/docs/types/SuppressAuth.html +++ b/docs/types/SuppressAuth.html @@ -1,2 +1,2 @@ SuppressAuth | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/SuppressHooks.html b/docs/types/SuppressHooks.html index 47c88e8b..820a5ec0 100644 --- a/docs/types/SuppressHooks.html +++ b/docs/types/SuppressHooks.html @@ -1,2 +1,2 @@ SuppressHooks | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/WeivDataQueryReferencedOptions.html b/docs/types/WeivDataQueryReferencedOptions.html index 805790ca..79ec4957 100644 --- a/docs/types/WeivDataQueryReferencedOptions.html +++ b/docs/types/WeivDataQueryReferencedOptions.html @@ -1 +1 @@ -WeivDataQueryReferencedOptions | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +WeivDataQueryReferencedOptions | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file From d11ac8bd64691fc40df44dd397d2202bde25909f Mon Sep 17 00:00:00 2001 From: Enes Date: Wed, 13 Mar 2024 02:57:55 +0200 Subject: [PATCH 4/6] - bug fixes for new functions --- app/lib/Collections/createCollection.js | 4 ++-- app/lib/Collections/deleteCollection.js | 2 +- app/lib/Collections/listCollections.js | 4 ++-- app/lib/Collections/renameCollection.js | 4 ++-- app/src/Collections/createCollection.ts | 10 +++++----- app/src/Collections/deleteCollection.ts | 2 +- app/src/Collections/listCollections.ts | 10 +++++----- app/src/Collections/renameCollection.ts | 10 +++++----- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/lib/Collections/createCollection.js b/app/lib/Collections/createCollection.js index 63347ebe..75a82cca 100644 --- a/app/lib/Collections/createCollection.js +++ b/app/lib/Collections/createCollection.js @@ -9,9 +9,9 @@ async function createCollection(collectionId, options, createOptions) { throw Error(`WeivData - One or more required param is undefined - Required Params: collectionId`); } const { suppressAuth } = options || {}; - const { database } = await (0, connection_helpers_1.connectionHandler)(collectionId, suppressAuth); + const { database } = await (0, connection_helpers_1.connectionHandler)(collectionId, suppressAuth, true); const { collectionName } = (0, name_helpers_1.splitCollectionId)(collectionId); - return await database.createCollection(collectionName, createOptions); + await database.createCollection(collectionName, createOptions); } catch (err) { throw Error(`WeivData - Error when creating a new collection in a database, details: ${err}`); diff --git a/app/lib/Collections/deleteCollection.js b/app/lib/Collections/deleteCollection.js index db36f5a2..a1186cb1 100644 --- a/app/lib/Collections/deleteCollection.js +++ b/app/lib/Collections/deleteCollection.js @@ -9,7 +9,7 @@ async function deleteCollection(collectionId, options, deleteOptions) { throw Error(`WeivData - One or more required param is undefined - Required Params: collectionId`); } const { suppressAuth } = options || {}; - const { database } = await (0, connection_helpers_1.connectionHandler)(collectionId, suppressAuth); + const { database } = await (0, connection_helpers_1.connectionHandler)(collectionId, suppressAuth, true); const { collectionName } = (0, name_helpers_1.splitCollectionId)(collectionId); return await database.dropCollection(collectionName, deleteOptions); } diff --git a/app/lib/Collections/listCollections.js b/app/lib/Collections/listCollections.js index 4bc99997..27bebe61 100644 --- a/app/lib/Collections/listCollections.js +++ b/app/lib/Collections/listCollections.js @@ -8,8 +8,8 @@ async function listCollections(databaseName, options, filter, listOptions) { throw Error(`WeivData - One or more required param is undefined - Required Params: databaseName`); } const { suppressAuth } = options || {}; - const { database } = await (0, connection_helpers_1.connectionHandler)(`${databaseName}/`, suppressAuth); - return await database.listCollections(filter, listOptions); + const { database } = await (0, connection_helpers_1.connectionHandler)(`${databaseName}/`, suppressAuth, true); + return await database.listCollections(filter, listOptions).toArray(); } catch (err) { throw Error(`WeivData - Error when listing all collections in a database, details: ${err}`); diff --git a/app/lib/Collections/renameCollection.js b/app/lib/Collections/renameCollection.js index 912b537a..2e3c8195 100644 --- a/app/lib/Collections/renameCollection.js +++ b/app/lib/Collections/renameCollection.js @@ -9,9 +9,9 @@ async function renameCollection(collectionId, newCollectionName, options, rename throw Error(`WeivData - One or more required param is undefined - Required Params: collectionId, newCollectionName`); } const { suppressAuth } = options || {}; - const { database } = await (0, connection_helpers_1.connectionHandler)(collectionId, suppressAuth); + const { database } = await (0, connection_helpers_1.connectionHandler)(collectionId, suppressAuth, true); const { collectionName } = (0, name_helpers_1.splitCollectionId)(collectionId); - return await database.renameCollection(collectionName, newCollectionName, renameOptions); + await database.renameCollection(collectionName, newCollectionName, renameOptions); } catch (err) { throw Error(`WeivData - Error when renaming a collection, details: ${err}`); diff --git a/app/src/Collections/createCollection.ts b/app/src/Collections/createCollection.ts index 8c93e800..434ce63c 100644 --- a/app/src/Collections/createCollection.ts +++ b/app/src/Collections/createCollection.ts @@ -1,7 +1,7 @@ import { connectionHandler } from '../Helpers/connection_helpers'; import { splitCollectionId } from '../Helpers/name_helpers'; import { CollectionID, WeivDataOptions } from '../Helpers/collection'; -import type { CreateCollectionOptions, Collection } from 'mongodb'; +import type { CreateCollectionOptions } from 'mongodb'; /** * Creates a new collection inside of a selected database. (User must have createCollection permission inside MongoDB dashboard, you can also use suppressAuth with options). @@ -16,18 +16,18 @@ import type { CreateCollectionOptions, Collection } from 'mongodb'; * @param collectionId CollectionID (< database >/< collection >). * @param options An object containing options to use when processing this operation. * @param createOptions Native options of MongoDB driver when creating a collection. [Checkout here.](https://mongodb.github.io/node-mongodb-native/6.5/interfaces/CreateCollectionOptions.html) - * @returns {Promise} Fulfilled - The Collection cursor of native MongoDB driver. + * @returns {Promise} void */ -export async function createCollection(collectionId: CollectionID, options?: WeivDataOptions, createOptions?: CreateCollectionOptions): Promise { +export async function createCollection(collectionId: CollectionID, options?: WeivDataOptions, createOptions?: CreateCollectionOptions): Promise { try { if (!collectionId) { throw Error(`WeivData - One or more required param is undefined - Required Params: collectionId`); } const { suppressAuth } = options || {}; - const { database } = await connectionHandler(collectionId, suppressAuth); + const { database } = await connectionHandler(collectionId, suppressAuth, true); const { collectionName } = splitCollectionId(collectionId); - return await database.createCollection(collectionName, createOptions); + await database.createCollection(collectionName, createOptions); } catch (err) { throw Error(`WeivData - Error when creating a new collection in a database, details: ${err}`); } diff --git a/app/src/Collections/deleteCollection.ts b/app/src/Collections/deleteCollection.ts index e6989a42..f2b7edbf 100644 --- a/app/src/Collections/deleteCollection.ts +++ b/app/src/Collections/deleteCollection.ts @@ -25,7 +25,7 @@ export async function deleteCollection(collectionId: CollectionID, options?: Wei } const { suppressAuth } = options || {}; - const { database } = await connectionHandler(collectionId, suppressAuth); + const { database } = await connectionHandler(collectionId, suppressAuth, true); const { collectionName } = splitCollectionId(collectionId); return await database.dropCollection(collectionName, deleteOptions); } catch (err) { diff --git a/app/src/Collections/listCollections.ts b/app/src/Collections/listCollections.ts index 0885f2f1..1471c089 100644 --- a/app/src/Collections/listCollections.ts +++ b/app/src/Collections/listCollections.ts @@ -1,6 +1,6 @@ import { connectionHandler } from '../Helpers/connection_helpers'; import { WeivDataOptions } from '../Helpers/collection'; -import type { ListCollectionsCursor, Document, ListCollectionsOptions } from 'mongodb'; +import type { Document, ListCollectionsOptions, CollectionInfo } from 'mongodb'; /** * Lists collections inside of a selected database. (User must have listCollections permission inside MongoDB dashboard, you can also use suppressAuth with options). @@ -16,17 +16,17 @@ import type { ListCollectionsCursor, Document, ListCollectionsOptions } from 'mo * @param options An object containing options to use when processing this operation. * @param filter MongoDB native filtering options. [Read more in native docs.](https://mongodb.github.io/node-mongodb-native/6.5/classes/Db.html#listCollections) * @param listOptions MongoDB native listCollections options. [Read more in native docs.](https://mongodb.github.io/node-mongodb-native/6.5/classes/Db.html#listCollections) - * @returns {Promise} Fulfilled - Native ListCollectionsCursor of MongoDB driver. + * @returns {Promise} Fulfilled - Array of `[CollectionInfo](https://mongodb.github.io/node-mongodb-native/6.3/interfaces/CollectionInfo.html)` */ -export async function listCollections(databaseName: string, options?: WeivDataOptions, filter?: Document, listOptions?: ListCollectionsOptions): Promise { +export async function listCollections(databaseName: string, options?: WeivDataOptions, filter?: Document, listOptions?: ListCollectionsOptions): Promise { try { if (!databaseName) { throw Error(`WeivData - One or more required param is undefined - Required Params: databaseName`); } const { suppressAuth } = options || {}; - const { database } = await connectionHandler(`${databaseName}/`, suppressAuth); - return await database.listCollections(filter, listOptions); + const { database } = await connectionHandler(`${databaseName}/`, suppressAuth, true); + return await database.listCollections(filter, listOptions).toArray(); } catch (err) { throw Error(`WeivData - Error when listing all collections in a database, details: ${err}`); } diff --git a/app/src/Collections/renameCollection.ts b/app/src/Collections/renameCollection.ts index f4aed1bc..46ea4376 100644 --- a/app/src/Collections/renameCollection.ts +++ b/app/src/Collections/renameCollection.ts @@ -1,7 +1,7 @@ import { connectionHandler } from '../Helpers/connection_helpers'; import { splitCollectionId } from '../Helpers/name_helpers'; import { CollectionID, WeivDataOptions } from '../Helpers/collection'; -import type { Collection, RenameOptions } from 'mongodb'; +import type { RenameOptions } from 'mongodb'; /** * Renames a collection inside of a selected database. (User must have renameCollection permission inside MongoDB dashboard, you can also use suppressAuth with options). @@ -17,18 +17,18 @@ import type { Collection, RenameOptions } from 'mongodb'; * @param newCollectionName New name of collection. * @param options An object containing options to use when processing this operation. * @param renameOptions Native options of MongoDB driver when renaming a collection. [Checkout here.](https://mongodb.github.io/node-mongodb-native/6.5/classes/Db.html#renameCollection) - * @returns {Promise} Fulfilled - The Collection cursor of native MongoDB driver. + * @returns {Promise} void */ -export async function renameCollection(collectionId: CollectionID, newCollectionName: string, options?: WeivDataOptions, renameOptions?: RenameOptions): Promise { +export async function renameCollection(collectionId: CollectionID, newCollectionName: string, options?: WeivDataOptions, renameOptions?: RenameOptions): Promise { try { if (!collectionId || !newCollectionName) { throw Error(`WeivData - One or more required param is undefined - Required Params: collectionId, newCollectionName`); } const { suppressAuth } = options || {}; - const { database } = await connectionHandler(collectionId, suppressAuth); + const { database } = await connectionHandler(collectionId, suppressAuth, true); const { collectionName } = splitCollectionId(collectionId); - return await database.renameCollection(collectionName, newCollectionName, renameOptions); + await database.renameCollection(collectionName, newCollectionName, renameOptions); } catch (err) { throw Error(`WeivData - Error when renaming a collection, details: ${err}`); } From f4407f755f47200bea2f4f59109d30cd3303fcbb Mon Sep 17 00:00:00 2001 From: Enes Date: Wed, 13 Mar 2024 02:58:39 +0200 Subject: [PATCH 5/6] version update --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cccb43b3..b4d60182 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ In this file you can find what's changed in each version. (Versions with -dev, - --- +### 3.0.2 + +- BUG Fixes + ### 3.0.1 - New functions to `create`, `delete`, `rename` and `list` collections from a selected database. Now you can manage collections in databases with these APIs. From 3d07b4753df2e7f1bd58b2e686a04466e3976a45 Mon Sep 17 00:00:00 2001 From: ExWeiv GitHub BOT Date: Wed, 13 Mar 2024 00:59:04 +0000 Subject: [PATCH 6/6] Build and Generate Docs - BOT --- docs/classes/WeivDataAggregate.html | 28 +++++----- docs/classes/WeivDataFilter.html | 36 ++++++------- docs/classes/WeivDataQuery.html | 54 +++++++++---------- docs/functions/bulkInsert.html | 2 +- docs/functions/bulkRemove.html | 2 +- docs/functions/bulkSave.html | 2 +- docs/functions/bulkUpdate.html | 2 +- docs/functions/createCollection.html | 6 +-- docs/functions/deleteCollection.html | 2 +- docs/functions/findOne.html | 2 +- docs/functions/flushCache.html | 2 +- docs/functions/get.html | 2 +- docs/functions/getAndRemove.html | 2 +- docs/functions/getAndReplace.html | 2 +- docs/functions/getAndUpdate.html | 2 +- docs/functions/idConverter.html | 2 +- docs/functions/increment.html | 2 +- docs/functions/insert.html | 2 +- docs/functions/insertReference.html | 2 +- docs/functions/isReferenced.html | 2 +- docs/functions/listCollections.html | 6 +-- docs/functions/multiply.html | 2 +- docs/functions/native.html | 2 +- docs/functions/pull.html | 2 +- docs/functions/push.html | 2 +- docs/functions/queryReferenced.html | 2 +- docs/functions/remove.html | 2 +- docs/functions/removeReference.html | 2 +- docs/functions/renameCollection.html | 6 +-- docs/functions/replace.html | 2 +- docs/functions/replaceReferences.html | 2 +- docs/functions/save.html | 2 +- docs/functions/truncate.html | 2 +- docs/functions/update.html | 2 +- docs/interfaces/AggregateRunOptions.html | 6 +-- docs/interfaces/BulkInsertResult.html | 4 +- docs/interfaces/HookContext.html | 4 +- docs/interfaces/IncludeObject.html | 14 ++--- docs/interfaces/WeivDataAggregateResult.html | 10 ++-- docs/interfaces/WeivDataBulkRemoveResult.html | 6 +-- docs/interfaces/WeivDataBulkSaveResult.html | 10 ++-- docs/interfaces/WeivDataBulkUpdateResult.html | 6 +-- docs/interfaces/WeivDataOptions.html | 4 +- docs/interfaces/WeivDataOptionsCache.html | 4 +- .../WeivDataQueryReferencedResult.html | 14 ++--- docs/interfaces/WeivDataQueryResult.html | 22 ++++---- docs/interfaces/WeivDataSaveResult.html | 6 +-- docs/types/CacheSelections.html | 2 +- docs/types/CollectionID.html | 2 +- docs/types/EnableVisitorID.html | 2 +- docs/types/HookArgs.html | 2 +- docs/types/HookName.html | 2 +- docs/types/HooksResults.html | 2 +- docs/types/Item.html | 2 +- docs/types/ItemID.html | 2 +- docs/types/ItemIDs.html | 2 +- docs/types/Items.html | 2 +- docs/types/ReadConcern.html | 2 +- docs/types/ReferencedItem.html | 2 +- docs/types/ReferringItem.html | 2 +- docs/types/SuppressAuth.html | 2 +- docs/types/SuppressHooks.html | 2 +- .../types/WeivDataQueryReferencedOptions.html | 2 +- 63 files changed, 167 insertions(+), 167 deletions(-) diff --git a/docs/classes/WeivDataAggregate.html b/docs/classes/WeivDataAggregate.html index ba1bb6ea..8800f6ab 100644 --- a/docs/classes/WeivDataAggregate.html +++ b/docs/classes/WeivDataAggregate.html @@ -6,7 +6,7 @@
  • Language Filters (Filter aggregations based on a language)
  • More!
  • -

    Hierarchy

    • InternalWeivDataAggregateResult
      • WeivDataAggregate

    Methods

    Hierarchy

    • InternalWeivDataAggregateResult
      • WeivDataAggregate

    Methods

    ascending avg count descending @@ -24,32 +24,32 @@

    Returns WeivDataAggregate

    A WeivDataAggregate object representing the refined aggregation.

    Example

    import weivData from '@exweiv/weiv-data';

    const aggregateResult = await weivData.aggregate("Clusters/AiModels")
    .ascending("modelType")
    .run(options)

    console.log(aggregateResult);
    -
    • Refines a WeivDataAggregate to only contain the average value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the average valu

      • projectedName: string = ...

        The name of the property in the aggregation results containing the average value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .avg("trainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to contain the item count of each group in the aggregation.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("modelType", "trainedDataSize")
      .count()
      .run(options)

      console.log(aggregateResult);
      -
    • Adds a sort to an aggregation, sorting by the items or groups by the specified properties in descending order.

      Parameters

      • propertyName: string

        The properties used in the sort.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .descending("modelType")
      .run(options)

      console.log(aggregateResult);
      -
    • Filters out items from being used in an aggregation.

      Parameters

      • filter: WeivDataFilter

        The filter to use to filter out items from being used in the aggregation.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let filter = weivData.filter().eq("modelType", "S1");

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .filter(filter)
      .run(options)

      console.log(aggregateResult);
      -
    • Groups items together in an aggregation.

      Parameters

      • Rest ...propertyName: string[]

        The property or properties to group on.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("t2Members", "t1Members")
      .run(options)

      console.log(aggregateResult);
      -
    • Filters out groups from being returned from an aggregation.

      Note: possible bug! This function may not work as you expect!

      @@ -57,37 +57,37 @@

    Returns WeivDataAggregate

    A WeivDataAggregate object representing the refined aggregation.

    Example

    import weivData from '@exweiv/weiv-data';

    let having = weivData.filter().gt("trainedDataSize", 100000000)

    const aggregateResult = await weivData.aggregate("Clusters/AiModels")
    .having(having)
    .max("trainedDataSize", "maxTrainedDataSize")
    .run(options)

    console.log(aggregateResult);
    -
    • Limits the number of items or groups the aggregation returns.

      Parameters

      • limit: number

        The number of items or groups to return.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let having = weivData.filter().gt("trainedDataSize", 100000000)

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .having(having)
      .max("trainedDataSize", "maxTrainedDataSize")
      .limit(150)
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to only contain the maximum value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the maximum value.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the maximum value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      let having = weivData.filter().gt("trainedDataSize", 100000000)

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .having(having)
      .max("trainedDataSize", "maxTrainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to only contain the minimum value from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the minimum value.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the minimum value.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .min("trainedDataSize", "minTrainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -
    • Runs the aggregation and returns the results.

      Parameters

      Returns Promise<WeivDataAggregateResult>

      Fulfilled - A Promise that resolves to the results of the aggregation. Rejected - Error that caused the aggregation to fail.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter().gt("trainedDataSize", 100000000);

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .group("modelType", "trainedDataSize", "t1Members")
      .filter(filter)
      .descending("trainedDataSize")
      .skip(5)
      .limit(118)
      .run({suppressAuth: true})

      console.log(aggregateResult);
      -
    • Sets the number of items or groups to skip before returning aggregation results.

      Parameters

      • skip: number

        The number of items or groups to skip in the aggregation results before returning the results.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .max("trainedDataSize", "maxTrainedDataSize")
      .skip(18)
      .run(options)

      console.log(aggregateResult);
      -
    • Refines a WeivDataAggregate to contain the sum from each aggregation group.

      Parameters

      • propertyName: string

        The property in which to find the sum.

      • projectedName: string = ...

        The name of the property in the aggregation results containing the sum.

      Returns WeivDataAggregate

      A WeivDataAggregate object representing the refined aggregation.

      Example

      import weivData from '@exweiv/weiv-data';

      const aggregateResult = await weivData.aggregate("Clusters/AiModels")
      .sum("trainedDataSize")
      .run(options)

      console.log(aggregateResult);
      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/WeivDataFilter.html b/docs/classes/WeivDataFilter.html index a8d01dd5..c6f8c4c2 100644 --- a/docs/classes/WeivDataFilter.html +++ b/docs/classes/WeivDataFilter.html @@ -5,7 +5,7 @@
  • AI (AI based auto generated filters for some operations such as searhing products etc.)
  • Language (Language filtering method.)
  • -

    Methods

    and +

    Methods

    and between contains endsWith @@ -27,95 +27,95 @@

    Returns WeivDataFilter

    A WeivDataFilter object representing the refined filters.

    Example

    import weivData from '@exweiv/weiv-data';

    const orFilter = weivData.filter("Clusters/IST12").eq("balance", 0);
    const andFilter = weivData.filter("Clusters/IST12").gt("balance", 10000).or(orFilter);

    const filter = weivData.filter("Clusters/IST12")
    .eq("memberTier", 1)
    .and(andFilter)
    -
    • Refines a query or filter to match items whose specified property value is within a specified range.

      +
    • Refines a query or filter to match items whose specified property value is within a specified range.

      Parameters

      • propertyName: string

        The property whose value will be compared with rangeStart and rangeEnd.

      • rangeStart: any

        The beginning value of the range to match against.

      • rangeEnd: any

        The ending value of the range to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").between("memberTier", 1, 2);
      -
    • Refines a query or filter to match items whose specified property value contains a specified string.

      Parameters

      • propertyName: string
      • string: string

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").contains("location", "IST");
      -
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the end of the specified property value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").endsWith("location", "1-2");
      -
    • Refines a query or filter to match items whose specified property value equals the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Istanbul").eq("location", "IST 1-2");
      -
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Uskudar").ge("balance", 1699);
      -
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Uskudar").gt("balance", 1699);
      -
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Besiktas")
      .gt("balance", 1699)
      .hasAll("availableCPUs", ["M1", "S1", "F2", "E7"])
      -
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/Besiktas")
      .eq("genericAPIsEnabled", true)
      .hasSome("availableCPUs", ["M1", "T1"])
      -
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      Parameters

      • propertyName: string

        The the property in which to check for a value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").isEmpty("genericAPIsEnabled")
      -
    • Refines a query or filter to match items whose specified property has any value.

      Parameters

      • propertyName: string

        The property in which to check for a value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").isNotEmpty("genericAPIsEnabled")
      -
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").le("maxCPUTime", 200)
      -
    • Refines a query or filter to match items whose specified property value is less than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/IST12").lt("maxCPUTime", 50)
      -
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").ne("location", "Ankara")
      -
    • Adds a not condition to the query or filter.

      Parameters

      • query: WeivDataFilter

        A query to add to the initial query as a not condition.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const notFilter = weivData.filter("Clusters/IST12").eq("balance", 0).gt("balance", 1000);

      const filter = weivData.filter("Clusters/IST12")
      .eq("memberTier", 1)
      .not(notFilter)
      -
    • Adds an or condition to the query or filter.

      Parameters

      • query: WeivDataFilter

        A query to add to the initial query as an or condition.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const orFilter = weivData.filter("Clusters/IST12").eq("balance", 0);
      const andFilter = weivData.filter("Clusters/IST12").gt("balance", 10000).or(orFilter);

      const filter = weivData.filter("Clusters/IST12")
      .eq("memberTier", 1)
      .and(andFilter)
      -
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the beginning of the specified property value.

      Returns WeivDataFilter

      A WeivDataFilter object representing the refined filters.

      Example

      import weivData from '@exweiv/weiv-data';

      const filter = weivData.filter("Clusters/All").startsWith("location", "IST")
      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/WeivDataQuery.html b/docs/classes/WeivDataQuery.html index 931dcd09..df8ba244 100644 --- a/docs/classes/WeivDataQuery.html +++ b/docs/classes/WeivDataQuery.html @@ -7,7 +7,7 @@
  • Language (Auto language filtering)
  • More!
  • -

    Methods

    and +

    Methods

    and ascending between contains @@ -36,109 +36,109 @@

    Methods

    • Adds a sort to a query or sort, sorting by the specified properties in ascending order.

      Parameters

      • Rest ...propertyName: string[]

        The properties used in the sort.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).ascending("clusterType").find();
      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is within a specified range.

      +
    • Refines a query or filter to match items whose specified property value is within a specified range.

      Parameters

      • propertyName: string

        The property whose value will be compared with rangeStart and rangeEnd.

      • rangeStart: any

        The beginning value of the range to match against.

      • rangeEnd: any

        The ending value of the range to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value contains a specified string.

      +
    • Refines a query or filter to match items whose specified property value contains a specified string.

      Parameters

      • propertyName: string
      • string: string

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Returns the number of items that match the query.

      +
    • Returns the number of items that match the query.

      Parameters

      • options: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<number>

      Fulfilled - The number of items that match the query. Rejected - The errors that caused the rejection.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).count();
      console.log(queryResult);
      -
    • Adds a sort to a query or sort, sorting by the specified properties in descending order.

      Parameters

      • Rest ...propertyName: string[]

        The properties used in the sort.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).descending("clusterType").find();
      console.log(queryResult);
      -
    • Returns the distinct values that match the query, without duplicates.

      Parameters

      • propertyName: string

        The property whose value will be compared for distinct values.

      • options: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<WeivDataQueryResult>

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).distinct("clusterType");
      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      +
    • Refines a query or filter to match items whose specified property value ends with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the end of the specified property value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value equals the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Lists the fields to return in a query's results.

      Parameters

      • Rest ...propertyName: string[]

        Properties to return. To return multiple properties, pass properties as additional arguments.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12").hasSome("availableCPUs", ["M1", "S1", "A2"]).fields("clusterType", "balance", "_updatedDate").find({suppressHooks: true});
      console.log(queryResult);
      -
    • Returns the items that match the query.

      Parameters

      Returns Promise<WeivDataQueryResult>

      Fulfilled - A Promise that resolves to the results of the query. Rejected - Error that caused the query to fail.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .fields("clusterType", "balance", "_updatedDate")
      .find({suppressHooks: true, readConcern: true});

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      +
    • Refines a query or filter to match items whose specified property value is greater than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      +
    • Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The values to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Includes referenced items for the specified properties in a query's results.

      Parameters

      • Rest ...includes: IncludeObject[]

        Array of objects that you want to include with details

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .find({suppressHooks: true, readConcern: true});

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      +
    • Refines a query or filter to match items whose specified property does not exist or does not have any value.

      Parameters

      • propertyName: string

        The the property in which to check for a value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property has any value.

      Parameters

      • propertyName: string

        The property in which to check for a value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      +
    • Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Limits the number of items the query returns.

      Parameters

      • limit: number

        The number of items to return, which is also the pageSize of the results object.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .limit(20)
      .find();

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value is less than the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      +
    • Refines a query or filter to match items whose specified property value does not equal the specified value.

      Parameters

      • propertyName: string

        The property whose value will be compared with value.

      • value: any

        The value to match against.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -
    • Sets the number of items to skip before returning query results.

      Parameters

      • skip: number

        The number of items to skip in the query results before returning the results.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      Example

      import weivData from '@exweiv/weiv-data';

      const queryResult = await weivData.query("Clusters/IST12")
      .eq("memberTier", 1)
      .include("members", "CPUs")
      .hasSome("availableCPUs", ["M1", "S1", "A2"])
      .skip(20)
      .limit(200)
      .find();

      console.log(queryResult);
      -
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      +
    • Refines a query or filter to match items whose specified property value starts with a specified string.

      Parameters

      • propertyName: string

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the beginning of the specified property value.

      Returns WeivDataQuery

      A WeivDataQuery object representing the refined query.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkInsert.html b/docs/functions/bulkInsert.html index baa5c3ed..fbe14c83 100644 --- a/docs/functions/bulkInsert.html +++ b/docs/functions/bulkInsert.html @@ -5,4 +5,4 @@

    Returns Promise<BulkInsertResult>

    Fulfilled - The results of the bulk insert. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk inserted
    const itemsToInsert = [{...}, {...}, {...}]

    const result = await weivData.bulkInsert("Clusters/Odunpazari", itemsToInsert)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkRemove.html b/docs/functions/bulkRemove.html index 5b8c4f2a..1ae5ec3b 100644 --- a/docs/functions/bulkRemove.html +++ b/docs/functions/bulkRemove.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkRemoveResult>

    Fulfilled - The results of the bulk remove. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item IDs that will be bulk removed
    const itemsToRemove = ["...", "...", "..."]

    const result = await weivData.bulkRemove("Clusters/Odunpazari", itemsToRemove)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkSave.html b/docs/functions/bulkSave.html index b4a798a7..3d461df4 100644 --- a/docs/functions/bulkSave.html +++ b/docs/functions/bulkSave.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkSaveResult>

    Fulfilled - The results of the bulk save. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk saved
    const itemsToSave = [{...}, {...}, {...}]

    const result = await weivData.bulkSave("Clusters/Odunpazari", itemsToSave)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/bulkUpdate.html b/docs/functions/bulkUpdate.html index f67fad0c..33ec7341 100644 --- a/docs/functions/bulkUpdate.html +++ b/docs/functions/bulkUpdate.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataBulkUpdateResult>

    Fulfilled - The results of the bulk save. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Items that will be bulk updated
    const itemsToUpdate = [{...}, {...}, {...}]

    const result = await weivData.bulkUpdate("Clusters/Odunpazari", itemsToUpdate)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/createCollection.html b/docs/functions/createCollection.html index 9411faf5..88d764c2 100644 --- a/docs/functions/createCollection.html +++ b/docs/functions/createCollection.html @@ -1,8 +1,8 @@ -createCollection | WeivData Library Documentation - ExWeiv Apps
    • Creates a new collection inside of a selected database. (User must have createCollection permission inside MongoDB dashboard, you can also use suppressAuth with options).

      +createCollection | WeivData Library Documentation - ExWeiv Apps
      • Creates a new collection inside of a selected database. (User must have createCollection permission inside MongoDB dashboard, you can also use suppressAuth with options).

        Parameters

        • collectionId: string

          CollectionID (< database >/< collection >).

        • Optional options: WeivDataOptions

          An object containing options to use when processing this operation.

        • Optional createOptions: CreateCollectionOptions

          Native options of MongoDB driver when creating a collection. Checkout here.

          -

        Returns Promise<Collection>

        Fulfilled - The Collection cursor of native MongoDB driver.

        +

    Returns Promise<void>

    void

    Example

    import { createCollection } from '@exweiv/weiv-data';

    createCollection('Database/NewCollectionName', { suppressAuth: true });
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/deleteCollection.html b/docs/functions/deleteCollection.html index 4e5ee465..ac460df6 100644 --- a/docs/functions/deleteCollection.html +++ b/docs/functions/deleteCollection.html @@ -5,4 +5,4 @@

    Returns Promise<boolean>

    Fulfilled - True if succeed.

    Example

    import { deleteCollection } from '@exweiv/weiv-data';

    deleteCollection('Database/ExistingCollectionName', { suppressAuth: true });
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/findOne.html b/docs/functions/findOne.html index e160d85d..64fa04a2 100644 --- a/docs/functions/findOne.html +++ b/docs/functions/findOne.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const filteredItem = await weivData.findOne("Db/Collection", "name", "John");
    console.log(filteredItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/flushCache.html b/docs/functions/flushCache.html index 5af3b70b..76b35d5a 100644 --- a/docs/functions/flushCache.html +++ b/docs/functions/flushCache.html @@ -1,3 +1,3 @@ flushCache | WeivData Library Documentation - ExWeiv Apps
    • Use when you want to flush the caches internally. You can choose caches to flush or pass empty array to flush all of them.

      Parameters

      • Optional filters: CacheSelections[]

        Filter which cache to flush. Pass empty array to flush all of them.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/get.html b/docs/functions/get.html index 39adfefa..1d63f192 100644 --- a/docs/functions/get.html +++ b/docs/functions/get.html @@ -5,4 +5,4 @@

    Returns Promise<Item | null>

    Fulfilled - The retrieved item or null if not found. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item ID
    const itemId = "..."

    const result = await weivData.get("Clusters/All", itemId)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndRemove.html b/docs/functions/getAndRemove.html index 3368ffd7..a5920bb7 100644 --- a/docs/functions/getAndRemove.html +++ b/docs/functions/getAndRemove.html @@ -5,4 +5,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const removedItem = await weivData.getAndRemove("Db/Collection", itemId);
    console.log(removedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndReplace.html b/docs/functions/getAndReplace.html index c280ff21..b93a4fc7 100644 --- a/docs/functions/getAndReplace.html +++ b/docs/functions/getAndReplace.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const replacedItem = await weivData.getAndReplace("Db/Collection", itemId, {...});
    console.log(replacedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/getAndUpdate.html b/docs/functions/getAndUpdate.html index 7d85064d..c1e640c8 100644 --- a/docs/functions/getAndUpdate.html +++ b/docs/functions/getAndUpdate.html @@ -6,4 +6,4 @@

    Returns Promise<Item | undefined>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const updatedItem = await weivData.getAndUpdate("Db/Collection", itemId, {...});
    console.log(updatedItem);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/idConverter.html b/docs/functions/idConverter.html index be1de327..42541da3 100644 --- a/docs/functions/idConverter.html +++ b/docs/functions/idConverter.html @@ -2,4 +2,4 @@

    Parameters

    • id: string | ObjectId

      ID you want to convert can be string or a valid ObjectId

    • Optional stringMethod: "base64" | "hex"

      Optional converting method can be "base64" or "hex" defaults to "hex"

    Returns ObjectId | string

    ObjectId or string reverse of the input

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/increment.html b/docs/functions/increment.html index 6087694e..2d05e458 100644 --- a/docs/functions/increment.html +++ b/docs/functions/increment.html @@ -7,4 +7,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.increment("Db/Collection", itemId, "numberField", 18 {...});
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/insert.html b/docs/functions/insert.html index 317d7ff6..1f132708 100644 --- a/docs/functions/insert.html +++ b/docs/functions/insert.html @@ -5,4 +5,4 @@

    Returns Promise<Item>

    Fulfilled - The item that was added. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item that will be inserted
    const item = {...}

    const result = await weivData.insert("Clusters/All", item)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/insertReference.html b/docs/functions/insertReference.html index 59ba9707..ce7c9759 100644 --- a/docs/functions/insertReference.html +++ b/docs/functions/insertReference.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been inserted. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be inserted. `ItemId[]`
    const cpus = ["cpuId2", "cpuId4"]

    const result = await weivData.insertReference("Clusters/Ortakoy", "availableCPUs", itemId, cpus)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/isReferenced.html b/docs/functions/isReferenced.html index e4d6404e..026384f0 100644 --- a/docs/functions/isReferenced.html +++ b/docs/functions/isReferenced.html @@ -7,4 +7,4 @@

    Returns Promise<boolean>

    Fulfilled - Whether the referring item contains a reference to the referenced item or not. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be checked if exists. `ItemId[]`
    const cpus = ["cpuId1"]

    const result = await weivData.isReferenced("Clusters/Ortakoy", "availableCPUs", itemId, cpus);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/listCollections.html b/docs/functions/listCollections.html index 24b5da43..d03e17f7 100644 --- a/docs/functions/listCollections.html +++ b/docs/functions/listCollections.html @@ -1,9 +1,9 @@ -listCollections | WeivData Library Documentation - ExWeiv Apps
    • Lists collections inside of a selected database. (User must have listCollections permission inside MongoDB dashboard, you can also use suppressAuth with options).

      +listCollections | WeivData Library Documentation - ExWeiv Apps
      • Lists collections inside of a selected database. (User must have listCollections permission inside MongoDB dashboard, you can also use suppressAuth with options).

        Parameters

        • databaseName: string

          Database name that you want to get the collections of.

        • Optional options: WeivDataOptions

          An object containing options to use when processing this operation.

        • Optional filter: Document

          MongoDB native filtering options. Read more in native docs.

        • Optional listOptions: ListCollectionsOptions

          MongoDB native listCollections options. Read more in native docs.

          -

        Returns Promise<ListCollectionsCursor>

        Fulfilled - Native ListCollectionsCursor of MongoDB driver.

        +

    Returns Promise<CollectionInfo[]>

    Fulfilled - Array of [CollectionInfo](https://mongodb.github.io/node-mongodb-native/6.3/interfaces/CollectionInfo.html)

    Example

    import { listCollections } from '@exweiv/weiv-data';

    listCollections('DatabaseName', { suppressAuth: true });
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/multiply.html b/docs/functions/multiply.html index de0883c4..5d4323ea 100644 --- a/docs/functions/multiply.html +++ b/docs/functions/multiply.html @@ -7,4 +7,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.multiply("Db/Collection", itemId, "numberField", 3 {...});
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/native.html b/docs/functions/native.html index 6b7338d8..e466c460 100644 --- a/docs/functions/native.html +++ b/docs/functions/native.html @@ -6,4 +6,4 @@

    Returns Promise<Collection>

    Fulfilled - Native MongoDB Collection cursor.

    Example

    import weivData from '@exweiv/weiv-data';

    const nativeCollectionObject = await weivData.native("Finance/Income", false);

    // Perform actions with native collection cursor provided by MongoDB
    // Check [MongoDB Atlas APIs (JS)](https://mongodb.github.io/node-mongodb-native/5.9/) to udnerstand how to use it.
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/pull.html b/docs/functions/pull.html index d169b14b..6aa52a0d 100644 --- a/docs/functions/pull.html +++ b/docs/functions/pull.html @@ -8,4 +8,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.pull("Db/Collection", itemId, "arrField", [...], -1);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/push.html b/docs/functions/push.html index 6a0b529b..50ae883f 100644 --- a/docs/functions/push.html +++ b/docs/functions/push.html @@ -8,4 +8,4 @@

    Returns Promise<Item | null>

    Fulfilled - Updated item

    Example

    import weivData from '@exweiv/weiv-data';

    const itemId = "...";
    const result = await weivData.push("Db/Collection", itemId, "arrField", [...], -1);
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/queryReferenced.html b/docs/functions/queryReferenced.html index 46a3951e..ecd02b8b 100644 --- a/docs/functions/queryReferenced.html +++ b/docs/functions/queryReferenced.html @@ -8,4 +8,4 @@

    Returns Promise<WeivDataQueryReferencedResult>

    Fulfilled - The referenced items. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item ID that will be used when searching for references
    const itemId = "..."

    const result = await weivData.queryReferenced("Clusters/All", "clusterLocations", itemId, {readConcern: true})

    if (result.hasNext()) {
    const nextPage = await result.next();
    console.log(result, nextPage);
    } else {
    console.log(result);
    }
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/remove.html b/docs/functions/remove.html index 3a7280ba..1eb920fe 100644 --- a/docs/functions/remove.html +++ b/docs/functions/remove.html @@ -5,4 +5,4 @@

    Returns Promise<Item | null>

    Fulfilled - The removed item, or null if the item was not found. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // ID of item that will be removed
    const itemId = "..."

    const result = await weivData.remove("Clusters/Riva", itemId)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/removeReference.html b/docs/functions/removeReference.html index 67af059c..c1ecb522 100644 --- a/docs/functions/removeReference.html +++ b/docs/functions/removeReference.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been removed. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // References to be removed. `ItemId[]`
    const cpus = ["cpuId1", "cpuId3"]

    const result = await weivData.removeReference("Clusters/Ortakoy", "availableCPUs", itemId, cpus, {suppressAuth: true})
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/renameCollection.html b/docs/functions/renameCollection.html index 4be3d29a..b77c6002 100644 --- a/docs/functions/renameCollection.html +++ b/docs/functions/renameCollection.html @@ -1,9 +1,9 @@ -renameCollection | WeivData Library Documentation - ExWeiv Apps
    • Renames a collection inside of a selected database. (User must have renameCollection permission inside MongoDB dashboard, you can also use suppressAuth with options).

      +renameCollection | WeivData Library Documentation - ExWeiv Apps
      • Renames a collection inside of a selected database. (User must have renameCollection permission inside MongoDB dashboard, you can also use suppressAuth with options).

        Parameters

        • collectionId: string

          CollectionID (< database >/< collection >).

        • newCollectionName: string

          New name of collection.

        • Optional options: WeivDataOptions

          An object containing options to use when processing this operation.

        • Optional renameOptions: RenameOptions

          Native options of MongoDB driver when renaming a collection. Checkout here.

          -

        Returns Promise<Collection>

        Fulfilled - The Collection cursor of native MongoDB driver.

        +

    Returns Promise<void>

    void

    Example

    import { renameCollection } from '@exweiv/weiv-data';

    renameCollection('Database/ExistingCollectionName', 'NewCollectionName', { suppressAuth: true });
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/replace.html b/docs/functions/replace.html index 49d763c4..79065fb1 100644 --- a/docs/functions/replace.html +++ b/docs/functions/replace.html @@ -6,4 +6,4 @@

    Returns Promise<Item>

    Fulfilled - The object that was replaced. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item with an id
    const updatedVersion = {...}
    // Options for the operation
    const options = {suppressHooks: true};

    const result = await weivData.replace("Clusters/IST57", updatedVersion, options)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/replaceReferences.html b/docs/functions/replaceReferences.html index e5ec4e83..bfea574e 100644 --- a/docs/functions/replaceReferences.html +++ b/docs/functions/replaceReferences.html @@ -7,4 +7,4 @@

    Returns Promise<void>

    Fulfilled - When the references have been inserted. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // Item id
    const itemId = "..."

    // New references
    const cpus = ["cpuId1", "cpuId2", "cpuId3", ...]

    const result = await weivData.replaceReferences("Clusters/Ortakoy", "availableCPUs", itemId, cpus, {suppressAuth: true})
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/save.html b/docs/functions/save.html index 5c086a50..7d440e27 100644 --- a/docs/functions/save.html +++ b/docs/functions/save.html @@ -5,4 +5,4 @@

    Returns Promise<WeivDataSaveResult>

    Fulfilled - The item that was either inserted or updated, depending on whether it previously existed in the collection. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item/object for save operation
    const item = {
    location: "Riva 7",
    _id: "...", // Item id (optional)
    availableCPUs: ["M1", "A7", "R1"]
    }

    const result = await weivData.save("Clusters/Riva", itemData)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/truncate.html b/docs/functions/truncate.html index 11ad2ffb..2a7f315f 100644 --- a/docs/functions/truncate.html +++ b/docs/functions/truncate.html @@ -4,4 +4,4 @@

    Returns Promise<boolean>

    Fulfilled - When the items have been removed. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    const result = await weivData.truncate("Clusters/Uskudar");
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/update.html b/docs/functions/update.html index 732002ff..07b8115b 100644 --- a/docs/functions/update.html +++ b/docs/functions/update.html @@ -9,4 +9,4 @@

    Returns Promise<Item>

    Fulfilled - The object that was updated. Rejected - The error that caused the rejection.

    Example

    import weivData from '@exweiv/weiv-data';

    // An item with an id
    const updatedVersion = {...}
    // Options for the operation
    const options = {suppressHooks: true};

    const result = await weivData.update("Clusters/IST12", updatedVersion, options)
    console.log(result);
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/AggregateRunOptions.html b/docs/interfaces/AggregateRunOptions.html index 82ee4a57..c038bfee 100644 --- a/docs/interfaces/AggregateRunOptions.html +++ b/docs/interfaces/AggregateRunOptions.html @@ -1,6 +1,6 @@ AggregateRunOptions | WeivData Library Documentation - ExWeiv Apps

    Options to use when running an aggregation.

    -
    interface AggregateRunOptions {
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
    }

    Properties

    interface AggregateRunOptions {
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
    }

    Properties

    readConcern?: ReadConcernLevel

    Enable consistent read from clusters. This will change the readConvern to "majority", in this way you'll get the most up to date data.

    -
    suppressAuth?: boolean

    Bypass permissions of user when using aggregate. When set to true admin uri will be used automatically.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    suppressAuth?: boolean

    Bypass permissions of user when using aggregate. When set to true admin uri will be used automatically.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/BulkInsertResult.html b/docs/interfaces/BulkInsertResult.html index 45cf73ab..188dc9dd 100644 --- a/docs/interfaces/BulkInsertResult.html +++ b/docs/interfaces/BulkInsertResult.html @@ -1,5 +1,5 @@ BulkInsertResult | WeivData Library Documentation - ExWeiv Apps

    Adds a number of items to a collection.

    -
    interface BulkInsertResult {
        inserted: number;
        insertedItemIds: {
            [key: number]: ObjectId;
        };
        insertedItems: Items;
    }

    Properties

    interface BulkInsertResult {
        inserted: number;
        insertedItemIds: {
            [key: number]: ObjectId;
        };
        insertedItems: Items;
    }

    Properties

    inserted: number
    insertedItemIds: {
        [key: number]: ObjectId;
    }

    Type declaration

    • [key: number]: ObjectId
    insertedItems: Items

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    inserted: number
    insertedItemIds: {
        [key: number]: ObjectId;
    }

    Type declaration

    • [key: number]: ObjectId
    insertedItems: Items

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/HookContext.html b/docs/interfaces/HookContext.html index eb4b5a3c..cb942d89 100644 --- a/docs/interfaces/HookContext.html +++ b/docs/interfaces/HookContext.html @@ -1,5 +1,5 @@ -HookContext | WeivData Library Documentation - ExWeiv Apps
    interface HookContext {
        collectionName: string;
        dbName: string;
        userId?: string;
        userRoles: undefined | any[];
    }

    Properties

    collectionName +HookContext | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    collectionName: string
    dbName: string
    userId?: string
    userRoles: undefined | any[]

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/IncludeObject.html b/docs/interfaces/IncludeObject.html index ab862602..61d30d3b 100644 --- a/docs/interfaces/IncludeObject.html +++ b/docs/interfaces/IncludeObject.html @@ -1,13 +1,13 @@ -IncludeObject | WeivData Library Documentation - ExWeiv Apps
    interface IncludeObject {
        as?: string;
        collectionName: string;
        countItems?: boolean;
        fieldName: string;
        foreignField?: string;
        maxItems?: number;
    }

    Properties

    as? +IncludeObject | WeivData Library Documentation - ExWeiv Apps
    interface IncludeObject {
        as?: string;
        collectionName: string;
        countItems?: boolean;
        fieldName: string;
        foreignField?: string;
        maxItems?: number;
    }

    Properties

    as?: string

    Custom return name for included items. Defaults to fieldName.

    -
    collectionName: string

    Collection of referenced item/s (only collection name)

    -
    countItems?: boolean

    Enable counting total items or not. Defaults to false.

    -
    fieldName: string

    Property/field name of referenced items in the current item.

    -
    foreignField?: string

    Foreign field name. Defaults to _id.

    -
    maxItems?: number

    Maximum number of items to include. Defaults to 50.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    collectionName: string

    Collection of referenced item/s (only collection name)

    +
    countItems?: boolean

    Enable counting total items or not. Defaults to false.

    +
    fieldName: string

    Property/field name of referenced items in the current item.

    +
    foreignField?: string

    Foreign field name. Defaults to _id.

    +
    maxItems?: number

    Maximum number of items to include. Defaults to 50.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataAggregateResult.html b/docs/interfaces/WeivDataAggregateResult.html index 2c6b9603..4e034be6 100644 --- a/docs/interfaces/WeivDataAggregateResult.html +++ b/docs/interfaces/WeivDataAggregateResult.html @@ -1,10 +1,10 @@ -WeivDataAggregateResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataAggregateResult {
        items: Items;
        length: number;
        hasNext(): boolean;
        next(): Promise<WeivDataAggregateResult>;
    }

    Properties

    items +WeivDataAggregateResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataAggregateResult {
        items: Items;
        length: number;
        hasNext(): boolean;
        next(): Promise<WeivDataAggregateResult>;
    }

    Properties

    Methods

    Properties

    items: Items

    Gets the aggregated values.

    -
    length: number

    Returns the number of values in the aggregate results.

    -

    Methods

    length: number

    Returns the number of values in the aggregate results.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkRemoveResult.html b/docs/interfaces/WeivDataBulkRemoveResult.html index aaa7b305..f3fd15ba 100644 --- a/docs/interfaces/WeivDataBulkRemoveResult.html +++ b/docs/interfaces/WeivDataBulkRemoveResult.html @@ -1,6 +1,6 @@ WeivDataBulkRemoveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkRemove function.

    -
    interface WeivDataBulkRemoveResult {
        removed: number;
        removedItemIds: ItemIDs;
    }

    Properties

    interface WeivDataBulkRemoveResult {
        removed: number;
        removedItemIds: ItemIDs;
    }

    Properties

    removed: number

    Number of removed items.

    -
    removedItemIds: ItemIDs

    Removed item ids.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    removedItemIds: ItemIDs

    Removed item ids.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkSaveResult.html b/docs/interfaces/WeivDataBulkSaveResult.html index 29333810..2034369e 100644 --- a/docs/interfaces/WeivDataBulkSaveResult.html +++ b/docs/interfaces/WeivDataBulkSaveResult.html @@ -1,10 +1,10 @@ WeivDataBulkSaveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkSave function.

    -
    interface WeivDataBulkSaveResult {
        inserted: number;
        insertedItemIds: ItemIDs;
        savedItems: Items;
        updated: number;
    }

    Properties

    interface WeivDataBulkSaveResult {
        inserted: number;
        insertedItemIds: ItemIDs;
        savedItems: Items;
        updated: number;
    }

    Properties

    inserted: number

    Number of inserted items.

    -
    insertedItemIds: ItemIDs

    Inserted item ids.

    -
    savedItems: Items

    Saved items.

    -
    updated: number

    Number of updated items.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    insertedItemIds: ItemIDs

    Inserted item ids.

    +
    savedItems: Items

    Saved items.

    +
    updated: number

    Number of updated items.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataBulkUpdateResult.html b/docs/interfaces/WeivDataBulkUpdateResult.html index 098f08d4..1379b1ed 100644 --- a/docs/interfaces/WeivDataBulkUpdateResult.html +++ b/docs/interfaces/WeivDataBulkUpdateResult.html @@ -1,6 +1,6 @@ WeivDataBulkUpdateResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for bulkUpdate function.

    -
    interface WeivDataBulkUpdateResult {
        updated: number;
        updatedItems: Items;
    }

    Properties

    interface WeivDataBulkUpdateResult {
        updated: number;
        updatedItems: Items;
    }

    Properties

    updated: number

    Number of updated items.

    -
    updatedItems: Items

    Updated items.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    updatedItems: Items

    Updated items.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataOptions.html b/docs/interfaces/WeivDataOptions.html index da6b9771..9408929b 100644 --- a/docs/interfaces/WeivDataOptions.html +++ b/docs/interfaces/WeivDataOptions.html @@ -1,6 +1,6 @@ WeivDataOptions | WeivData Library Documentation - ExWeiv Apps

    An object containing options to use when processing an operation in weiv-data.

    -
    interface WeivDataOptions {
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    interface WeivDataOptions {
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataOptionsCache.html b/docs/interfaces/WeivDataOptionsCache.html index 92e2d23e..b3776d4a 100644 --- a/docs/interfaces/WeivDataOptionsCache.html +++ b/docs/interfaces/WeivDataOptionsCache.html @@ -1,8 +1,8 @@ WeivDataOptionsCache | WeivData Library Documentation - ExWeiv Apps

    Control the cache mechanism in weiv-data and optimize your read operations by saving results. Cache is disabled by default.

    -
    interface WeivDataOptionsCache {
        cacheTimeout?: number;
        enableCache?: boolean;
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    interface WeivDataOptionsCache {
        cacheTimeout?: number;
        enableCache?: boolean;
        enableVisitorId?: boolean;
        readConcern?: ReadConcernLevel;
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (view full)

    Properties

    cacheTimeout?: number
    enableCache?: boolean
    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    cacheTimeout?: number
    enableCache?: boolean
    enableVisitorId?: boolean
    readConcern?: ReadConcernLevel
    suppressAuth?: boolean
    suppressHooks?: boolean

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataQueryReferencedResult.html b/docs/interfaces/WeivDataQueryReferencedResult.html index bbe2bba4..3ce99946 100644 --- a/docs/interfaces/WeivDataQueryReferencedResult.html +++ b/docs/interfaces/WeivDataQueryReferencedResult.html @@ -1,16 +1,16 @@ WeivDataQueryReferencedResult | WeivData Library Documentation - ExWeiv Apps

    Result object of queryReferenced function.

    -
    interface WeivDataQueryReferencedResult {
        items: Items;
        totalCount: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryReferencedResult>;
        prev(): Promise<WeivDataQueryReferencedResult>;
    }

    Properties

    interface WeivDataQueryReferencedResult {
        items: Items;
        totalCount: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryReferencedResult>;
        prev(): Promise<WeivDataQueryReferencedResult>;
    }

    Properties

    items: Items

    Returns the items that match the reference query.

    -
    totalCount: number

    Returns the total number of items that match the reference query.

    -

    Methods

    totalCount: number

    Returns the total number of items that match the reference query.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataQueryResult.html b/docs/interfaces/WeivDataQueryResult.html index 5a8f3807..97ab3095 100644 --- a/docs/interfaces/WeivDataQueryResult.html +++ b/docs/interfaces/WeivDataQueryResult.html @@ -1,4 +1,4 @@ -WeivDataQueryResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataQueryResult {
        currentPage: number;
        items: Items;
        length: number;
        pageSize: number;
        totalCount: number;
        totalPages: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryResult>;
        prev(): Promise<WeivDataQueryResult>;
    }

    Properties

    currentPage +WeivDataQueryResult | WeivData Library Documentation - ExWeiv Apps
    interface WeivDataQueryResult {
        currentPage: number;
        items: Items;
        length: number;
        pageSize: number;
        totalCount: number;
        totalPages: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryResult>;
        prev(): Promise<WeivDataQueryResult>;
    }

    Properties

    Properties

    currentPage: number

    Returns the index of the current results page number.

    -
    items: Items

    Returns the items that match the query.

    -
    length: number

    Returns the number of items in the current results page.

    -
    pageSize: number

    Returns the query page size.

    -
    totalCount: number

    Returns the total number of items that match the query.

    -
    totalPages: number

    Returns the total number of pages the query produced.

    -

    Methods

    items: Items

    Returns the items that match the query.

    +
    length: number

    Returns the number of items in the current results page.

    +
    pageSize: number

    Returns the query page size.

    +
    totalCount: number

    Returns the total number of items that match the query.

    +
    totalPages: number

    Returns the total number of pages the query produced.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/WeivDataSaveResult.html b/docs/interfaces/WeivDataSaveResult.html index 88d1e1a1..88e2dcbb 100644 --- a/docs/interfaces/WeivDataSaveResult.html +++ b/docs/interfaces/WeivDataSaveResult.html @@ -1,6 +1,6 @@ WeivDataSaveResult | WeivData Library Documentation - ExWeiv Apps

    Object returned for save function.

    -
    interface WeivDataSaveResult {
        item: Document;
        upsertedId?: ItemID;
    }

    Properties

    interface WeivDataSaveResult {
        item: Document;
        upsertedId?: ItemID;
    }

    Properties

    Properties

    item: Document

    Saved item.

    -
    upsertedId?: ItemID

    Inserted item id. (Returned if item is inserted)

    -

    Generated using TypeDoc

    \ No newline at end of file +
    upsertedId?: ItemID

    Inserted item id. (Returned if item is inserted)

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/CacheSelections.html b/docs/types/CacheSelections.html index 2068ee02..59e58fad 100644 --- a/docs/types/CacheSelections.html +++ b/docs/types/CacheSelections.html @@ -1 +1 @@ -CacheSelections | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +CacheSelections | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/CollectionID.html b/docs/types/CollectionID.html index b44623a8..27ad230b 100644 --- a/docs/types/CollectionID.html +++ b/docs/types/CollectionID.html @@ -1,4 +1,4 @@ CollectionID | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/EnableVisitorID.html b/docs/types/EnableVisitorID.html index 0096c9c6..a84986cb 100644 --- a/docs/types/EnableVisitorID.html +++ b/docs/types/EnableVisitorID.html @@ -1,3 +1,3 @@ EnableVisitorID | WeivData Library Documentation - ExWeiv Apps
    EnableVisitorID: boolean

    When you want to get not just only members or admins id (member id in Wix) also visitors id enable this and system will create a data using wix-data and then it will use the _owner field to get the current user temp id. Note: This will slow down the operation and not recommended always so do not use it when you don't need it. Carefully design your database systems/models and your apps workflows because you shouldn't need this in most cases.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HookArgs.html b/docs/types/HookArgs.html index df2735a3..f51adcad 100644 --- a/docs/types/HookArgs.html +++ b/docs/types/HookArgs.html @@ -1,2 +1,2 @@ HookArgs | WeivData Library Documentation - ExWeiv Apps
    HookArgs<HookName>: HookName extends "beforeGet"
        ? [item: ItemID, context: HookContext]
        : HookName extends "beforeCount"
            ? [item: WeivDataQuery, context: HookContext]
            : HookName extends "afterCount"
                ? [item: number, context: HookContext]
                : HookName extends "beforeQuery"
                    ? [item: WeivDataQuery, context: HookContext]
                    : HookName extends "beforeRemove"
                        ? [item: ItemID, context: HookContext]
                        : HookName extends "beforeFindOne"
                            ? [item: {
                                propertyName: string;
                                value: any;
                            }, context: HookContext]
                            : HookName extends "beforeGetAndRemove"
                                ? [item: ItemID, context: HookContext]
                                : HookName extends "beforeIncrement"
                                    ? [item: {
                                        propertyName: string;
                                        value: number;
                                    }, context: HookContext]
                                    : HookName extends "beforeMultiply"
                                        ? [item: {
                                            propertyName: string;
                                            value: number;
                                        }, context: HookContext]
                                        : HookName extends "beforePush"
                                            ? [item: {
                                                propertyName: string;
                                                value: any;
                                            }, context: HookContext]
                                            : HookName extends "beforePull"
                                                ? [item: {
                                                    propertyName: string;
                                                    value: any;
                                                }, context: HookContext]
                                                : [item: Item, context: HookContext]

    List of hook params and values.

    -

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HookName.html b/docs/types/HookName.html index 40213e9c..be3adf24 100644 --- a/docs/types/HookName.html +++ b/docs/types/HookName.html @@ -5,4 +5,4 @@

    You don't need to return a value in your hooks but if you return value should align with [HookResults](https://weiv-data.web.app/types/HooksResult.html). You can use async functions or not async functions in your hooks.

    Sometimes it takes few minutes to let hooks start working. Publish or save your site when you define new hooks.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/HooksResults.html b/docs/types/HooksResults.html index d63dac1b..9462c456 100644 --- a/docs/types/HooksResults.html +++ b/docs/types/HooksResults.html @@ -1,2 +1,2 @@ HooksResults | WeivData Library Documentation - ExWeiv Apps
    HooksResults<HookName>: HookName extends "beforeGet"
        ? ItemID
        : HookName extends "beforeCount"
            ? WeivDataQuery
            : HookName extends "afterCount"
                ? number
                : HookName extends "beforeQuery"
                    ? WeivDataQuery
                    : HookName extends "beforeRemove"
                        ? ItemID
                        : HookName extends "beforeFindOne"
                            ? {
                                propertyName: string;
                                value: any;
                            }
                            : HookName extends "beforeGetAndRemove"
                                ? ItemID
                                : HookName extends "beforeIncrement"
                                    ? {
                                        propertyName: string;
                                        value: number;
                                    }
                                    : HookName extends "beforeMultiply"
                                        ? {
                                            propertyName: string;
                                            value: number;
                                        }
                                        : HookName extends "beforePush"
                                            ? {
                                                propertyName: string;
                                                value: any;
                                            }
                                            : HookName extends "beforePull"
                                                ? {
                                                    propertyName: string;
                                                    value: any;
                                                }
                                                : Item

    List of expected values from hooks if returns.

    -

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • HookName

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/Item.html b/docs/types/Item.html index 81f6e8a7..fab91902 100644 --- a/docs/types/Item.html +++ b/docs/types/Item.html @@ -1,2 +1,2 @@ Item | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ItemID.html b/docs/types/ItemID.html index 719b9e97..5acc39f6 100644 --- a/docs/types/ItemID.html +++ b/docs/types/ItemID.html @@ -1,4 +1,4 @@ ItemID | WeivData Library Documentation - ExWeiv Apps
    ItemID: string | ObjectId

    Item id can be string or ObjectID, inside the library it's in ObjectId type in most cases but in your code it can be one of them. Don't worry you can always use string versions of ObjectIds weiv-data will convert them to ObjectId if needed.

    (We use ObjectId type to get better performance in MongoDB)

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ItemIDs.html b/docs/types/ItemIDs.html index 1d40dc3f..0f39ef64 100644 --- a/docs/types/ItemIDs.html +++ b/docs/types/ItemIDs.html @@ -1,3 +1,3 @@ ItemIDs | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/Items.html b/docs/types/Items.html index 8e1c9508..3cc0e5a8 100644 --- a/docs/types/Items.html +++ b/docs/types/Items.html @@ -1,2 +1,2 @@ Items | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReadConcern.html b/docs/types/ReadConcern.html index 6859a2b2..c0c8724d 100644 --- a/docs/types/ReadConcern.html +++ b/docs/types/ReadConcern.html @@ -1,2 +1,2 @@ ReadConcern | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReferencedItem.html b/docs/types/ReferencedItem.html index 0305aa86..818880a1 100644 --- a/docs/types/ReferencedItem.html +++ b/docs/types/ReferencedItem.html @@ -1,4 +1,4 @@ ReferencedItem | WeivData Library Documentation - ExWeiv Apps
    ReferencedItem: Item | ItemID | Items | ItemIDs

    Referenced item can be the item itself that contains the _id key or directly the item id. There can be more than one referenced item and if so you can put the values we defined above in an array. So it can also be Array or Array

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/ReferringItem.html b/docs/types/ReferringItem.html index 95f5aeb2..aa66033e 100644 --- a/docs/types/ReferringItem.html +++ b/docs/types/ReferringItem.html @@ -1,2 +1,2 @@ ReferringItem | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/SuppressAuth.html b/docs/types/SuppressAuth.html index 784db1dd..80646dd5 100644 --- a/docs/types/SuppressAuth.html +++ b/docs/types/SuppressAuth.html @@ -1,2 +1,2 @@ SuppressAuth | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/SuppressHooks.html b/docs/types/SuppressHooks.html index 820a5ec0..ce5e2803 100644 --- a/docs/types/SuppressHooks.html +++ b/docs/types/SuppressHooks.html @@ -1,2 +1,2 @@ SuppressHooks | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/WeivDataQueryReferencedOptions.html b/docs/types/WeivDataQueryReferencedOptions.html index 79ec4957..4438ffc5 100644 --- a/docs/types/WeivDataQueryReferencedOptions.html +++ b/docs/types/WeivDataQueryReferencedOptions.html @@ -1 +1 @@ -WeivDataQueryReferencedOptions | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file +WeivDataQueryReferencedOptions | WeivData Library Documentation - ExWeiv Apps

    Generated using TypeDoc

    \ No newline at end of file