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

@uql/mongo

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uql/mongo - npm Package Compare versions

Comparing version 0.4.63 to 0.4.64

33

package.json
{
"name": "@uql/mongo",
"homepage": "https://uql.io",
"description": "Querier for TypeScript, ES2015+. Supports MySQL, PostgreSQL, MariaDB, MongoDB databases.",
"description": "flexible and efficient ORM, with declarative JSON syntax and smart type-safety",
"license": "MIT",
"version": "0.4.63",
"version": "0.4.64",
"main": "index.js",

@@ -24,3 +24,3 @@ "types": "index.d.ts",

"@types/node": "^16.4.7",
"@uql/core": "^0.4.63",
"@uql/core": "^0.4.64",
"copyfiles": "^2.4.1",

@@ -39,19 +39,22 @@ "rimraf": "^3.0.2",

"keywords": [
"uql",
"orm",
"data-mapper",
"persistence",
"orm",
"object relational mapper",
"mongo",
"typescript-orm",
"javascript-orm",
"mariadb",
"mariadb-orm",
"mysql",
"mysql-orm",
"postgresql",
"postgresql-orm",
"sqlite",
"sqlite-orm",
"mongodb",
"ts",
"typescript",
"js",
"javascript",
"mongodb-orm",
"entity",
"dao",
"data access object",
"decorator",
"transaction",
"repository",
"service",
"transaction"
"service"
],

@@ -58,0 +61,0 @@ "publishConfig": {

@@ -17,3 +17,3 @@ # [uql](https://uql.io) · [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/impensables/uql/blob/master/LICENSE) [![tests](https://github.com/impensables/uql/actions/workflows/tests.yml/badge.svg)](https://github.com/impensables/uql) [![coverage status](https://coveralls.io/repos/impensables/uql/badge.svg?branch=master)](https://coveralls.io/r/impensables/uql?branch=master) [![npm version](https://badge.fury.io/js/%40uql%2Fcore.svg)](https://badge.fury.io/js/%40uql%2Fcore)

- uses the power of `TypeScript` to get (smart) type-safety everywhere.
- the generated queries are efficient, safe, and human-readable.
- the generated queries are performant, safe, and human-readable.
- `$project`, `$filter`, `$sort`, `$limit` works at multiple levels (including deep relations and their fields).

@@ -215,3 +215,3 @@ - declarative and imperative `transactions`.

@Transactional()
async confirmAction(confirmation: Confirmation, @InjectQuerier() querier?: Querier): Promise<void> {
async confirm(confirmation: Confirmation, @InjectQuerier() querier?: Querier): Promise<void> {
if (confirmation.type === 'register') {

@@ -224,3 +224,5 @@ await querier.insertOne(User, {

} else {
await querier.updateOneById(User, confirmation.creatorId, { password: confirmation.password });
await querier.updateOneById(User, confirmation.creatorId, {
password: confirmation.password,
});
}

@@ -254,3 +256,3 @@ await querier.updateOneById(Confirmation, confirmation.id, { status: 1 });

async function confirmAction(confirmation: Confirmation): Promise<void> {
async function confirm(confirmation: Confirmation): Promise<void> {
const querier = await getQuerier();

@@ -265,3 +267,5 @@ await querier.transaction(async () => {

} else {
await querier.updateOneById(User, confirmation.creatorId, { password: confirmation.password });
await querier.updateOneById(User, confirmation.creatorId, {
password: confirmation.password,
});
}

@@ -275,6 +279,6 @@ await querier.updateOneById(Confirmation, confirmation.id, { status: 1 });

The above code could also be implemented as below (even more granular control):
That &#9650; can also be implemented as this &#9660; (for more granular control):
```ts
async function confirmAction(confirmation: Confirmation): Promise<void> {
async function confirm(confirmation: Confirmation): Promise<void> {
const querier = await getQuerier();

@@ -290,3 +294,5 @@ try {

} else {
await querier.updateOneById(User, confirmation.creatorId, { password: confirmation.password });
await querier.updateOneById(User, confirmation.creatorId, {
password: confirmation.password,
});
}

@@ -340,3 +346,4 @@ await querier.updateOneById(Confirmation, confirmation.id, { status: 1 });

// `query` callback allows to extend all then queries that are requested to the API,
// so it is a good place to add additional filters to the queries (like for multi tenant apps).
// so it is a good place to add additional filters to the queries,
// e.g. for multi tenant apps.
query<E>(entity: Type<E>, qm: Query<E>, req: Request): Query<E> {

@@ -343,0 +350,0 @@ qm.$filter = {

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