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

@dataui/crud-typeorm

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dataui/crud-typeorm - npm Package Compare versions

Comparing version 5.3.1 to 5.3.2

44

lib/typeorm-crud.service.js

@@ -536,35 +536,27 @@ "use strict";

const operators = crud_util_1.objKeys(object);
if (operators.length === 1) {
if (operators.length === 1 && operators[0] !== '$or') {
const operator = operators[0];
const value = object[operator];
if (crud_util_1.isObject(object.$or)) {
const orKeys = crud_util_1.objKeys(object.$or);
this.setSearchFieldObjectCondition(builder, orKeys.length === 1 ? condition : '$or', field, object.$or, customOperators);
}
else {
this.builderSetWhere(builder, condition, field, value, customOperators, operator);
}
this.builderSetWhere(builder, condition, field, value, customOperators, operator);
}
else {
if (operators.length > 1) {
this.builderAddBrackets(builder, condition, new typeorm_1.Brackets((qb) => {
operators.forEach((operator) => {
const value = object[operator];
if (operator !== '$or') {
this.builderSetWhere(qb, condition, field, value, customOperators, operator);
this.builderAddBrackets(builder, condition, new typeorm_1.Brackets((qb) => {
operators.forEach((operator) => {
const value = object[operator];
if (operator !== '$or') {
this.builderSetWhere(qb, condition, field, value, customOperators, operator);
}
else {
const orKeys = crud_util_1.objKeys(object.$or);
if (orKeys.length === 1) {
this.setSearchFieldObjectCondition(qb, condition, field, object.$or, customOperators);
}
else {
const orKeys = crud_util_1.objKeys(object.$or);
if (orKeys.length === 1) {
this.setSearchFieldObjectCondition(qb, condition, field, object.$or, customOperators);
}
else {
this.builderAddBrackets(qb, condition, new typeorm_1.Brackets((qb2) => {
this.setSearchFieldObjectCondition(qb2, '$or', field, object.$or, customOperators);
}));
}
this.builderAddBrackets(qb, condition, new typeorm_1.Brackets((qb2) => {
this.setSearchFieldObjectCondition(qb2, '$or', field, object.$or, customOperators);
}));
}
});
}));
}
}
});
}));
}

@@ -571,0 +563,0 @@ }

{
"name": "@dataui/crud-typeorm",
"description": "NestJs CRUD for RESTful APIs - TypeORM",
"version": "5.3.1",
"version": "5.3.2",
"license": "MIT",

@@ -45,3 +45,3 @@ "main": "lib/index.js",

},
"gitHead": "bb89c0ca59a5bca1b57cd8f2f7370a6d281eeb70"
"gitHead": "5008444f42125ad20dce66a343dfa470c8614638"
}

@@ -11,10 +11,10 @@ <div align="center">

<div align="center">
<a href="https://travis-ci.org/dataui/crud">
<img src="https://github.com/dataui/crud/workflows/Tests/badge.svg" alt="Build" />
<a href="https://travis-ci.org/gid-oss/dataui-nestjs-crud">
<img src="https://github.com/gid-oss/dataui-nestjs-crud/workflows/Tests/badge.svg" alt="Build" />
</a>
<a href="https://coveralls.io/github/dataui/crud?branch=master">
<img src="https://coveralls.io/repos/github/dataui/crud/badge.svg" alt="Coverage" />
<a href="https://coveralls.io/github/gid-oss/dataui-nestjs-crud?branch=master">
<img src="https://coveralls.io/repos/github/gid-oss/dataui-nestjs-crud/badge.svg" alt="Coverage" />
</a>
<a href="https://github.com/dataui/crud/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/dataui/crud.svg" alt="License" />
<a href="https://github.com/gid-oss/dataui-nestjs-crud/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/gid-oss/dataui-nestjs-crud.svg" alt="License" />
</a>

@@ -27,5 +27,2 @@ <a href="https://www.npmjs.com/package/@dataui/crud">

</a>
<a href="https://npm.packagequality.com/#?package=@nestjsx%2Fcrud">
<img src="https://npm.packagequality.com/shield/%40nestjsx%2Fcrud.svg" alt="Package Quality" />
</a>
<a href="https://renovatebot.com/">

@@ -38,16 +35,10 @@ <img src="https://img.shields.io/badge/renovate-enabled-brightgreen.svg" alt="Renovate" />

<a href="https://github.com/marmelab/awesome-rest#nodejs">
<img src="https://raw.githubusercontent.com/dataui/crud/master/img/awesome-rest.svg?sanitize=true" alt="Awesome REST" />
<img src="https://raw.githubusercontent.com/gid-oss/dataui-nestjs-crud/master/img/awesome-rest.svg?sanitize=true" alt="Awesome REST" />
</a>
<a href="https://github.com/juliandavidmr/awesome-nestjs#components--libraries">
<img src="https://raw.githubusercontent.com/dataui/crud/master/img/awesome-nest.svg?sanitize=true" alt="Awesome Nest" />
<img src="https://raw.githubusercontent.com/gid-oss/dataui-nestjs-crud/master/img/awesome-nest.svg?sanitize=true" alt="Awesome Nest" />
</a>
<a href="https://github.com/nestjs/nest">
<img src="https://raw.githubusercontent.com/dataui/crud/master/img/nest-powered.svg?sanitize=true" alt="Nest Powered" />
<img src="https://raw.githubusercontent.com/gid-oss/dataui-nestjs-crud/master/img/nest-powered.svg?sanitize=true" alt="Nest Powered" />
</a>
<a href="#individuals" alt="Sponsors on Open Collective">
<img src="https://opencollective.com/nestjsx/backers/badge.svg" />
</a>
<a href="#organizations" alt="Sponsors on Open Collective">
<img src="https://opencollective.com/nestjsx/sponsors/badge.svg" />
</a>
</div>

@@ -58,3 +49,3 @@

<a href="https://twitter.com/MichaelYali">@MichaelYali</a> and
<a href="https://github.com/dataui/crud/graphs/contributors">
<a href="https://github.com/gid-oss/dataui-nestjs-crud/graphs/contributors">
Contributors

@@ -70,3 +61,3 @@ </a>

<img align="right" src="https://raw.githubusercontent.com/dataui/crud/master/img/crud-usage2.png" alt="CRUD usage" />
<img align="right" src="https://raw.githubusercontent.com/gid-oss/dataui-nestjs-crud/master/img/crud-usage2.png" alt="CRUD usage" />

@@ -99,12 +90,12 @@ - Super easy to install and start using the full-featured controllers and services :point_right:

- [**@dataui/crud**](https://www.npmjs.com/package/@dataui/crud) - core package which provides `@Crud()` decorator for endpoints generation, global configuration, validation, helper decorators ([docs](https://github.com/dataui/crud/wiki/Controllers#description))
- [**@dataui/crud-request**](https://www.npmjs.com/package/@dataui/crud-request) - request builder/parser package which provides `RequestQueryBuilder` class for a frontend usage and `RequestQueryParser` that is being used internally for handling and validating query/path params on a backend side ([docs](https://github.com/dataui/crud/wiki/Requests#frontend-usage))
- [**@dataui/crud-typeorm**](https://www.npmjs.com/package/@dataui/crud-typeorm) - TypeORM package which provides base `TypeOrmCrudService` with methods for CRUD database operations ([docs](https://github.com/dataui/crud/wiki/ServiceTypeorm))
- [**@dataui/crud**](https://www.npmjs.com/package/@dataui/crud) - core package which provides `@Crud()` decorator for endpoints generation, global configuration, validation, helper decorators ([docs](https://gid-oss.github.io/dataui-nestjs-crud/controllers/#description))
- [**@dataui/crud-request**](https://www.npmjs.com/package/@dataui/crud-request) - request builder/parser package which provides `RequestQueryBuilder` class for a frontend usage and `RequestQueryParser` that is being used internally for handling and validating query/path params on a backend side ([docs](https://gid-oss.github.io/dataui-nestjs-crud/requests/#frontend-usage))
- [**@dataui/crud-typeorm**](https://www.npmjs.com/package/@dataui/crud-typeorm) - TypeORM package which provides base `TypeOrmCrudService` with methods for CRUD database operations ([docs](https://gid-oss.github.io/dataui-nestjs-crud/service-typeorm/))
## Documentation
- [General Information](https://github.com/dataui/crud/wiki#why)
- [CRUD Controllers](https://github.com/dataui/crud/wiki/Controllers#description)
- [CRUD ORM Services](https://github.com/dataui/crud/wiki/Services#description)
- [Handling Requests](https://github.com/dataui/crud/wiki/Requests#description)
- [General Information](https://gid-oss.github.io/dataui-nestjs-crud/)
- [CRUD Controllers](https://gid-oss.github.io/dataui-nestjs-crud/controllers/#description)
- [CRUD ORM Services](https://gid-oss.github.io/dataui-nestjs-crud/services/)
- [Handling Requests](https://gid-oss.github.io/dataui-nestjs-crud/requests/#description)

@@ -120,29 +111,12 @@ ## Support

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/dataui/crud/graphs/contributors"><img src="https://opencollective.com/nestjsx/contributors.svg?width=890&button=false" /></a>
<a href="https://github.com/gid-oss/dataui-nestjs-crud/graphs/contributors"><img src="https://opencollective.com/nestjsx/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/nestjsx#backer)]
#### Individuals
<a href="https://opencollective.com/nestjsx#backers" target="_blank"><img src="https://opencollective.com/nestjsx/backers.svg?width=890&button=false"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/nestjsx#sponsor)]
Currently this project is NOT sponsored by anybody. Get in touch if you want to become a sponsor.
<a href="https://opencollective.com/nestjsx/sponsor/0/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/1/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/2/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/3/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/4/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/5/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/6/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/7/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/8/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/nestjsx/sponsor/9/website" target="_blank"><img src="https://opencollective.com/nestjsx/sponsor/9/avatar.svg"></a>
## License
[MIT](LICENSE)

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