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

@berish/orm

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@berish/orm - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

build/serber/instances/index.d.ts

2

build/edge/edge.js

@@ -15,4 +15,4 @@ "use strict";

const utils_1 = require("../utils");
const query_1 = require("../query");
const QueueActions = require("./queueActions");
const query_1 = require("../query");
class Edge {

@@ -19,0 +19,0 @@ constructor(srcCtor, edgeName, dstCtor, mode, entityId) {

@@ -5,17 +5,2 @@ "use strict";

const registrator_1 = require("../../registrator");
// export function Register(className: string) {
// return function(target: typeof Entity) {
// const withClassName = {};
// target.className = className;
// withClassName[target.name] = class extends (target as any) {
// constructor(...args) {
// super(...args);
// this.set('id', generateId());
// }
// };
// registrator.register(withClassName[target.name], className);
// withClassName[target.name]['className'] = className;
// return withClassName[target.name];
// } as any;
// }
function Register(className) {

@@ -22,0 +7,0 @@ return function (target) {

@@ -1,5 +0,5 @@

import { Entity } from '../entity';
import { FileEntity } from '../fileEntity';
import type { Entity } from '../entity';
import type { FileEntity } from '../fileEntity';
export declare function fromJSON<TEntity extends Entity | FileEntity = Entity>(json: {
[key: string]: any;
}): TEntity;

@@ -1,3 +0,3 @@

import { Entity } from '../entity';
import { FileEntity } from '../fileEntity';
import type { Entity } from '../entity';
import type { FileEntity } from '../fileEntity';
export interface IAttributes {

@@ -4,0 +4,0 @@ id: string;

@@ -1,2 +0,2 @@

import { Entity } from '../entity';
import type { Entity } from '../entity';
export declare function getClassName(entity: Entity): string;

@@ -1,3 +0,3 @@

import { Entity } from '../entity';
import { FileEntity } from '../fileEntity';
import type { Entity } from '../entity';
import type { FileEntity } from '../fileEntity';
export declare function getCreatedAt(entity: Entity | FileEntity): Date;
import { Edge } from '../../edge';
import { Entity } from '../entity';
import type { Entity } from '../entity';
export declare function getEdge<Dst extends Entity = Entity>(entity: Entity, edgeName: string, dstClassName: string | (new () => Dst)): Edge<Dst>;

@@ -16,2 +16,3 @@ "use strict";

const serber_1 = require("../../serber");
const { SYMBOL_SERBER_CACHE_ENTITIES, SYMBOL_SERBER_CACHE_ENTITIES_IGNORE_IDS, SYMBOL_SERBER_CACHE_FILE_ENTITIES, SYMBOL_SERBER_ENTITY_CLASSNAME, SYMBOL_SERBER_FOR_LOAD_ENTITIES, SYMBOL_SERBER_FOR_LOAD_FILE_ENTITIES, } = serber_1.plugins;
function convertDBItemsToEntities(manager, className, items, deep, cacheIgnoreIds) {

@@ -26,8 +27,8 @@ return __awaiter(this, void 0, void 0, function* () {

const deserialized = serber_1.serberEntityToDB.deserialize(items, {
[serber_1.SYMBOL_SERBER_ENTITY_CLASSNAME]: className,
[serber_1.SYMBOL_SERBER_CACHE_ENTITIES]: cacheEntities,
[serber_1.SYMBOL_SERBER_CACHE_ENTITIES_IGNORE_IDS]: cacheIgnoreIds,
[serber_1.SYMBOL_SERBER_FOR_LOAD_ENTITIES]: forLoadEntities,
[serber_1.SYMBOL_SERBER_CACHE_FILE_ENTITIES]: cacheFiles,
[serber_1.SYMBOL_SERBER_FOR_LOAD_FILE_ENTITIES]: forLoadFiles,
[SYMBOL_SERBER_ENTITY_CLASSNAME]: className,
[SYMBOL_SERBER_CACHE_ENTITIES]: cacheEntities,
[SYMBOL_SERBER_CACHE_ENTITIES_IGNORE_IDS]: cacheIgnoreIds,
[SYMBOL_SERBER_FOR_LOAD_ENTITIES]: forLoadEntities,
[SYMBOL_SERBER_CACHE_FILE_ENTITIES]: cacheFiles,
[SYMBOL_SERBER_FOR_LOAD_FILE_ENTITIES]: forLoadFiles,
});

@@ -34,0 +35,0 @@ if (!initialEntities)

@@ -15,2 +15,3 @@ "use strict";

const serber_1 = require("../../serber");
const { SYMBOL_SERBER_FILES } = serber_1.plugins;
function getFile(manager, arr, fetchData) {

@@ -28,3 +29,3 @@ return __awaiter(this, void 0, void 0, function* () {

const items = yield manager.file.get(files.map((m) => m.id), fetchData);
const deserialized = serber_1.serberFileEntityToDB.deserialize(items, { [serber_1.SYMBOL_SERBER_FILES]: files });
const deserialized = serber_1.serberFileEntityToDB.deserialize(items, { [SYMBOL_SERBER_FILES]: files });
return deserialized;

@@ -31,0 +32,0 @@ });

@@ -32,2 +32,3 @@ import { Entity } from '../entity';

};
pluck?: string[];
}

@@ -66,2 +67,3 @@ export declare type QueryData<TSchema extends {

greaterOrEqual(key: string, value: any): this;
pluck(...keys: string[]): this;
count(manager: Manager): Promise<number>;

@@ -68,0 +70,0 @@ get(id: string, manager: Manager, deep?: number): Promise<T>;

@@ -126,2 +126,5 @@ "use strict";

}
pluck(...keys) {
return this.append('pluck', keys);
}
// METHODS

@@ -128,0 +131,0 @@ count(manager) {

export * from './abstract';
export * from './entityToBaseDBItemPlugin';
export * from './entityToEntityPointerPlugin';
export * from './entityToFullEntityPlugin';
export * from './fileEntitiyToFullFileEntityPlugin';
export * from './fileEntityToBaseFileItemPlugin';
export * from './fileEntityToFileEntityPointerPlugin';
export * as plugins from './plugins';
export * from './instances';
export * from './undefinedDBPlugin';

@@ -13,11 +13,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.plugins = void 0;
__exportStar(require("./abstract"), exports);
__exportStar(require("./entityToBaseDBItemPlugin"), exports);
__exportStar(require("./entityToEntityPointerPlugin"), exports);
__exportStar(require("./entityToFullEntityPlugin"), exports);
__exportStar(require("./fileEntitiyToFullFileEntityPlugin"), exports);
__exportStar(require("./fileEntityToBaseFileItemPlugin"), exports);
__exportStar(require("./fileEntityToFileEntityPointerPlugin"), exports);
exports.plugins = require("./plugins");
__exportStar(require("./instances"), exports);
__exportStar(require("./undefinedDBPlugin"), exports);
//# sourceMappingURL=index.js.map

@@ -0,3 +1,4 @@

export * from './convertDate';
export * from './generateId';
export * from './getHash';
export * from './queue';

@@ -13,2 +13,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./convertDate"), exports);
__exportStar(require("./generateId"), exports);

@@ -15,0 +16,0 @@ __exportStar(require("./getHash"), exports);

{
"name": "@berish/orm",
"version": "0.3.0",
"version": "0.4.0",
"description": "ORM",

@@ -5,0 +5,0 @@ "main": "build/index.js",

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