pinia-orm-edge 1.9.0-28582105.fda0f99 → 1.9.0-28582911.bbf7a93

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/casts.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, m as ModelFields } from './shared/pinia-orm.4d8aa1c7.cjs';
1
+ import { $ as CastAttribute, m as ModelFields } from './shared/pinia-orm.677cd0bd.cjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
package/dist/casts.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, m as ModelFields } from './shared/pinia-orm.4d8aa1c7.mjs';
1
+ import { $ as CastAttribute, m as ModelFields } from './shared/pinia-orm.677cd0bd.mjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
package/dist/casts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, m as ModelFields } from './shared/pinia-orm.4d8aa1c7.js';
1
+ import { $ as CastAttribute, m as ModelFields } from './shared/pinia-orm.677cd0bd.js';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,5 +1,5 @@
1
- import { a0 as TypeDefault, af as PropertyDecorator, ag as TypeOptions, ah as UidOptions, M as Model, s as PrimaryKey, z as deleteModes, $ as CastAttribute, ai as Mutator } from './shared/pinia-orm.4d8aa1c7.cjs';
2
- export { aj as NanoidOptions } from './shared/pinia-orm.4d8aa1c7.cjs';
1
+ import { a0 as TypeDefault, af as PropertyDecorator, ag as TypeOptions, ah as UidOptions, M as Model, s as PrimaryKey, z as deleteModes, $ as CastAttribute, ai as Mutator } from './shared/pinia-orm.677cd0bd.cjs';
2
+ export { aj as NanoidOptions } from './shared/pinia-orm.677cd0bd.cjs';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
@@ -1,5 +1,5 @@
1
- import { a0 as TypeDefault, af as PropertyDecorator, ag as TypeOptions, ah as UidOptions, M as Model, s as PrimaryKey, z as deleteModes, $ as CastAttribute, ai as Mutator } from './shared/pinia-orm.4d8aa1c7.mjs';
2
- export { aj as NanoidOptions } from './shared/pinia-orm.4d8aa1c7.mjs';
1
+ import { a0 as TypeDefault, af as PropertyDecorator, ag as TypeOptions, ah as UidOptions, M as Model, s as PrimaryKey, z as deleteModes, $ as CastAttribute, ai as Mutator } from './shared/pinia-orm.677cd0bd.mjs';
2
+ export { aj as NanoidOptions } from './shared/pinia-orm.677cd0bd.mjs';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
@@ -1,5 +1,5 @@
1
- import { a0 as TypeDefault, af as PropertyDecorator, ag as TypeOptions, ah as UidOptions, M as Model, s as PrimaryKey, z as deleteModes, $ as CastAttribute, ai as Mutator } from './shared/pinia-orm.4d8aa1c7.js';
2
- export { aj as NanoidOptions } from './shared/pinia-orm.4d8aa1c7.js';
1
+ import { a0 as TypeDefault, af as PropertyDecorator, ag as TypeOptions, ah as UidOptions, M as Model, s as PrimaryKey, z as deleteModes, $ as CastAttribute, ai as Mutator } from './shared/pinia-orm.677cd0bd.js';
2
+ export { aj as NanoidOptions } from './shared/pinia-orm.677cd0bd.js';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.4d8aa1c7.cjs';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.677cd0bd.cjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.4d8aa1c7.mjs';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.677cd0bd.mjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
package/dist/helpers.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.4d8aa1c7.js';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.677cd0bd.js';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
package/dist/index.cjs CHANGED
@@ -842,8 +842,34 @@ class Query {
842
842
  if (values instanceof Set) {
843
843
  values = Array.from(values);
844
844
  }
845
- this.wheres.push({ field, value: values, boolean: "and" });
846
- return this;
845
+ return this.where(field, values);
846
+ }
847
+ /**
848
+ * Add a "where not in" clause to the query.
849
+ */
850
+ whereNotIn(field, values) {
851
+ if (values instanceof Set) {
852
+ values = Array.from(values);
853
+ }
854
+ return this.where((query) => !values.includes(query[field]));
855
+ }
856
+ /**
857
+ * Add a "where not in" clause to the query.
858
+ */
859
+ orWhereIn(field, values) {
860
+ if (values instanceof Set) {
861
+ values = Array.from(values);
862
+ }
863
+ return this.orWhere(field, values);
864
+ }
865
+ /**
866
+ * Add a "where not in" clause to the query.
867
+ */
868
+ orWhereNotIn(field, values) {
869
+ if (values instanceof Set) {
870
+ values = Array.from(values);
871
+ }
872
+ return this.orWhere((query) => !values.includes(query[field]));
847
873
  }
848
874
  /**
849
875
  * Add a where clause on the primary key to the query.
@@ -858,6 +884,18 @@ class Query {
858
884
  this.wheres.push({ field, value, boolean: "or" });
859
885
  return this;
860
886
  }
887
+ /**
888
+ * Add a "whereNULL" clause to the query.
889
+ */
890
+ whereNull(field) {
891
+ return this.where(field, null);
892
+ }
893
+ /**
894
+ * Add a "whereNotNULL" clause to the query.
895
+ */
896
+ whereNotNull(field) {
897
+ return this.where((query) => query[field] != null);
898
+ }
861
899
  /**
862
900
  * Add a "where has" clause to the query.
863
901
  */
@@ -1052,13 +1090,13 @@ class Query {
1052
1090
  this.where(this.model.$typeKey(), this.model.$fields()[this.model.$typeKey()].make());
1053
1091
  }
1054
1092
  let models = this.select();
1055
- if (!this.orders) {
1093
+ if (this.orders.length === 0) {
1056
1094
  models = this.filterLimit(models);
1057
1095
  }
1058
1096
  if (!Utils.isEmpty(models)) {
1059
1097
  this.eagerLoadRelations(models);
1060
1098
  }
1061
- if (this.orders) {
1099
+ if (this.orders.length > 0) {
1062
1100
  models = this.filterOrder(models);
1063
1101
  models = this.filterLimit(models);
1064
1102
  }
@@ -1651,6 +1689,22 @@ class Repository {
1651
1689
  this.database = database;
1652
1690
  this.pinia = pinia;
1653
1691
  this.hydratedDataCache = cache;
1692
+ return new Proxy(this, {
1693
+ get(repository, field) {
1694
+ if (typeof field === "symbol") {
1695
+ return;
1696
+ }
1697
+ if (field in repository) {
1698
+ return repository[field];
1699
+ }
1700
+ if (field === "use" || field === "model" || field === "queryCache") {
1701
+ return;
1702
+ }
1703
+ return function(...args) {
1704
+ return repository.query()[field](...args);
1705
+ };
1706
+ }
1707
+ });
1654
1708
  }
1655
1709
  /**
1656
1710
  * Set the model
@@ -1858,9 +1912,6 @@ class Repository {
1858
1912
  all() {
1859
1913
  return this.query().get();
1860
1914
  }
1861
- find(ids) {
1862
- return this.query().find(ids);
1863
- }
1864
1915
  revive(schema) {
1865
1916
  return this.query().revive(schema);
1866
1917
  }
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.4d8aa1c7.cjs';
2
- export { A as AfterHook, x as Attribute, B as BeforeHook, J as BelongsTo, K as BelongsToMany, g as CacheConfigOptions, $ as CastAttribute, _ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, y as Dictionary, ad as EagerLoad, ae as EagerLoadConstraint, a as Element, a8 as Group, aa as GroupBy, ab as GroupByFields, G as GroupedCollection, L as HasMany, T as HasManyBy, U as HasManyThrough, O as HasOne, w as InheritanceTypes, h as InstallOptions, a2 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, V as MorphMany, Z as MorphOne, X as MorphTo, Y as MorphToMany, N as NormalizedData, a7 as Order, a9 as OrderBy, ac as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, H as Relation, l as Schema, S as Schemas, a1 as Type, a0 as TypeDefault, a3 as Where, a6 as WhereGroup, a4 as WherePrimaryClosure, a5 as WhereSecondaryClosure, j as createORM, e as definePiniaOrmPlugin, z as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.4d8aa1c7.cjs';
1
+ import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.677cd0bd.cjs';
2
+ export { A as AfterHook, x as Attribute, B as BeforeHook, J as BelongsTo, K as BelongsToMany, g as CacheConfigOptions, $ as CastAttribute, _ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, y as Dictionary, ad as EagerLoad, ae as EagerLoadConstraint, a as Element, a8 as Group, aa as GroupBy, ab as GroupByFields, G as GroupedCollection, L as HasMany, T as HasManyBy, U as HasManyThrough, O as HasOne, w as InheritanceTypes, h as InstallOptions, a2 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, V as MorphMany, Z as MorphOne, X as MorphTo, Y as MorphToMany, N as NormalizedData, a7 as Order, a9 as OrderBy, ac as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, H as Relation, l as Schema, S as Schemas, a1 as Type, a0 as TypeDefault, a3 as Where, a6 as WhereGroup, a4 as WherePrimaryClosure, a5 as WhereSecondaryClosure, j as createORM, e as definePiniaOrmPlugin, z as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.677cd0bd.cjs';
3
3
  import { Pinia } from 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.4d8aa1c7.mjs';
2
- export { A as AfterHook, x as Attribute, B as BeforeHook, J as BelongsTo, K as BelongsToMany, g as CacheConfigOptions, $ as CastAttribute, _ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, y as Dictionary, ad as EagerLoad, ae as EagerLoadConstraint, a as Element, a8 as Group, aa as GroupBy, ab as GroupByFields, G as GroupedCollection, L as HasMany, T as HasManyBy, U as HasManyThrough, O as HasOne, w as InheritanceTypes, h as InstallOptions, a2 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, V as MorphMany, Z as MorphOne, X as MorphTo, Y as MorphToMany, N as NormalizedData, a7 as Order, a9 as OrderBy, ac as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, H as Relation, l as Schema, S as Schemas, a1 as Type, a0 as TypeDefault, a3 as Where, a6 as WhereGroup, a4 as WherePrimaryClosure, a5 as WhereSecondaryClosure, j as createORM, e as definePiniaOrmPlugin, z as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.4d8aa1c7.mjs';
1
+ import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.677cd0bd.mjs';
2
+ export { A as AfterHook, x as Attribute, B as BeforeHook, J as BelongsTo, K as BelongsToMany, g as CacheConfigOptions, $ as CastAttribute, _ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, y as Dictionary, ad as EagerLoad, ae as EagerLoadConstraint, a as Element, a8 as Group, aa as GroupBy, ab as GroupByFields, G as GroupedCollection, L as HasMany, T as HasManyBy, U as HasManyThrough, O as HasOne, w as InheritanceTypes, h as InstallOptions, a2 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, V as MorphMany, Z as MorphOne, X as MorphTo, Y as MorphToMany, N as NormalizedData, a7 as Order, a9 as OrderBy, ac as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, H as Relation, l as Schema, S as Schemas, a1 as Type, a0 as TypeDefault, a3 as Where, a6 as WhereGroup, a4 as WherePrimaryClosure, a5 as WhereSecondaryClosure, j as createORM, e as definePiniaOrmPlugin, z as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.677cd0bd.mjs';
3
3
  import { Pinia } from 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.4d8aa1c7.js';
2
- export { A as AfterHook, x as Attribute, B as BeforeHook, J as BelongsTo, K as BelongsToMany, g as CacheConfigOptions, $ as CastAttribute, _ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, y as Dictionary, ad as EagerLoad, ae as EagerLoadConstraint, a as Element, a8 as Group, aa as GroupBy, ab as GroupByFields, G as GroupedCollection, L as HasMany, T as HasManyBy, U as HasManyThrough, O as HasOne, w as InheritanceTypes, h as InstallOptions, a2 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, V as MorphMany, Z as MorphOne, X as MorphTo, Y as MorphToMany, N as NormalizedData, a7 as Order, a9 as OrderBy, ac as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, H as Relation, l as Schema, S as Schemas, a1 as Type, a0 as TypeDefault, a3 as Where, a6 as WhereGroup, a4 as WherePrimaryClosure, a5 as WhereSecondaryClosure, j as createORM, e as definePiniaOrmPlugin, z as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.4d8aa1c7.js';
1
+ import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.677cd0bd.js';
2
+ export { A as AfterHook, x as Attribute, B as BeforeHook, J as BelongsTo, K as BelongsToMany, g as CacheConfigOptions, $ as CastAttribute, _ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, y as Dictionary, ad as EagerLoad, ae as EagerLoadConstraint, a as Element, a8 as Group, aa as GroupBy, ab as GroupByFields, G as GroupedCollection, L as HasMany, T as HasManyBy, U as HasManyThrough, O as HasOne, w as InheritanceTypes, h as InstallOptions, a2 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, V as MorphMany, Z as MorphOne, X as MorphTo, Y as MorphToMany, N as NormalizedData, a7 as Order, a9 as OrderBy, ac as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, H as Relation, l as Schema, S as Schemas, a1 as Type, a0 as TypeDefault, a3 as Where, a6 as WhereGroup, a4 as WherePrimaryClosure, a5 as WhereSecondaryClosure, j as createORM, e as definePiniaOrmPlugin, z as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.677cd0bd.js';
3
3
  import { Pinia } from 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
package/dist/index.mjs CHANGED
@@ -840,8 +840,34 @@ class Query {
840
840
  if (values instanceof Set) {
841
841
  values = Array.from(values);
842
842
  }
843
- this.wheres.push({ field, value: values, boolean: "and" });
844
- return this;
843
+ return this.where(field, values);
844
+ }
845
+ /**
846
+ * Add a "where not in" clause to the query.
847
+ */
848
+ whereNotIn(field, values) {
849
+ if (values instanceof Set) {
850
+ values = Array.from(values);
851
+ }
852
+ return this.where((query) => !values.includes(query[field]));
853
+ }
854
+ /**
855
+ * Add a "where not in" clause to the query.
856
+ */
857
+ orWhereIn(field, values) {
858
+ if (values instanceof Set) {
859
+ values = Array.from(values);
860
+ }
861
+ return this.orWhere(field, values);
862
+ }
863
+ /**
864
+ * Add a "where not in" clause to the query.
865
+ */
866
+ orWhereNotIn(field, values) {
867
+ if (values instanceof Set) {
868
+ values = Array.from(values);
869
+ }
870
+ return this.orWhere((query) => !values.includes(query[field]));
845
871
  }
846
872
  /**
847
873
  * Add a where clause on the primary key to the query.
@@ -856,6 +882,18 @@ class Query {
856
882
  this.wheres.push({ field, value, boolean: "or" });
857
883
  return this;
858
884
  }
885
+ /**
886
+ * Add a "whereNULL" clause to the query.
887
+ */
888
+ whereNull(field) {
889
+ return this.where(field, null);
890
+ }
891
+ /**
892
+ * Add a "whereNotNULL" clause to the query.
893
+ */
894
+ whereNotNull(field) {
895
+ return this.where((query) => query[field] != null);
896
+ }
859
897
  /**
860
898
  * Add a "where has" clause to the query.
861
899
  */
@@ -1050,13 +1088,13 @@ class Query {
1050
1088
  this.where(this.model.$typeKey(), this.model.$fields()[this.model.$typeKey()].make());
1051
1089
  }
1052
1090
  let models = this.select();
1053
- if (!this.orders) {
1091
+ if (this.orders.length === 0) {
1054
1092
  models = this.filterLimit(models);
1055
1093
  }
1056
1094
  if (!isEmpty(models)) {
1057
1095
  this.eagerLoadRelations(models);
1058
1096
  }
1059
- if (this.orders) {
1097
+ if (this.orders.length > 0) {
1060
1098
  models = this.filterOrder(models);
1061
1099
  models = this.filterLimit(models);
1062
1100
  }
@@ -1649,6 +1687,22 @@ class Repository {
1649
1687
  this.database = database;
1650
1688
  this.pinia = pinia;
1651
1689
  this.hydratedDataCache = cache;
1690
+ return new Proxy(this, {
1691
+ get(repository, field) {
1692
+ if (typeof field === "symbol") {
1693
+ return;
1694
+ }
1695
+ if (field in repository) {
1696
+ return repository[field];
1697
+ }
1698
+ if (field === "use" || field === "model" || field === "queryCache") {
1699
+ return;
1700
+ }
1701
+ return function(...args) {
1702
+ return repository.query()[field](...args);
1703
+ };
1704
+ }
1705
+ });
1652
1706
  }
1653
1707
  /**
1654
1708
  * Set the model
@@ -1856,9 +1910,6 @@ class Repository {
1856
1910
  all() {
1857
1911
  return this.query().get();
1858
1912
  }
1859
- find(ids) {
1860
- return this.query().find(ids);
1861
- }
1862
1913
  revive(schema) {
1863
1914
  return this.query().revive(schema);
1864
1915
  }
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.cjs';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.cjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.mjs';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.mjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.js';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.js';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.cjs';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.cjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.mjs';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.mjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.js';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.js';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.cjs';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.cjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.mjs';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.mjs';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -1,4 +1,4 @@
1
- import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.js';
1
+ import { $ as CastAttribute, aj as NanoidOptions, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.js';
2
2
  import 'pinia';
3
3
  import '@pinia-orm/normalizr';
4
4
  import '@/composables';
@@ -417,6 +417,18 @@ declare class Query<M extends Model = Model> {
417
417
  * Add a "where in" clause to the query.
418
418
  */
419
419
  whereIn(field: string, values: any[] | Set<any>): this;
420
+ /**
421
+ * Add a "where not in" clause to the query.
422
+ */
423
+ whereNotIn(field: string, values: any[] | Set<any>): this;
424
+ /**
425
+ * Add a "where not in" clause to the query.
426
+ */
427
+ orWhereIn(field: string, values: any[] | Set<any>): this;
428
+ /**
429
+ * Add a "where not in" clause to the query.
430
+ */
431
+ orWhereNotIn(field: string, values: any[] | Set<any>): this;
420
432
  /**
421
433
  * Add a where clause on the primary key to the query.
422
434
  */
@@ -425,6 +437,14 @@ declare class Query<M extends Model = Model> {
425
437
  * Add an "or where" clause to the query.
426
438
  */
427
439
  orWhere(field: WherePrimaryClosure | string, value?: WhereSecondaryClosure | any): this;
440
+ /**
441
+ * Add a "whereNULL" clause to the query.
442
+ */
443
+ whereNull(field: string): this;
444
+ /**
445
+ * Add a "whereNotNULL" clause to the query.
446
+ */
447
+ whereNotNull(field: string): this;
428
448
  /**
429
449
  * Add a "where has" clause to the query.
430
450
  */
@@ -1929,11 +1949,6 @@ declare class Repository<M extends Model = Model> {
1929
1949
  * Get all models from the store.
1930
1950
  */
1931
1951
  all(): Collection<M>;
1932
- /**
1933
- * Find the model with the given id.
1934
- */
1935
- find(id: string | number): Item<M>;
1936
- find(ids: (string | number)[]): Collection<M>;
1937
1952
  /**
1938
1953
  * Retrieves the models from the store by following the given
1939
1954
  * normalized schema.
@@ -417,6 +417,18 @@ declare class Query<M extends Model = Model> {
417
417
  * Add a "where in" clause to the query.
418
418
  */
419
419
  whereIn(field: string, values: any[] | Set<any>): this;
420
+ /**
421
+ * Add a "where not in" clause to the query.
422
+ */
423
+ whereNotIn(field: string, values: any[] | Set<any>): this;
424
+ /**
425
+ * Add a "where not in" clause to the query.
426
+ */
427
+ orWhereIn(field: string, values: any[] | Set<any>): this;
428
+ /**
429
+ * Add a "where not in" clause to the query.
430
+ */
431
+ orWhereNotIn(field: string, values: any[] | Set<any>): this;
420
432
  /**
421
433
  * Add a where clause on the primary key to the query.
422
434
  */
@@ -425,6 +437,14 @@ declare class Query<M extends Model = Model> {
425
437
  * Add an "or where" clause to the query.
426
438
  */
427
439
  orWhere(field: WherePrimaryClosure | string, value?: WhereSecondaryClosure | any): this;
440
+ /**
441
+ * Add a "whereNULL" clause to the query.
442
+ */
443
+ whereNull(field: string): this;
444
+ /**
445
+ * Add a "whereNotNULL" clause to the query.
446
+ */
447
+ whereNotNull(field: string): this;
428
448
  /**
429
449
  * Add a "where has" clause to the query.
430
450
  */
@@ -1929,11 +1949,6 @@ declare class Repository<M extends Model = Model> {
1929
1949
  * Get all models from the store.
1930
1950
  */
1931
1951
  all(): Collection<M>;
1932
- /**
1933
- * Find the model with the given id.
1934
- */
1935
- find(id: string | number): Item<M>;
1936
- find(ids: (string | number)[]): Collection<M>;
1937
1952
  /**
1938
1953
  * Retrieves the models from the store by following the given
1939
1954
  * normalized schema.
@@ -417,6 +417,18 @@ declare class Query<M extends Model = Model> {
417
417
  * Add a "where in" clause to the query.
418
418
  */
419
419
  whereIn(field: string, values: any[] | Set<any>): this;
420
+ /**
421
+ * Add a "where not in" clause to the query.
422
+ */
423
+ whereNotIn(field: string, values: any[] | Set<any>): this;
424
+ /**
425
+ * Add a "where not in" clause to the query.
426
+ */
427
+ orWhereIn(field: string, values: any[] | Set<any>): this;
428
+ /**
429
+ * Add a "where not in" clause to the query.
430
+ */
431
+ orWhereNotIn(field: string, values: any[] | Set<any>): this;
420
432
  /**
421
433
  * Add a where clause on the primary key to the query.
422
434
  */
@@ -425,6 +437,14 @@ declare class Query<M extends Model = Model> {
425
437
  * Add an "or where" clause to the query.
426
438
  */
427
439
  orWhere(field: WherePrimaryClosure | string, value?: WhereSecondaryClosure | any): this;
440
+ /**
441
+ * Add a "whereNULL" clause to the query.
442
+ */
443
+ whereNull(field: string): this;
444
+ /**
445
+ * Add a "whereNotNULL" clause to the query.
446
+ */
447
+ whereNotNull(field: string): this;
428
448
  /**
429
449
  * Add a "where has" clause to the query.
430
450
  */
@@ -1929,11 +1949,6 @@ declare class Repository<M extends Model = Model> {
1929
1949
  * Get all models from the store.
1930
1950
  */
1931
1951
  all(): Collection<M>;
1932
- /**
1933
- * Find the model with the given id.
1934
- */
1935
- find(id: string | number): Item<M>;
1936
- find(ids: (string | number)[]): Collection<M>;
1937
1952
  /**
1938
1953
  * Retrieves the models from the store by following the given
1939
1954
  * normalized schema.
@@ -1,5 +1,5 @@
1
1
  import { V1Options } from 'uuid';
2
- import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.cjs';
2
+ import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.cjs';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
@@ -1,5 +1,5 @@
1
1
  import { V1Options } from 'uuid';
2
- import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.mjs';
2
+ import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.mjs';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
package/dist/uuid/v1.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { V1Options } from 'uuid';
2
- import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.js';
2
+ import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.js';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
@@ -1,5 +1,5 @@
1
1
  import { V4Options } from 'uuid';
2
- import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.cjs';
2
+ import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.cjs';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
@@ -1,5 +1,5 @@
1
1
  import { V4Options } from 'uuid';
2
- import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.mjs';
2
+ import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.mjs';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
package/dist/uuid/v4.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { V4Options } from 'uuid';
2
- import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.4d8aa1c7.js';
2
+ import { $ as CastAttribute, m as ModelFields, af as PropertyDecorator } from '../shared/pinia-orm.677cd0bd.js';
3
3
  import 'pinia';
4
4
  import '@pinia-orm/normalizr';
5
5
  import '@/composables';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinia-orm-edge",
3
- "version": "1.9.0-28582105.fda0f99",
3
+ "version": "1.9.0-28582911.bbf7a93",
4
4
  "description": "The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.",
5
5
  "keywords": [
6
6
  "vue",
@@ -46,7 +46,7 @@
46
46
  "pinia": "^2.1.7"
47
47
  },
48
48
  "dependencies": {
49
- "@pinia-orm/normalizr": "npm:@pinia-orm/normalizr-edge@1.9.0-28582105.fda0f99"
49
+ "@pinia-orm/normalizr": "npm:@pinia-orm/normalizr-edge@1.9.0-28582911.bbf7a93"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@nuxt/eslint-config": "^0.3.10",