Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spinajs/orm

Package Overview
Dependencies
Maintainers
1
Versions
341
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/orm - npm Package Compare versions

Comparing version 2.0.181 to 2.0.182

6

lib/cjs/interfaces.d.ts

@@ -350,2 +350,4 @@ import { Op } from './enums.js';

getRelationDescriptor(relation: string): IRelationDescriptor;
whereExists<T extends typeof ModelBase>(query: ISelectQueryBuilder<T>): ISelectQueryBuilder<Array<InstanceType<T>>>;
whereNotExists<T extends typeof ModelBase>(query: ISelectQueryBuilder<T>): ISelectQueryBuilder<Array<InstanceType<T>>>;
}

@@ -656,4 +658,4 @@ export interface IModelBase {

whereNotIn(column: string, val: unknown[]): this;
whereExist(query: ISelectQueryBuilder<T>): this;
whereNotExists(query: ISelectQueryBuilder<T>): this;
whereExist<M extends ModelBase | ModelBase[]>(query: ISelectQueryBuilder<M>): this;
whereNotExists<M extends ModelBase | ModelBase[]>(query: ISelectQueryBuilder<M>): this;
whereBetween(column: string, val: unknown[]): this;

@@ -660,0 +662,0 @@ whereNotBetween(column: string, val: unknown[]): this;

@@ -150,2 +150,4 @@ import { ModelData, ModelDataWithRelationData, PartialArray, PickRelations } from './types.js';

static exists(): Promise<boolean>;
static whereExists<T extends typeof ModelBase>(this: T, _query: ISelectQueryBuilder<T>): ISelectQueryBuilder<Array<InstanceType<T>>>;
static whereNotExists<T extends typeof ModelBase>(this: T, _query: ISelectQueryBuilder<T>): ISelectQueryBuilder<Array<InstanceType<T>>>;
constructor(data?: Partial<M>);

@@ -280,8 +282,10 @@ /**

exists<T_10 extends typeof ModelBase>(this: T_10, pk: any): Promise<boolean>;
first<T_11 extends typeof ModelBase>(this: T_11, callback?: (builder: IWhereBuilder<T_11>) => void): Promise<InstanceType<T_11>>;
last<T_12 extends typeof ModelBase>(this: T_12, callback?: (builder: IWhereBuilder<T_12>) => void): Promise<InstanceType<T_12>>;
newest<T_13 extends typeof ModelBase>(this: T_13, callback?: (builder: IWhereBuilder<T_13>) => void): Promise<InstanceType<T_13>>;
oldest<T_14 extends typeof ModelBase>(this: T_14, callback?: (builder: IWhereBuilder<T_14>) => void): Promise<InstanceType<T_14>>;
count<T_15 extends typeof ModelBase>(this: T_15, callback?: (builder: IWhereBuilder<T_15>) => void): Promise<number>;
whereExists<T_11 extends typeof ModelBase, Z extends ModelBase<unknown> | ModelBase<unknown>[]>(this: T_11, q: ISelectQueryBuilder<Z>): Promise<unknown>;
whereNotExists<T_12 extends typeof ModelBase, Z_1 extends ModelBase<unknown> | ModelBase<unknown>[]>(this: T_12, q: ISelectQueryBuilder<Z_1>): Promise<unknown>;
first<T_13 extends typeof ModelBase>(this: T_13, callback?: (builder: IWhereBuilder<T_13>) => void): Promise<InstanceType<T_13>>;
last<T_14 extends typeof ModelBase>(this: T_14, callback?: (builder: IWhereBuilder<T_14>) => void): Promise<InstanceType<T_14>>;
newest<T_15 extends typeof ModelBase>(this: T_15, callback?: (builder: IWhereBuilder<T_15>) => void): Promise<InstanceType<T_15>>;
oldest<T_16 extends typeof ModelBase>(this: T_16, callback?: (builder: IWhereBuilder<T_16>) => void): Promise<InstanceType<T_16>>;
count<T_17 extends typeof ModelBase>(this: T_17, callback?: (builder: IWhereBuilder<T_17>) => void): Promise<number>;
};
//# sourceMappingURL=model.d.ts.map

@@ -252,2 +252,8 @@ "use strict";

}
static whereExists(_query) {
throw new Error('Not implemented');
}
static whereNotExists(_query) {
throw new Error('Not implemented');
}
constructor(data) {

@@ -761,2 +767,12 @@ /**

},
async whereExists(q) {
const { query } = createQuery(this, builders_js_1.SelectQueryBuilder);
query.whereExist(q);
return await query;
},
async whereNotExists(q) {
const { query } = createQuery(this, builders_js_1.SelectQueryBuilder);
query.whereNotExists(q);
return await query;
},
async first(callback) {

@@ -763,0 +779,0 @@ const { query, description } = createQuery(this, builders_js_1.SelectQueryBuilder);

@@ -350,2 +350,4 @@ import { Op } from './enums.js';

getRelationDescriptor(relation: string): IRelationDescriptor;
whereExists<T extends typeof ModelBase>(query: ISelectQueryBuilder<T>): ISelectQueryBuilder<Array<InstanceType<T>>>;
whereNotExists<T extends typeof ModelBase>(query: ISelectQueryBuilder<T>): ISelectQueryBuilder<Array<InstanceType<T>>>;
}

@@ -656,4 +658,4 @@ export interface IModelBase {

whereNotIn(column: string, val: unknown[]): this;
whereExist(query: ISelectQueryBuilder<T>): this;
whereNotExists(query: ISelectQueryBuilder<T>): this;
whereExist<M extends ModelBase | ModelBase[]>(query: ISelectQueryBuilder<M>): this;
whereNotExists<M extends ModelBase | ModelBase[]>(query: ISelectQueryBuilder<M>): this;
whereBetween(column: string, val: unknown[]): this;

@@ -660,0 +662,0 @@ whereNotBetween(column: string, val: unknown[]): this;

@@ -150,2 +150,4 @@ import { ModelData, ModelDataWithRelationData, PartialArray, PickRelations } from './types.js';

static exists(): Promise<boolean>;
static whereExists<T extends typeof ModelBase>(this: T, _query: ISelectQueryBuilder<T>): ISelectQueryBuilder<Array<InstanceType<T>>>;
static whereNotExists<T extends typeof ModelBase>(this: T, _query: ISelectQueryBuilder<T>): ISelectQueryBuilder<Array<InstanceType<T>>>;
constructor(data?: Partial<M>);

@@ -280,8 +282,10 @@ /**

exists<T_10 extends typeof ModelBase>(this: T_10, pk: any): Promise<boolean>;
first<T_11 extends typeof ModelBase>(this: T_11, callback?: (builder: IWhereBuilder<T_11>) => void): Promise<InstanceType<T_11>>;
last<T_12 extends typeof ModelBase>(this: T_12, callback?: (builder: IWhereBuilder<T_12>) => void): Promise<InstanceType<T_12>>;
newest<T_13 extends typeof ModelBase>(this: T_13, callback?: (builder: IWhereBuilder<T_13>) => void): Promise<InstanceType<T_13>>;
oldest<T_14 extends typeof ModelBase>(this: T_14, callback?: (builder: IWhereBuilder<T_14>) => void): Promise<InstanceType<T_14>>;
count<T_15 extends typeof ModelBase>(this: T_15, callback?: (builder: IWhereBuilder<T_15>) => void): Promise<number>;
whereExists<T_11 extends typeof ModelBase, Z extends ModelBase<unknown> | ModelBase<unknown>[]>(this: T_11, q: ISelectQueryBuilder<Z>): Promise<unknown>;
whereNotExists<T_12 extends typeof ModelBase, Z_1 extends ModelBase<unknown> | ModelBase<unknown>[]>(this: T_12, q: ISelectQueryBuilder<Z_1>): Promise<unknown>;
first<T_13 extends typeof ModelBase>(this: T_13, callback?: (builder: IWhereBuilder<T_13>) => void): Promise<InstanceType<T_13>>;
last<T_14 extends typeof ModelBase>(this: T_14, callback?: (builder: IWhereBuilder<T_14>) => void): Promise<InstanceType<T_14>>;
newest<T_15 extends typeof ModelBase>(this: T_15, callback?: (builder: IWhereBuilder<T_15>) => void): Promise<InstanceType<T_15>>;
oldest<T_16 extends typeof ModelBase>(this: T_16, callback?: (builder: IWhereBuilder<T_16>) => void): Promise<InstanceType<T_16>>;
count<T_17 extends typeof ModelBase>(this: T_17, callback?: (builder: IWhereBuilder<T_17>) => void): Promise<number>;
};
//# sourceMappingURL=model.d.ts.map

@@ -245,2 +245,8 @@ /* eslint-disable prettier/prettier */

}
static whereExists(_query) {
throw new Error('Not implemented');
}
static whereNotExists(_query) {
throw new Error('Not implemented');
}
constructor(data) {

@@ -751,2 +757,12 @@ /**

},
async whereExists(q) {
const { query } = createQuery(this, SelectQueryBuilder);
query.whereExist(q);
return await query;
},
async whereNotExists(q) {
const { query } = createQuery(this, SelectQueryBuilder);
query.whereNotExists(q);
return await query;
},
async first(callback) {

@@ -753,0 +769,0 @@ const { query, description } = createQuery(this, SelectQueryBuilder);

{
"name": "@spinajs/orm",
"version": "2.0.181",
"version": "2.0.182",
"description": "framework orm module",

@@ -60,6 +60,6 @@ "main": "lib/cjs/index.js",

"dependencies": {
"@spinajs/configuration-common": "^2.0.181",
"@spinajs/di": "^2.0.181",
"@spinajs/exceptions": "^2.0.181",
"@spinajs/log-common": "^2.0.181",
"@spinajs/configuration-common": "^2.0.182",
"@spinajs/di": "^2.0.182",
"@spinajs/exceptions": "^2.0.182",
"@spinajs/log-common": "^2.0.182",

@@ -66,0 +66,0 @@ "glob": "^8.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc