imodel 0.9.2 → 0.9.3

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.9.2
2
+ * imodel v0.9.3
3
3
  * (c) 2019-2025 undefined
4
4
  * @license undefined
5
5
  */
@@ -12,11 +12,12 @@ declare const increment$1: typeof uuid;
12
12
  declare const decrement$1: unique symbol;
13
13
  declare const multiply$1: unique symbol;
14
14
  declare const divide$1: unique symbol;
15
+ declare const coefficient$1: unique symbol;
15
16
 
16
17
  declare const values_now: typeof now;
17
18
  declare const values_uuid: typeof uuid;
18
19
  declare namespace values {
19
- export { decrement$1 as decrement, divide$1 as divide, increment$1 as increment, multiply$1 as multiply, values_now as now, values_uuid as uuid };
20
+ export { coefficient$1 as coefficient, decrement$1 as decrement, divide$1 as divide, increment$1 as increment, multiply$1 as multiply, values_now as now, values_uuid as uuid };
20
21
  }
21
22
 
22
23
  interface Environment<T extends object> {
@@ -516,11 +517,12 @@ declare class Where {
516
517
  #private;
517
518
  }
518
519
 
519
- /** @typedef {SetValue.Increment | SetValue.Decrement | SetValue.Multiply | SetValue.Divide | string | number | bigint | boolean | null | typeof now | typeof uuid | (string | number | bigint | boolean)[]} SetValue */
520
+ /** @typedef {SetValue.Increment | SetValue.Decrement | SetValue.Multiply | SetValue.Divide | SetValue.Coefficient | string | number | bigint | boolean | null | typeof now | typeof uuid | (string | number | bigint | boolean)[]} SetValue */
520
521
  /** @typedef {{[values.increment]: number | bigint}} SetValue.Increment */
521
522
  /** @typedef {{[values.decrement]: number | bigint}} SetValue.Decrement */
522
523
  /** @typedef {{[values.multiply]: number | bigint}} SetValue.Multiply */
523
524
  /** @typedef {{[values.divide]: number | bigint}} SetValue.Divide */
525
+ /** @typedef {{[values.coefficient]: (number | bigint)[]}} SetValue.Coefficient */
524
526
  /**
525
527
  * @param {number | bigint} value
526
528
  * @returns {SetValue.Increment}
@@ -541,7 +543,12 @@ declare function multiply(value: number | bigint): SetValue.Multiply;
541
543
  * @returns {SetValue.Divide}
542
544
  */
543
545
  declare function divide(value: number | bigint): SetValue.Divide;
544
- type SetValue = SetValue.Increment | SetValue.Decrement | SetValue.Multiply | SetValue.Divide | string | number | bigint | boolean | null | typeof now | typeof uuid | (string | number | bigint | boolean)[];
546
+ /**
547
+ * @param {...number | bigint} value
548
+ * @returns {SetValue.Coefficient}
549
+ */
550
+ declare function coefficient(...value: (number | bigint)[]): SetValue.Coefficient;
551
+ type SetValue = SetValue.Increment | SetValue.Decrement | SetValue.Multiply | SetValue.Divide | SetValue.Coefficient | string | number | bigint | boolean | null | typeof now | typeof uuid | (string | number | bigint | boolean)[];
545
552
  declare namespace SetValue {
546
553
  type Increment = {};
547
554
  type Decrement = {
@@ -553,6 +560,9 @@ declare namespace SetValue {
553
560
  type Divide = {
554
561
  [divide$1]: number | bigint;
555
562
  };
563
+ type Coefficient = {
564
+ [coefficient$1]: (number | bigint)[];
565
+ };
556
566
  }
557
567
 
558
568
  interface VirtualTable<E extends object = object> {
@@ -2308,4 +2318,4 @@ declare function field<T extends MainFieldType>(type: T, options: {
2308
2318
  declare function setDevelopment(d?: boolean): void;
2309
2319
  declare let isDevelopment: boolean;
2310
2320
 
2311
- export { Build, type ClassDecorator, type Column, type ColumnOptions, Connection, type Constraint, Create, type DBColumn, type DBIndex, type DBTable, Destroy, type Environment, type FieldDecorator, type FieldDefine, type FieldDefineOption, type FieldDefineType, type FieldSpecific, type FieldSpecificValue, type FieldType, type FieldTypeDefine, type FieldValue, type Fields, type FindArg, type FindRange, type GetName, type Hook, type Hooks, type IConnection, type Index, type IndexInfo, type IndexOptions, type Join, type JoinType, type MainFieldType, type MaybePromise, type MethodDecorator, Model, type Options, PseudoDestroy, Query, type QueryOptions, type Queryable, Save, Scene, Select, SetValue, type Skip, Submodel, type Support, type TableDefine, type TableType, type ToFieldType, type ToType, type TransactionFn, type VirtualTable, Where, type WhereItem, type WhereLike, type WhereOr, type WhereRaw, type WhereValue, type Wheres, afterCreate, afterCreateMany, afterDelete, afterUpdate, beforeCreate, beforeCreateMany, beforeDelete, beforeUpdate, column, creating, decrement, defaultValue, field as define, deleted, deleting, divide, field$1 as field, getPrimaryFields, getPrimaryKeys, immutable, increment, index, isDevelopment, isPseudo, model, multiply, now, primary, prop, pseudo, setDevelopment, sort, model as submodel, toNot, toPrimaries, toPrimary, uncreatable, undeleted, updating, uuid, values, withDeleted };
2321
+ export { Build, type ClassDecorator, type Column, type ColumnOptions, Connection, type Constraint, Create, type DBColumn, type DBIndex, type DBTable, Destroy, type Environment, type FieldDecorator, type FieldDefine, type FieldDefineOption, type FieldDefineType, type FieldSpecific, type FieldSpecificValue, type FieldType, type FieldTypeDefine, type FieldValue, type Fields, type FindArg, type FindRange, type GetName, type Hook, type Hooks, type IConnection, type Index, type IndexInfo, type IndexOptions, type Join, type JoinType, type MainFieldType, type MaybePromise, type MethodDecorator, Model, type Options, PseudoDestroy, Query, type QueryOptions, type Queryable, Save, Scene, Select, SetValue, type Skip, Submodel, type Support, type TableDefine, type TableType, type ToFieldType, type ToType, type TransactionFn, type VirtualTable, Where, type WhereItem, type WhereLike, type WhereOr, type WhereRaw, type WhereValue, type Wheres, afterCreate, afterCreateMany, afterDelete, afterUpdate, beforeCreate, beforeCreateMany, beforeDelete, beforeUpdate, coefficient, column, creating, decrement, defaultValue, field as define, deleted, deleting, divide, field$1 as field, getPrimaryFields, getPrimaryKeys, immutable, increment, index, isDevelopment, isPseudo, model, multiply, now, primary, prop, pseudo, setDevelopment, sort, model as submodel, toNot, toPrimaries, toPrimary, uncreatable, undeleted, updating, uuid, values, withDeleted };
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.9.2
2
+ * imodel v0.9.3
3
3
  * (c) 2019-2025 undefined
4
4
  * @license undefined
5
5
  */
@@ -665,9 +665,11 @@ const increment$1 = Symbol();
665
665
  const decrement$1 = Symbol();
666
666
  const multiply$1 = Symbol();
667
667
  const divide$1 = Symbol();
668
+ const coefficient$1 = Symbol();
668
669
 
669
670
  var values = /*#__PURE__*/Object.freeze({
670
671
  __proto__: null,
672
+ coefficient: coefficient$1,
671
673
  decrement: decrement$1,
672
674
  divide: divide$1,
673
675
  increment: increment$1,
@@ -4286,11 +4288,12 @@ function defaultValue(value) {
4286
4288
  return (_, ctx) => setProp(ctx, 'default', value);
4287
4289
  }
4288
4290
 
4289
- /** @typedef {SetValue.Increment | SetValue.Decrement | SetValue.Multiply | SetValue.Divide | string | number | bigint | boolean | null | typeof now | typeof uuid | (string | number | bigint | boolean)[]} SetValue */
4291
+ /** @typedef {SetValue.Increment | SetValue.Decrement | SetValue.Multiply | SetValue.Divide | SetValue.Coefficient | string | number | bigint | boolean | null | typeof now | typeof uuid | (string | number | bigint | boolean)[]} SetValue */
4290
4292
  /** @typedef {{[values.increment]: number | bigint}} SetValue.Increment */
4291
4293
  /** @typedef {{[values.decrement]: number | bigint}} SetValue.Decrement */
4292
4294
  /** @typedef {{[values.multiply]: number | bigint}} SetValue.Multiply */
4293
4295
  /** @typedef {{[values.divide]: number | bigint}} SetValue.Divide */
4296
+ /** @typedef {{[values.coefficient]: (number | bigint)[]}} SetValue.Coefficient */
4294
4297
  /**
4295
4298
  * @param {number | bigint} value
4296
4299
  * @returns {SetValue.Increment}
@@ -4327,6 +4330,15 @@ function divide(value) {
4327
4330
  [divide$1]: value
4328
4331
  };
4329
4332
  }
4333
+ /**
4334
+ * @param {...number | bigint} value
4335
+ * @returns {SetValue.Coefficient}
4336
+ */
4337
+ function coefficient(...value) {
4338
+ return {
4339
+ [coefficient$1]: value
4340
+ };
4341
+ }
4330
4342
 
4331
4343
  /** @import { Fields, Options, Queryable, Select, VirtualTable } from './types' */
4332
4344
  /** @import { WhereValue, Wheres } from './Where.mjs' */
@@ -6014,4 +6026,4 @@ function field(type, {
6014
6026
  };
6015
6027
  }
6016
6028
 
6017
- export { Build, Connection, Create, Destroy, Model, PseudoDestroy, Query, Save, Scene, Submodel, Where, afterCreate, afterCreateMany, afterDelete, afterUpdate, beforeCreate, beforeCreateMany, beforeDelete, beforeUpdate, column, creating, decrement, defaultValue, field as define, deleted, deleting, divide, field$1 as field, getPrimaryFields, getPrimaryKeys, immutable, increment, index, isDevelopment, isPseudo, model, multiply, now, primary, prop, pseudo, setDevelopment, sort, model as submodel, toNot, toPrimaries, toPrimary, uncreatable, undeleted, updating, uuid, values, withDeleted };
6029
+ export { Build, Connection, Create, Destroy, Model, PseudoDestroy, Query, Save, Scene, Submodel, Where, afterCreate, afterCreateMany, afterDelete, afterUpdate, beforeCreate, beforeCreateMany, beforeDelete, beforeUpdate, coefficient, column, creating, decrement, defaultValue, field as define, deleted, deleting, divide, field$1 as field, getPrimaryFields, getPrimaryKeys, immutable, increment, index, isDevelopment, isPseudo, model, multiply, now, primary, prop, pseudo, setDevelopment, sort, model as submodel, toNot, toPrimaries, toPrimary, uncreatable, undeleted, updating, uuid, values, withDeleted };
package/migrate.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.9.2
2
+ * imodel v0.9.3
3
3
  * (c) 2019-2025 undefined
4
4
  * @license undefined
5
5
  */
package/migrate.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.9.2
2
+ * imodel v0.9.3
3
3
  * (c) 2019-2025 undefined
4
4
  * @license undefined
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imodel",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "main": "index.mjs",
5
5
  "type": "module",
6
6
  "repository": {