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

@minatojs/driver-sqlite

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@minatojs/driver-sqlite - npm Package Compare versions

Comparing version 3.2.5 to 3.3.0

21

lib/index.js

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

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

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

__privateAdd(this, _create);
this.sql = new SQLiteBuilder(database.tables);
this.sql = new SQLiteBuilder();
}

@@ -243,3 +243,3 @@ async prepare(table) {

async get(sel) {
const { tables } = sel;
const { model, tables } = sel;
const builder = new SQLiteBuilder(tables);

@@ -250,14 +250,9 @@ const sql = builder.get(sel);

const rows = __privateMethod(this, _all, all_fn).call(this, sql);
return rows.map((row) => this.sql.load(sel.model, row));
return rows.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 { value } = __privateMethod(this, _get, get_fn).call(this, sql);
const builder = new SQLiteBuilder(sel.tables);
const output = builder.parseEval(expr);
const inner = builder.get(sel.table, true);
const { value } = __privateMethod(this, _get, get_fn).call(this, `SELECT ${output} AS value FROM ${inner} ${sel.ref}`);
return value;

@@ -264,0 +259,0 @@ }

{
"name": "@minatojs/driver-sqlite",
"version": "3.2.5",
"version": "3.3.0",
"description": "SQLite Driver for Minato",

@@ -28,9 +28,9 @@ "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"
},
"dependencies": {
"@minatojs/sql-utils": "^3.0.1",
"@minatojs/sql-utils": "^4.0.0",
"@minatojs/sql.js": "^2.0.0",

@@ -37,0 +37,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