mythix-orm
Advanced tools
Comparing version 1.11.4 to 1.11.5
@@ -6,2 +6,6 @@ 'use strict'; | ||
class AverageLiteral extends LiteralFieldBase { | ||
static isAggregate() { | ||
return true; | ||
} | ||
toString(connection, options) { | ||
@@ -8,0 +12,0 @@ if (!connection) |
@@ -10,2 +10,6 @@ 'use strict'; | ||
static isAggregate() { | ||
return true; | ||
} | ||
toString(connection, options) { | ||
@@ -12,0 +16,0 @@ if (!connection) |
@@ -46,2 +46,10 @@ 'use strict'; | ||
static isAggregate() { | ||
return false; | ||
} | ||
isAggregate() { | ||
return this.constructor.isAggregate(); | ||
} | ||
constructor(literal, options) { | ||
@@ -91,2 +99,5 @@ Object.defineProperties(this, { | ||
if (!definition.fieldNames) | ||
return definition; | ||
let field = connection.getField(definition.fieldNames[0], definition.modelName); | ||
@@ -114,4 +125,8 @@ if (!field) { | ||
} | ||
valueOf() { | ||
return this.literal; | ||
} | ||
} | ||
module.exports = LiteralBase; |
@@ -23,2 +23,4 @@ 'use strict'; | ||
throw error; | ||
definition = fullyQualifiedName; | ||
} | ||
@@ -51,4 +53,8 @@ } | ||
} | ||
valueOf() { | ||
return this.definition; | ||
} | ||
} | ||
module.exports = LiteralFieldBase; |
@@ -6,2 +6,6 @@ 'use strict'; | ||
class MaxLiteral extends LiteralFieldBase { | ||
static isAggregate() { | ||
return true; | ||
} | ||
toString(connection, options) { | ||
@@ -8,0 +12,0 @@ if (!connection) |
@@ -6,2 +6,6 @@ 'use strict'; | ||
class MinLiteral extends LiteralFieldBase { | ||
static isAggregate() { | ||
return true; | ||
} | ||
toString(connection, options) { | ||
@@ -8,0 +12,0 @@ if (!connection) |
@@ -6,2 +6,6 @@ 'use strict'; | ||
class SumLiteral extends LiteralFieldBase { | ||
static isAggregate() { | ||
return true; | ||
} | ||
toString(connection, options) { | ||
@@ -8,0 +12,0 @@ if (!connection) |
@@ -18,10 +18,4 @@ 'use strict'; | ||
stackAssign(obj, ..._args) { | ||
let newObj = Object.create(obj || {}); | ||
let args = _args.filter(Boolean); | ||
if (args.length > 0) | ||
Object.assign(newObj, ...args); | ||
return newObj; | ||
stackAssign(obj, ...args) { | ||
return this.connection.stackAssign(obj, ...args); | ||
} | ||
@@ -28,0 +22,0 @@ |
@@ -356,2 +356,4 @@ 'use strict'; | ||
distinctValue = new DistinctLiteral(fullyQualifiedName); | ||
} else if (!fullyQualifiedName) { | ||
distinctValue = null; | ||
} else { | ||
@@ -358,0 +360,0 @@ throw new TypeError(`QueryEngine::ModelScope::DISTINCT: Invalid value provided [${(fullyQualifiedName) ? fullyQualifiedName.toString() : fullyQualifiedName}]. All values provided must be strings, fields, or literals.`); |
{ | ||
"name": "mythix-orm", | ||
"version": "1.11.4", | ||
"version": "1.11.5", | ||
"description": "ORM for Mythix framework", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
642238
15549