New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fxjs/orm

Package Overview
Dependencies
Maintainers
2
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fxjs/orm - npm Package Compare versions

Comparing version 1.16.6 to 1.16.7

16

lib/Associations/Extend.js

@@ -39,3 +39,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

model: null,
table: assoc_options.table || _utils_1.defineDefaultExtendsToTableName(Model.table, name),
table: assoc_options.table || (0, _utils_1.defineDefaultExtendsToTableName)(Model.table, name),
reverse: assoc_options.reverse,

@@ -50,7 +50,7 @@ // reversed : assoc_options.reversed,

}) || Utilities.formatAssociatedField(Model, Model.table, false, false),
getAccessor: assoc_options.getAccessor || _utils_1.defineAssociationAccessorMethodName(_utils_1.ACCESSOR_KEYS.get, associationSemanticNameCore),
setAccessor: assoc_options.setAccessor || _utils_1.defineAssociationAccessorMethodName(_utils_1.ACCESSOR_KEYS.set, associationSemanticNameCore),
hasAccessor: assoc_options.hasAccessor || _utils_1.defineAssociationAccessorMethodName(_utils_1.ACCESSOR_KEYS.has, associationSemanticNameCore),
delAccessor: assoc_options.delAccessor || _utils_1.defineAssociationAccessorMethodName(_utils_1.ACCESSOR_KEYS.del, associationSemanticNameCore),
modelFindByAccessor: assoc_options.modelFindByAccessor || _utils_1.defineAssociationAccessorMethodName(_utils_1.ACCESSOR_KEYS.modelFindBy, associationSemanticNameCore),
getAccessor: assoc_options.getAccessor || (0, _utils_1.defineAssociationAccessorMethodName)(_utils_1.ACCESSOR_KEYS.get, associationSemanticNameCore),
setAccessor: assoc_options.setAccessor || (0, _utils_1.defineAssociationAccessorMethodName)(_utils_1.ACCESSOR_KEYS.set, associationSemanticNameCore),
hasAccessor: assoc_options.hasAccessor || (0, _utils_1.defineAssociationAccessorMethodName)(_utils_1.ACCESSOR_KEYS.has, associationSemanticNameCore),
delAccessor: assoc_options.delAccessor || (0, _utils_1.defineAssociationAccessorMethodName)(_utils_1.ACCESSOR_KEYS.del, associationSemanticNameCore),
modelFindByAccessor: assoc_options.modelFindByAccessor || (0, _utils_1.defineAssociationAccessorMethodName)(_utils_1.ACCESSOR_KEYS.modelFindBy, associationSemanticNameCore),
hooks: Object.assign({}, assoc_options.hooks),

@@ -105,3 +105,3 @@ };

}
return Model_1.listFindByChainOrRunSync(Model, {}, [
return (0, Model_1.listFindByChainOrRunSync)(Model, {}, [
{

@@ -116,3 +116,3 @@ association_name: association.name,

Model[association.modelFindBySyncAccessor] = findByAccessorChainOrRunSync(true);
_utils_1.addAssociationInfoToModel(Model, name, {
(0, _utils_1.addAssociationInfoToModel)(Model, name, {
type: 'extendsTo',

@@ -119,0 +119,0 @@ association: association

@@ -157,3 +157,3 @@ /// <reference lib="es5" />

exists.link = [
_utils_1.getMapsToFromPropertyHash(association.mergeAssocId)[0],
(0, _utils_1.getMapsToFromPropertyHash)(association.mergeAssocId)[0],
association.model.keys[0]

@@ -168,3 +168,3 @@ ];

}
return Model_1.listFindByChainOrRunSync(Model, {}, [
return (0, Model_1.listFindByChainOrRunSync)(Model, {}, [
{

@@ -179,3 +179,3 @@ association_name: association.name,

Model[association.modelFindBySyncAccessor] = findByAccessorChainOrRunSync(true);
_utils_1.addAssociationInfoToModel(Model, name, {
(0, _utils_1.addAssociationInfoToModel)(Model, name, {
type: 'hasMany',

@@ -182,0 +182,0 @@ association: association

@@ -98,3 +98,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

}
return Model_1.listFindByChainOrRunSync(Model, {}, [
return (0, Model_1.listFindByChainOrRunSync)(Model, {}, [
{

@@ -109,3 +109,3 @@ association_name: association.name,

Model[association.modelFindBySyncAccessor] = findByAccessorChainOrRunSync(true);
_utils_1.addAssociationInfoToModel(Model, assoc_name, {
(0, _utils_1.addAssociationInfoToModel)(Model, assoc_name, {
type: 'hasOne',

@@ -112,0 +112,0 @@ association

@@ -20,3 +20,3 @@ const util = require("util");

const { tableConditions, topConditions } = Utilities.extractSelectTopConditions(conditions, vFields);
const __pointTypeMapsTo = _dml_helpers_1.pickPointTypeFields(opts.driver, Model.allProperties);
const __pointTypeMapsTo = (0, _dml_helpers_1.pickPointTypeFields)(opts.driver, Model.allProperties);
foundItems = opts.driver.find(opts.only, opts.table, tableConditions, {

@@ -23,0 +23,0 @@ limit: Utilities.coercePositiveInt(opts.limit, undefined),

@@ -96,3 +96,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

const __pointTypeMapsTo = opts.__pointTypeMapsTo || [];
_dml_helpers_1.filterFieldsOnFind({
(0, _dml_helpers_1.filterFieldsOnFind)({
dmlDriver: this,

@@ -129,3 +129,3 @@ pointPropertiesMapsTo: __pointTypeMapsTo,

__pointTypeMapsTo.forEach(field => {
item[field] = _dml_helpers_1.safeParseJson(item[field]);
item[field] = (0, _dml_helpers_1.safeParseJson)(item[field]);
});

@@ -132,0 +132,0 @@ });

@@ -105,3 +105,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

__pointTypeMapsTo.forEach(field => {
item[field] = _dml_helpers_1.safeParseJson(_dml_helpers_1.unwrapQuote(item[field]));
item[field] = (0, _dml_helpers_1.safeParseJson)((0, _dml_helpers_1.unwrapQuote)(item[field]));
});

@@ -108,0 +108,0 @@ });

@@ -49,3 +49,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

const syncResult = Utilities.catchBlocking(() => {
const DMLDriver = Adapters_1.getAdapter(adapterName);
const DMLDriver = (0, Adapters_1.getAdapter)(adapterName);
const settings = Settings.Container(Settings.defaultSettingsInstance.get('*'));

@@ -109,3 +109,3 @@ const driver = new DMLDriver(dbdriver.uri, null, {

try {
const DMLDriver = Adapters_1.getAdapter(proto);
const DMLDriver = (0, Adapters_1.getAdapter)(proto);
const settings = Settings.Container(Settings.defaultSettingsInstance.get('*'));

@@ -112,0 +112,0 @@ const driver = new DMLDriver(null, connection, {

@@ -278,3 +278,3 @@ /// <reference lib="es2017" />

const { tableConditions, topConditions } = Utilities.extractSelectTopConditions(conditions, vFields);
const __pointTypeMapsTo = _dml_helpers_1.pickPointTypeFields(m_opts.driver, allProperties);
const __pointTypeMapsTo = (0, _dml_helpers_1.pickPointTypeFields)(m_opts.driver, allProperties);
try {

@@ -722,4 +722,3 @@ founditems = m_opts.driver.find(model_selectable_fields, m_opts.table, tableConditions, {

var prop = Property.normalize({
prop: propIn,
name: (options && options.name || propIn.name),
prop: propIn, name: (options && options.name || propIn.name),
customTypes: m_opts.db.customTypes, settings: m_opts.settings

@@ -897,3 +896,3 @@ });

alias: getTableAlias(`lj_${association.mergeTable}`),
ids: _utils_1.getMapsToFromPropertyHash(association.mergeId)
ids: (0, _utils_1.getMapsToFromPropertyHash)(association.mergeId)
};

@@ -903,3 +902,3 @@ const rjoin_info = {

alias: getTableAlias(`rj_${association.mergeTable}`),
ids: _utils_1.getMapsToFromPropertyHash(association.mergeAssocId)
ids: (0, _utils_1.getMapsToFromPropertyHash)(association.mergeAssocId)
};

@@ -932,3 +931,3 @@ const right_info = {

else if (isHasOne) { // support hasone
const reled_ids = typeof association.field === 'string' ? [association.field] : (Array.isArray(association.field) ? association.field : _utils_1.getMapsToFromPropertyHash(association.field));
const reled_ids = typeof association.field === 'string' ? [association.field] : (Array.isArray(association.field) ? association.field : (0, _utils_1.getMapsToFromPropertyHash)(association.field));
const base_info = {

@@ -935,0 +934,0 @@ table: `${model.table}`,

@@ -119,2 +119,2 @@ Object.defineProperty(exports, "__esModule", { value: true });

}
exports.defaultSettingsInstance = Container(exports.defaults());
exports.defaultSettingsInstance = Container((0, exports.defaults)());

@@ -17,3 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

return;
exports.modelClear(model, key);
(0, exports.modelClear)(model, key);
});

@@ -36,3 +36,3 @@ return this;

const { driver_table_uid } = Helpers.parseDriverUidAndTableNameFromUID(key);
return exports.modelGet(models[driver_table_uid], key, opts, reFetchSync);
return (0, exports.modelGet)(models[driver_table_uid], key, opts, reFetchSync);
};

@@ -39,0 +39,0 @@ exports.get = get;

@@ -606,6 +606,6 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (host.properties) {
filterDate_1.filterDate(conditions, { properties: host.properties });
(0, filterDate_1.filterDate)(conditions, { properties: host.properties });
}
else {
filterDate_1.filterDate(conditions, { properties: host.allProperties });
(0, filterDate_1.filterDate)(conditions, { properties: host.allProperties });
}

@@ -659,3 +659,3 @@ return conditions;

for (let k in AvailableHooks) {
association[AvailableHooks[k]] = exports.createHookHelper(association.hooks, AvailableHooks[k], { initialHooks: Object.assign({}, association.hooks) });
association[AvailableHooks[k]] = (0, exports.createHookHelper)(association.hooks, AvailableHooks[k], { initialHooks: Object.assign({}, association.hooks) });
}

@@ -751,3 +751,3 @@ }

let name, _channel;
Helpers_1.selectArgs(Array.prototype.slice.apply(arguments), (arg_type, arg) => {
(0, Helpers_1.selectArgs)(Array.prototype.slice.apply(arguments), (arg_type, arg) => {
switch (arg_type) {

@@ -754,0 +754,0 @@ case 'string':

@@ -30,3 +30,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

for (let k in conds) {
if (common_1.isModelConjunctionsKey(k))
if ((0, common_1.isModelConjunctionsKey)(k))
Array.isArray(conds[k]) && conds[k].forEach((item) => filterDate(item, m));

@@ -33,0 +33,0 @@ else {

{
"name": "@fxjs/orm",
"version": "1.16.6",
"version": "1.16.7",
"description": "",

@@ -37,11 +37,11 @@ "main": "lib",

"@fibjs/enforce": "^0.1.1",
"@fxjs/db-driver": "^0.5.1",
"@fxjs/knex": "^0.4.1",
"@fxjs/db-driver": "^0.5.2",
"@fxjs/knex": "^0.4.2",
"@fxjs/orm-core": "^0.3.2",
"@fxjs/orm-property": "^0.4.1",
"@fxjs/sql-ddl-sync": "^0.11.3",
"@fxjs/sql-query": "^0.10.0",
"@fxjs/orm-property": "^0.4.2",
"@fxjs/sql-ddl-sync": "^0.11.4",
"@fxjs/sql-query": "^0.10.1",
"@types/knex": "^0.16.1",
"fib-pool": "^1.6.0",
"knex": "^0.19.5",
"knex": "^2.5.1",
"lodash.clonedeep": "^4.5.0",

@@ -68,3 +68,3 @@ "lodash.flatten": "^4.4.0",

"@fxjs/knex": ">= 0.3 <= 0.3",
"knex": ">= 0.19.0 < 0.20"
"knex": ">= 0.19.0 < 2.6"
},

@@ -79,3 +79,3 @@ "private": false,

},
"gitHead": "000676c2b83127ad5ebbf852863aa12f1f796bfa"
"gitHead": "f2420f3142155b3a2946131c521dad005940e7f1"
}
import type { FxOrmQuery } from "./Typo/query";
declare const _default: (chain: FxOrmQuery.IChainFind, chain_cb: FxOrmQuery.IChainInstanceCallbackFn) => FxOrmQuery.IChainInstance;
/**
* NOT SUPPORTED
*/
declare const _default: (chain: FxOrmQuery.IChainFind, chain_cb: FxOrmQuery.IChainInstanceCallbackFn) => FxOrmQuery.IChainInstance;
export = _default;

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

/// <reference types="@fibjs/types" />
declare const _default: () => Class_EventEmitter;
export = _default;
/// <reference types="@fibjs/types" />
/// <reference types="@fibjs/types" />
import type { FxOrmCommon } from '../../Typo/_common';

@@ -3,0 +4,0 @@ import type { FxOrmDb } from '../../Typo/Db';

/// <reference types="@fibjs/types" />
/// <reference types="@fibjs/types" />
import type { FxOrmCommon } from '../../Typo/_common';

@@ -3,0 +4,0 @@ import type { FxOrmDb } from '../../Typo/Db';

/// <reference types="@fibjs/types" />
/// <reference types="@fibjs/types" />
import type { FxOrmCommon } from '../../Typo/_common';

@@ -3,0 +4,0 @@ import type { FxOrmDb } from '../../Typo/Db';

/// <reference types="@fibjs/types" />
/// <reference types="@fibjs/types" />
/// <reference types="@fibjs/types" />
import { FxDbDriverNS, IDbDriver } from "@fxjs/db-driver";

@@ -3,0 +5,0 @@ import type { FxOrmCommon } from "./_common";

/// <reference types="@fibjs/types" />
/// <reference types="@fibjs/enforce" />
/// <reference types="@fibjs/types" />
import type { FxOrmSqlDDLSync } from "@fxjs/sql-ddl-sync";

@@ -4,0 +5,0 @@ import { FxOrmAssociation } from "./assoc";

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

/// <reference types="@fibjs/types" />
import FxORMCore = require('@fxjs/orm-core');

@@ -111,3 +110,3 @@ import { FxSqlQuery, FxSqlQuerySubQuery, FxSqlQuerySql, FxSqlQueryDialect } from '@fxjs/sql-query';

export declare function parseTableInputForSelect(ta_str: string): {
pure_table: string | FxSqlQuerySql.SqlFromTableInput | `(${string})`;
pure_table: string | FxSqlQuerySql.SqlFromTableInput;
alias: string;

@@ -114,0 +113,0 @@ from_tuple: FxSqlQuerySql.SqlTableTuple;

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