Socket
Socket
Sign inDemoInstall

mysql-emulator

Package Overview
Dependencies
1
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mysql-emulator

MySQL emulator


Version published
Weekly downloads
37
increased by270%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

GitHub license npm version GitHub Workflow Status (with branch) npm downloads

MySQL Emulator

The package emulates a MySQL database from within Node.js, specifically designed for e2e testing.

Try it out at the playground.

⚠ The library is still under active development. It means that some features are not working and may be considered as invalid syntax or ignored.

⚠ Known limitations:

  • No right join
  • Default order might differ (always use ORDER BY when the order matters)
  • Column names might differ, f.e. count(u.id) => COUNT(`u`.`id`) (aliases fix it)
  • No timezone support

📃 TODO

  • ALTER statement (in most cases ALTER even is not needed, synchronize will do all the work)
  • Foreign key constraints
  • Fill INFORMATION_SCHEMA tables
  • DELETE ORDER BY field LIMIT number
  • UPDATE ORDER BY field LIMIT number
  • SELECT GROUP BY position/alias
  • SELECT ORDER BY position/alias
  • Implement the most used functions

Usage

Just start from:

npm install mysql-emulator

Then it's ready to go:

import { query } from 'mysql-emulator';

await query(...);

Examples

Keywords

FAQs

Last updated on 15 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc