Socket
Socket
Sign inDemoInstall

@capaj/objection

Package Overview
Dependencies
32
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.10 to 1.6.11

4

lib/queryBuilder/QueryBuilder.js

@@ -557,4 +557,4 @@ 'use strict';

return countQuery.then(
result => (result[0] && result[0].count ? parseInt(result[0].count, 10) : 0)
return countQuery.then(result =>
result[0] && result[0].count ? parseInt(result[0].count, 10) : 0
);

@@ -561,0 +561,0 @@ }

@@ -299,2 +299,6 @@ 'use strict';

clearHaving(...args) {
return this.addOperation(new KnexOperation('clearHaving'), args);
}
orHaving(...args) {

@@ -301,0 +305,0 @@ return this.addOperation(new KnexOperation('orHaving'), args);

@@ -80,4 +80,4 @@ 'use strict';

: this.modelClass
? builder.tableRefFor(this.modelClass.getTableName())
: null;
? builder.tableRefFor(this.modelClass.getTableName())
: null;

@@ -84,0 +84,0 @@ if (table) {

@@ -96,3 +96,3 @@ 'use strict';

return builder.modify(this.modify);
return this.applyModify(builder);
}

@@ -111,3 +111,3 @@

) {
let relatedJoinSelect = relatedJoinSelectQuery.modify(this.modify).as(relatedTableAlias);
let relatedJoinSelect = this.applyModify(relatedJoinSelectQuery).as(relatedTableAlias);

@@ -114,0 +114,0 @@ if (relatedJoinSelect.isSelectAll()) {

@@ -133,2 +133,6 @@ 'use strict';

return this.applyModify(builder);
}
applyModify(builder) {
try {

@@ -155,10 +159,10 @@ return builder.modify(this.modify);

) {
let relatedSelect = relatedJoinSelectQuery.modify(this.modify).as(relatedTableAlias);
let relatedJoinSelect = this.applyModify(relatedJoinSelectQuery).as(relatedTableAlias);
if (relatedSelect.isSelectAll()) {
if (relatedJoinSelect.isSelectAll()) {
// No need to join a subquery if the query is `select * from "RelatedTable"`.
relatedSelect = aliasedTableName(relatedTable, relatedTableAlias);
relatedJoinSelect = aliasedTableName(relatedTable, relatedTableAlias);
}
return builder[joinOperation](relatedSelect, join => {
return builder[joinOperation](relatedJoinSelect, join => {
const relatedProp = this.relatedProp;

@@ -165,0 +169,0 @@ const ownerProp = this.ownerProp;

{
"name": "@capaj/objection",
"version": "1.6.10",
"version": "1.6.11",
"description": "An SQL-friendly ORM for Node.js",

@@ -65,3 +65,3 @@ "main": "lib/objection.js",

"ajv": "^6.10.0",
"bluebird": "^3.5.4",
"bluebird": "^3.5.5",
"lodash": "^4.17.11"

@@ -74,8 +74,7 @@ },

"@babel/polyfill": "^7.4.4",
"@types/knex": "^0.16.1",
"@types/node": "^12.0.2",
"@types/node": "^10.14.7",
"babel-eslint": "^10.0.1",
"chai": "^4.2.0",
"chai-subset": "^1.6.0",
"coveralls": "^3.0.2",
"coveralls": "^3.0.4",
"cross-env": "^5.2.0",

@@ -86,12 +85,12 @@ "eslint": "^5.16.0",

"fs-extra": "^7.0.1",
"glob": "^7.1.4",
"knex": "0.16.4-next2",
"glob": "^7.1.3",
"knex": "0.17.0",
"mocha": "^5.2.0",
"mysql": "^2.17.1",
"nyc": "^13.3.0",
"nyc": "^14.1.1",
"pg": "^7.11.0",
"prettier": "1.13.6",
"prettier": "1.17.1",
"sqlite3": "^4.0.8",
"typescript": "^3.3.3",
"vuepress": "0.14.10"
"typescript": "^3.5.1",
"vuepress": "0.14.11"
},

@@ -98,0 +97,0 @@ "nyc": {

@@ -32,5 +32,10 @@ // Type definitions for Objection.js

const snakeCaseMappers: () => ColumnNameMappers;
const knexSnakeCaseMappers: () => KnexMappers;
const snakeCaseMappers: (opt?: SnakeCaseMappersOptions) => ColumnNameMappers;
const knexSnakeCaseMappers: (opt?: SnakeCaseMappersOptions) => KnexMappers;
export interface SnakeCaseMappersOptions {
upperCase?: boolean;
underscoreBeforeDigits?: boolean;
}
interface LiteralObject {

@@ -272,3 +277,5 @@ [key: string]: Value;

? DeepPartialGraphArray<T[number]>
: T extends Model ? DeepPartialGraphModel<T> : T;
: T extends Model
? DeepPartialGraphModel<T>
: T;

@@ -807,3 +814,6 @@ export interface InsertGraphOptions {

): this;
whereInComposite(column: ColumnRef | ColumnRef[], values: Value[] | QueryBuilder<any, any[]>): this;
whereInComposite(
column: ColumnRef | ColumnRef[],
values: Value[] | QueryBuilder<any, any[]>
): this;

@@ -917,3 +927,3 @@ whereJsonSupersetOf: WhereJson<QM, RM, RV>;

alias(alias: string): this;
aliasFor(modelClassOrTableName: string | ModelClass<any>, alias:string): this;
aliasFor(modelClassOrTableName: string | ModelClass<any>, alias: string): this;
tableRefFor(modelClass: ModelClass<any>): string;

@@ -1303,3 +1313,4 @@ tableNameFor(modelClass: ModelClass<any>): string;

interface OrderBy<QM extends Model, RM, RV> {
(column: ColumnRef, direction?: string): QueryBuilder<QM, RM, RV>;
(column: ColumnRef, order?: string): QueryBuilder<QM, RM, RV>;
(columns: ({ column: ColumnRef; order?: string } | string)[]): QueryBuilder<QM, RM, RV>;
}

@@ -1306,0 +1317,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc