uql-orm 0.73.0 → 0.73.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  import { getMeta } from '../../entity/index.js';
2
- import { MongoDialect, textLanguage } from '../../mongo/mongoDialect.js';
2
+ import { MongoDialect } from '../../mongo/mongoDialect.js';
3
+ import { textLanguage } from '../../mongo/textLanguage.js';
3
4
  import { QueryRaw, } from '../../type/index.js';
4
5
  import { indexDistance, unsupportedVectorMetric } from '../../type/vector.js';
5
6
  import { declaredIndexes, declaredIndexName, renderIndexColumn } from '../../util/ddlExpression.util.js';
@@ -1,4 +1,4 @@
1
- import { textConfigOf } from '../../mongo/mongoDialect.js';
1
+ import { textConfigOf } from '../../mongo/textLanguage.js';
2
2
  import { createTableNode, SchemaAST } from '../../schema/schemaAST.js';
3
3
  import { isMongoQuerier, } from '../../type/index.js';
4
4
  /** What a server without Atlas Search answers a search index command with. */
@@ -2,3 +2,4 @@ export { MongoSchemaGenerator } from '../migrate/generator/mongoSchemaGenerator.
2
2
  export * from './mongoDialect.js';
3
3
  export * from './mongodbQuerier.js';
4
4
  export * from './mongodbQuerierPool.js';
5
+ export * from './textLanguage.js';
@@ -2,3 +2,4 @@ export { MongoSchemaGenerator } from '../migrate/generator/mongoSchemaGenerator.
2
2
  export * from './mongoDialect.js';
3
3
  export * from './mongodbQuerier.js';
4
4
  export * from './mongodbQuerierPool.js';
5
+ export * from './textLanguage.js';
@@ -19,13 +19,6 @@ type RelationLookups = {
19
19
  readonly stages: MongoAggregationPipelineEntry<Document>[];
20
20
  readonly temps: string[];
21
21
  };
22
- /**
23
- * A text-search config as MongoDB names the language: the same word for each language both know, and
24
- * `'none'` for the no-stemming parser Postgres calls `'simple'`. {@link textConfigOf} reads one back.
25
- */
26
- export declare function textLanguage(config: string): string;
27
- /** A MongoDB language as the text-search config it is, the inverse of {@link textLanguage}. */
28
- export declare function textConfigOf(language: string): string;
29
22
  /** Default {@link DialectFeatures} for MongoDB. */
30
23
  export declare const mongoDialectFeatures: DialectFeatures;
31
24
  export declare class MongoDialect extends AbstractDialect {
@@ -7,19 +7,9 @@ import { COUNT_RESULT_KEY } from '../type/query.js';
7
7
  import { QueryRaw } from '../type/queryRaw.js';
8
8
  import { aggregateOf, asSelectMap, assertAggregateColumns, assertNonNegativeInteger, columnFamily, countedRelations, entityName, fieldUpdateOf, fillOnFields, filterFieldKeys, findVectorIndex, findVectorSort, getKeys, getRelationRequestSummary, hasKeys, isFieldUpdateOp, isJsonObject, isJsonUpdateOp, isOperatorMap, isOperatorObject, isRecord, isVectorSearch, normalizeScalarFieldSelection, parentJoins, parseGroupMap, parseRelationAtKey, parseRelationSize, parseSortByCount, rankedTextSearch, someKey, targetKeyColumns, textSortOf, } from '../util/index.js';
9
9
  import { decodeBigIntsExcept } from '../util/wideNumber.js';
10
+ import { textLanguage } from './textLanguage.js';
10
11
  /** A scalar field's operator as the aggregation operator computing it. */
11
12
  const MONGO_ARITHMETIC = { $inc: '$add', $mul: '$multiply' };
12
- /**
13
- * A text-search config as MongoDB names the language: the same word for each language both know, and
14
- * `'none'` for the no-stemming parser Postgres calls `'simple'`. {@link textConfigOf} reads one back.
15
- */
16
- export function textLanguage(config) {
17
- return config === 'simple' ? 'none' : config;
18
- }
19
- /** A MongoDB language as the text-search config it is, the inverse of {@link textLanguage}. */
20
- export function textConfigOf(language) {
21
- return language === 'none' ? 'simple' : language;
22
- }
23
13
  /** Default {@link DialectFeatures} for MongoDB. */
24
14
  export const mongoDialectFeatures = {
25
15
  ifNotExists: false,
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A text-search config as MongoDB names the language: the same word for each language both know, and
3
+ * `'none'` for the no-stemming parser Postgres calls `'simple'`. {@link textConfigOf} reads one back.
4
+ */
5
+ export declare function textLanguage(config: string): string;
6
+ /** A MongoDB language as the text-search config it is, the inverse of {@link textLanguage}. */
7
+ export declare function textConfigOf(language: string): string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A text-search config as MongoDB names the language: the same word for each language both know, and
3
+ * `'none'` for the no-stemming parser Postgres calls `'simple'`. {@link textConfigOf} reads one back.
4
+ */
5
+ export function textLanguage(config) {
6
+ return config === 'simple' ? 'none' : config;
7
+ }
8
+ /** A MongoDB language as the text-search config it is, the inverse of {@link textLanguage}. */
9
+ export function textConfigOf(language) {
10
+ return language === 'none' ? 'simple' : language;
11
+ }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "homepage": "https://uql-orm.dev",
4
4
  "description": "The JSON-native TypeScript ORM for Bun, Browsers, Edge, Deno, Node, Workers. Supports PostgreSQL, PGlite, MySQL, MariaDB, SQLite, CockroachDB, SQL Server, Turso, Neon, Cloudflare D1 and MongoDB. Queries are plain JSON, typed to the leaf.",
5
5
  "license": "MIT",
6
- "version": "0.73.0",
6
+ "version": "0.73.1",
7
7
  "type": "module",
8
8
  "engines": {
9
9
  "node": ">=24"