@atscript/db-mongo 0.1.194 → 0.1.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/agg.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_mongo_accumulator = require("./mongo-accumulator-CAkmw604.cjs");
2
+ const require_mongo_accumulator = require("./mongo-accumulator-E7JzXDXL.cjs");
3
3
  let _atscript_db = require("@atscript/db");
4
4
  let _uniqu_core = require("@uniqu/core");
5
5
  let _atscript_db_agg = require("@atscript/db/agg");
package/dist/agg.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { d as rowOrderStages, f as sortStages, g as whereToExpr, i as buildMongoFilter, m as orNull, n as distinctCountExpr, p as exprToMongo, s as mongoFilterStages, t as buildAccumulator } from "./mongo-accumulator-BDgJ8wpS.mjs";
1
+ import { d as rowOrderStages, f as sortStages, g as whereToExpr, i as buildMongoFilter, m as orNull, n as distinctCountExpr, p as exprToMongo, s as mongoFilterStages, t as buildAccumulator } from "./mongo-accumulator-BSFQ_Ccy.mjs";
2
2
  import { DbError, aggregateColumns, evaluateExpr } from "@atscript/db";
3
3
  import { BUCKET_MAX_INSTANT, BUCKET_MIN_INSTANT } from "@uniqu/core";
4
4
  import { assertAggregateFn, resolveAlias } from "@atscript/db/agg";
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_mongo_accumulator = require("./mongo-accumulator-CAkmw604.cjs");
2
+ const require_mongo_accumulator = require("./mongo-accumulator-E7JzXDXL.cjs");
3
3
  const require_search_messages = require("./search-messages-BqLxxrb8.cjs");
4
4
  let _atscript_db = require("@atscript/db");
5
5
  let mongodb = require("mongodb");
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as buildMongoQuery, c as planStages, f as sortStages, h as queryNodeToExpr, i as buildMongoFilter, l as correlate, m as orNull, n as distinctCountExpr, o as collationOfAdapter, p as exprToMongo, r as REL_FILTER_TEMP_PREFIX, s as mongoFilterStages, t as buildAccumulator, u as hasNullsPlacement } from "./mongo-accumulator-BDgJ8wpS.mjs";
1
+ import { a as buildMongoQuery, c as planStages, f as sortStages, h as queryNodeToExpr, i as buildMongoFilter, l as correlate, m as orNull, n as distinctCountExpr, o as collationOfAdapter, p as exprToMongo, r as REL_FILTER_TEMP_PREFIX, s as mongoFilterStages, t as buildAccumulator, u as hasNullsPlacement } from "./mongo-accumulator-BSFQ_Ccy.mjs";
2
2
  import { t as dynamicSearchEncryptedMessage } from "./search-messages-mQSpJ4GD.mjs";
3
3
  import { ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, ALL_VIEW_CAPABILITIES, BaseDbAdapter, DbError, DbSpace, andFilters, bucketTimeZoneUnavailable, computeInsights, constraintViolation, containsRelationFilter, createChangeRecorder, createFailureCollector, defaultFulltextIndex, geoIndexNotFoundMessage, getDbFieldOp, getKeyProps, getPath, isAtscriptDbView, isFieldRef, isPlainObject, isViewType, parseDefaultLiteral, queryReadColumns, relationStaticFilter, resolveDesignType, searchIndexNotFoundMessage, searchTermInteger, storedObjectType, tableNameOf, translateQueryTree, uniqueKeyTuple, unknownWithRelation, vectorIndexNotFoundMessage } from "@atscript/db";
4
4
  import { MongoClient, ObjectId } from "mongodb";
@@ -615,7 +615,7 @@ function createPredicateRenderer() {
615
615
  const lookupOf = (node, field, as, vars) => {
616
616
  const exists = [{ $limit: 1 }, { $project: { _id: 1 } }];
617
617
  if (node.kind === "via") return viaLookupOf(node, field, as, vars, exists);
618
- if (node.pairs.length === 0) throw malformed(field, `Relational predicate on "${field}" has no join key pairs`);
618
+ if (node.kind === "store" || node.pairs.length === 0) throw malformed(field, `Relational predicate on "${field}" has no join key pairs`);
619
619
  const join = correlate(vars, node.pairs.map((p) => ({
620
620
  outer: p.source,
621
621
  inner: p.target
@@ -615,7 +615,7 @@ function createPredicateRenderer() {
615
615
  const lookupOf = (node, field, as, vars) => {
616
616
  const exists = [{ $limit: 1 }, { $project: { _id: 1 } }];
617
617
  if (node.kind === "via") return viaLookupOf(node, field, as, vars, exists);
618
- if (node.pairs.length === 0) throw malformed(field, `Relational predicate on "${field}" has no join key pairs`);
618
+ if (node.kind === "store" || node.pairs.length === 0) throw malformed(field, `Relational predicate on "${field}" has no join key pairs`);
619
619
  const join = correlate(vars, node.pairs.map((p) => ({
620
620
  outer: p.source,
621
621
  inner: p.target
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db-mongo",
3
- "version": "0.1.194",
3
+ "version": "0.1.196",
4
4
  "description": "Mongodb plugin for atscript.",
5
5
  "keywords": [
6
6
  "atscript",
@@ -46,19 +46,19 @@
46
46
  "access": "public"
47
47
  },
48
48
  "devDependencies": {
49
- "@atscript/core": "^0.2.21",
50
- "@atscript/typescript": "^0.2.21",
49
+ "@atscript/core": "^0.2.23",
50
+ "@atscript/typescript": "^0.2.23",
51
51
  "@uniqu/core": "^0.2.2",
52
52
  "mongodb": "^6.17.0",
53
53
  "mongodb-memory-server-core": "^10.0.0",
54
- "unplugin-atscript": "^0.2.21"
54
+ "unplugin-atscript": "^0.2.23"
55
55
  },
56
56
  "peerDependencies": {
57
- "@atscript/core": "^0.2.21",
58
- "@atscript/typescript": "^0.2.21",
57
+ "@atscript/core": "^0.2.23",
58
+ "@atscript/typescript": "^0.2.23",
59
59
  "@uniqu/core": "^0.2.2",
60
60
  "mongodb": "^6.17.0",
61
- "@atscript/db": "^0.1.194"
61
+ "@atscript/db": "^0.1.196"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "vp pack",