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

sedentary

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sedentary - npm Package Compare versions

Comparing version 0.0.44 to 0.0.45

1

dist/cjs/db.d.ts

@@ -88,2 +88,3 @@ export declare class EntryBase {

abstract begin(): Promise<T>;
abstract cancel(tableName: string): (where: string, tx?: Transaction) => Promise<number>;
abstract escape(value: unknown): string;

@@ -90,0 +91,0 @@ abstract load(tableName: string, attributes: Record<string, string>, pk: Attribute<unknown, unknown>, model: new () => EntryBase, table: Table): (where: string, order?: string | string[], limit?: number, tx?: Transaction, lock?: boolean) => Promise<EntryBase[]>;

3

dist/cjs/index.d.ts

@@ -77,2 +77,3 @@ import { Attribute, DB, EntryBase, ForeignKeyOptions, Transaction, Type } from "./db";

load(where: Condition<A>, tx: Transaction, lock?: boolean): Promise<E[]>;
cancel(where: Condition<A>, tx?: Transaction): Promise<number>;
}

@@ -123,3 +124,3 @@ declare type ModelBase<T, A extends AttributesDefinition, EA extends Record<string, unknown>, EM extends EntryBase, E extends EntryBase> = (new (from?: Partial<EA>, tx?: Transaction) => E) & Attribute<T, E> & {

Number(): Type<number, unknown>;
VarChar(size?: number): Type<string, unknown>;
VarChar<S extends string>(size?: number): Type<S, unknown>;
private checkDB;

@@ -126,0 +127,0 @@ private checkOrderBy;

@@ -446,4 +446,7 @@ "use strict";

this.db.tables.push(table);
const cancel_ = this.db.cancel(tableName);
const cancel = (where, tx) => cancel_(this.createWhere(modelName, attr2field, where)[0], tx);
Object.defineProperty(cancel, "name", { value: modelName + ".cancel" });
const load_ = this.db.load(tableName, attr2field, pk, ret, table);
const load = async (where, ...args) => {
const load = (where, ...args) => {
let order = undefined;

@@ -481,7 +484,6 @@ let limit = undefined;

throw new Error(`${modelName}.load: 'tx' argument: Wrong type, expected 'Transaction'`);
const [str] = this.createWhere(modelName, attr2field, where);
const ret = await load_(str, order, limit, tx, lock);
return ret;
return load_(this.createWhere(modelName, attr2field, where)[0], order, limit, tx, lock);
};
Object.defineProperty(load, "name", { value: modelName + ".load" });
Object.defineProperty(ret, "cancel", { value: cancel });
Object.defineProperty(ret, "name", { value: modelName });

@@ -488,0 +490,0 @@ Object.defineProperty(ret, "load", { value: load });

@@ -88,2 +88,3 @@ export declare class EntryBase {

abstract begin(): Promise<T>;
abstract cancel(tableName: string): (where: string, tx?: Transaction) => Promise<number>;
abstract escape(value: unknown): string;

@@ -90,0 +91,0 @@ abstract load(tableName: string, attributes: Record<string, string>, pk: Attribute<unknown, unknown>, model: new () => EntryBase, table: Table): (where: string, order?: string | string[], limit?: number, tx?: Transaction, lock?: boolean) => Promise<EntryBase[]>;

@@ -77,2 +77,3 @@ import { Attribute, DB, EntryBase, ForeignKeyOptions, Transaction, Type } from "./db";

load(where: Condition<A>, tx: Transaction, lock?: boolean): Promise<E[]>;
cancel(where: Condition<A>, tx?: Transaction): Promise<number>;
}

@@ -123,3 +124,3 @@ declare type ModelBase<T, A extends AttributesDefinition, EA extends Record<string, unknown>, EM extends EntryBase, E extends EntryBase> = (new (from?: Partial<EA>, tx?: Transaction) => E) & Attribute<T, E> & {

Number(): Type<number, unknown>;
VarChar(size?: number): Type<string, unknown>;
VarChar<S extends string>(size?: number): Type<S, unknown>;
private checkDB;

@@ -126,0 +127,0 @@ private checkOrderBy;

@@ -440,4 +440,7 @@ import { Attribute, EntryBase, Table, Transaction, Type } from "./db";

this.db.tables.push(table);
const cancel_ = this.db.cancel(tableName);
const cancel = (where, tx) => cancel_(this.createWhere(modelName, attr2field, where)[0], tx);
Object.defineProperty(cancel, "name", { value: modelName + ".cancel" });
const load_ = this.db.load(tableName, attr2field, pk, ret, table);
const load = async (where, ...args) => {
const load = (where, ...args) => {
let order = undefined;

@@ -475,7 +478,6 @@ let limit = undefined;

throw new Error(`${modelName}.load: 'tx' argument: Wrong type, expected 'Transaction'`);
const [str] = this.createWhere(modelName, attr2field, where);
const ret = await load_(str, order, limit, tx, lock);
return ret;
return load_(this.createWhere(modelName, attr2field, where)[0], order, limit, tx, lock);
};
Object.defineProperty(load, "name", { value: modelName + ".load" });
Object.defineProperty(ret, "cancel", { value: cancel });
Object.defineProperty(ret, "name", { value: modelName });

@@ -482,0 +484,0 @@ Object.defineProperty(ret, "load", { value: load });

@@ -88,2 +88,3 @@ export declare class EntryBase {

abstract begin(): Promise<T>;
abstract cancel(tableName: string): (where: string, tx?: Transaction) => Promise<number>;
abstract escape(value: unknown): string;

@@ -90,0 +91,0 @@ abstract load(tableName: string, attributes: Record<string, string>, pk: Attribute<unknown, unknown>, model: new () => EntryBase, table: Table): (where: string, order?: string | string[], limit?: number, tx?: Transaction, lock?: boolean) => Promise<EntryBase[]>;

@@ -77,2 +77,3 @@ import { Attribute, DB, EntryBase, ForeignKeyOptions, Transaction, Type } from "./db";

load(where: Condition<A>, tx: Transaction, lock?: boolean): Promise<E[]>;
cancel(where: Condition<A>, tx?: Transaction): Promise<number>;
}

@@ -123,3 +124,3 @@ declare type ModelBase<T, A extends AttributesDefinition, EA extends Record<string, unknown>, EM extends EntryBase, E extends EntryBase> = (new (from?: Partial<EA>, tx?: Transaction) => E) & Attribute<T, E> & {

Number(): Type<number, unknown>;
VarChar(size?: number): Type<string, unknown>;
VarChar<S extends string>(size?: number): Type<S, unknown>;
private checkDB;

@@ -126,0 +127,0 @@ private checkOrderBy;

@@ -61,3 +61,3 @@ {

"types": "./dist/types/index.d.ts",
"version": "0.0.44"
"version": "0.0.45"
}
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