New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ct-mysql

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ct-mysql

CodingTeam's util of MySQL on Node platform

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

MySQL-Node-Driver

CodingTeam's util of MySQL on Node platform

How to use

Query

function query(sql, options) {
  return new Promise(function(resolve, reject) {
    // ..
  });
}
  • sql
    • 字符串,SQL 语句字符串
  • options
    • 数组,参数数组

Queue

function queue(queueOrders) {
  // ..
}
  • queueOrders
    • 数组,数组元素为对象和函数
    • 若为对象,则其属性:
      • order:字符串,SQL 语句字符串
      • argument:数组,语句参数数组
      • output: 字符串,作为 key ,可将语句执行结果添加到之后运行函数的 output  内
      • skip: 字符串,用于标记是否跳过特定语句
    • 若为函数,则其参数与返回值:
      • 参数说明:
        • output: 存放 queueOrders 的相应 output
      • 返回值格式:
        • rollback:布尔,默认为 false ,可决定是否回滚事务
        • argument:数组,若存在,则覆盖 queueOrdersargument
        • skip:对象,能使同键且值为 turequeueOrders 被跳过
        • input: 对象,其中的数据将被添加到之后运行函数的 output
        • order: 字符串,这里的对象将会被当作 SQL 语句对象插入到事务的队列中

Keywords

MySQL

FAQs

Package last updated on 17 Aug 2018

Did you know?

Socket

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