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

@databases/mysql

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@databases/mysql - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

21

lib/__tests__/index.test.js
"use strict";
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function (resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function (resolve, reject) {

@@ -20,5 +25,3 @@ function fulfilled(value) {

function step(result) {
result.done ? resolve(result.value) : new P(function (resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -32,6 +35,6 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

const db = __1.default();
afterAll(() => __awaiter(undefined, void 0, void 0, function* () {
afterAll(() => __awaiter(void 0, void 0, void 0, function* () {
yield db.dispose();
}));
test('error messages', () => __awaiter(undefined, void 0, void 0, function* () {
test('error messages', () => __awaiter(void 0, void 0, void 0, function* () {
try {

@@ -52,3 +55,3 @@ const s = __1.sql;

> 3 | SELECT * FRM 'baz;
| ^^^^^^^^
| ^^^^^^^^^
> 4 | SELECT * FROM bing;

@@ -62,11 +65,11 @@ | ^^^^^^^^^^^^^^^^^^^^^^^^^

}));
test('query', () => __awaiter(undefined, void 0, void 0, function* () {
test('query', () => __awaiter(void 0, void 0, void 0, function* () {
const [{ foo }] = yield db.query(__1.sql`SELECT 1 + 1 as foo`);
expect(foo).toBe(2);
}));
test('query with params', () => __awaiter(undefined, void 0, void 0, function* () {
test('query with params', () => __awaiter(void 0, void 0, void 0, function* () {
const [{ foo }] = yield db.query(__1.sql`SELECT 1 + ${41} as ${__1.sql.ident('foo')}`);
expect(foo).toBe(42);
}));
test('bigint', () => __awaiter(undefined, void 0, void 0, function* () {
test('bigint', () => __awaiter(void 0, void 0, void 0, function* () {
yield db.query(__1.sql`CREATE TABLE bigint_test_bigints (id BIGINT NOT NULL PRIMARY KEY);`);

@@ -73,0 +76,0 @@ yield db.query(__1.sql`

"use strict";
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function (resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function (resolve, reject) {

@@ -20,5 +25,3 @@ function fulfilled(value) {

function step(result) {
result.done ? resolve(result.value) : new P(function (resolve) {
resolve(result.value);
}).then(fulfilled, rejected);
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}

@@ -85,3 +88,3 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

try {
const result = fn(new Connection(connection));
const result = yield fn(new Connection(connection));
return result;

@@ -88,0 +91,0 @@ } finally {

{
"name": "@databases/mysql",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

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

@@ -27,3 +27,3 @@ import connect, {sql} from '../';

> 3 | SELECT * FRM 'baz;
| ^^^^^^^^
| ^^^^^^^^^
> 4 | SELECT * FROM bing;

@@ -30,0 +30,0 @@ | ^^^^^^^^^^^^^^^^^^^^^^^^^

@@ -74,3 +74,3 @@ import {URL} from 'url';

try {
const result = fn(new Connection(connection));
const result = await fn(new Connection(connection));
return result;

@@ -77,0 +77,0 @@ } finally {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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