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

@kohanajs/mixin-orm

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kohanajs/mixin-orm - npm Package Compare versions

Comparing version 3.2.3 to 3.3.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [3.3.0](https://gitlab.com/kohana-js/controller-mixins/orm/compare/v3.2.3...v3.3.0) (2023-06-01)
### Features
* ControllerMixinORMRead with additional critieria ([3bd5348](https://gitlab.com/kohana-js/controller-mixins/orm/commit/3bd53487d7360902b53df74bd0b9a66adbd12dba))
### [3.2.3](https://gitlab.com/kohana-js/controller-mixins/orm/compare/v3.2.2...v3.2.3) (2023-03-14)

@@ -7,0 +14,0 @@

20

classes/controller-mixin/ORMRead.js

@@ -17,2 +17,4 @@ const { ControllerMixin } = require('@kohanajs/core-mvc');

static LIST_FILTER = 'listFilter';
static #formatDate(date) {

@@ -41,2 +43,3 @@ let d = date,

state.set(this.MODEL, state.get(this.MODEL));
state.set(this.LIST_FILTER, state.get(this.LIST_FILTER) ?? []);
}

@@ -58,11 +61,12 @@

const result = await ORM.readWith(model, [
['', 'created_at', 'GREATER_THAN_EQUAL', `${start} 00:00:00+08:00`],
['AND', 'created_at', 'LESS_THAN_EQUAL', `${end} 00:00:00+08:00`],
]
,{ database, ...options, offset }
);
const criteria = [
['', 'created_at', 'GREATER_THAN_EQUAL', `${start} 00:00:00+08:00`],
['AND', 'created_at', 'LESS_THAN_EQUAL', `${end} 00:00:00+08:00`],
...state.get(this.LIST_FILTER)
];
state.set(this.COUNT, await ORM.count(model, { database }));
state.set(this.INSTANCES, (!result) ? [] : [result].flat());
const result = await ORM.readWith(model, criteria,{ database, ...options, offset, asArray:true });
state.set(this.COUNT, await ORM.countWith(model, criteria,{ database }));
state.set(this.INSTANCES, result);
}

@@ -69,0 +73,0 @@

2

package.json
{
"name": "@kohanajs/mixin-orm",
"version": "3.2.3",
"version": "3.3.0",
"description": "",

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

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