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

@minatojs/driver-mysql

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@minatojs/driver-mysql - npm Package Compare versions

Comparing version 2.2.2 to 2.3.0

2

lib/index.d.ts

@@ -23,3 +23,3 @@ import type { Pool, PoolConfig } from 'mysql';

};
constructor(tables: Dict<Model>);
constructor(tables?: Dict<Model>);
escape(value: any, field?: Field<any>): string;

@@ -26,0 +26,0 @@ }

@@ -27,3 +27,3 @@ "use strict";

// minato/packages/mysql/src/index.ts
// packages/mysql/src/index.ts
var src_exports = {};

@@ -187,3 +187,3 @@ __export(src_exports, {

};
this.sql = new MySQLBuilder(database.tables);
this.sql = new MySQLBuilder();
}

@@ -354,15 +354,10 @@ async start() {

return this.queue(sql).then((data) => {
return data.map((row) => this.sql.load(model, row));
return data.map((row) => builder.load(model, row));
});
}
async eval(sel, expr) {
const output = this.sql.parseEval(expr);
let sql = this.sql.get(sel.table);
const prefix = `SELECT ${output} AS value `;
if (sql.startsWith("SELECT * ")) {
sql = prefix + sql.slice(9);
} else {
sql = `${prefix}FROM (${sql}) ${sql.ref}`;
}
const [data] = await this.queue(sql);
const builder = new MySQLBuilder(sel.tables);
const output = builder.parseEval(expr);
const inner = builder.get(sel.table, true);
const [data] = await this.queue(`SELECT ${output} AS value FROM ${inner} ${sel.ref}`);
return data.value;

@@ -369,0 +364,0 @@ }

{
"name": "@minatojs/driver-mysql",
"version": "2.2.2",
"version": "2.3.0",
"description": "MySQL Driver for Minato",

@@ -28,10 +28,10 @@ "main": "lib/index.js",

"peerDependencies": {
"@minatojs/core": "^2.1.2"
"@minatojs/core": "^2.2.0"
},
"devDependencies": {
"@minatojs/tests": "^1.3.1",
"@minatojs/tests": "^1.4.0",
"@types/mysql": "^2.15.21"
},
"dependencies": {
"@minatojs/sql-utils": "^3.0.1",
"@minatojs/sql-utils": "^4.0.0",
"@vlasky/mysql": "^2.18.5",

@@ -38,0 +38,0 @@ "cosmokit": "^1.4.0",

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