Socket
Book a DemoInstallSign in
Socket

calustra-query

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

calustra-query

Small yet powerful set of utils over SQL queries

unpublished
Source
npmnpm
Version
0.2.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

NPM Version Dependency Status NPM Downloads

Table of Contents

  • Intro
  • Install
  • API

Intro

calustra-query is a small yet powerful set of utils over SQL queries.

Install

npm install calustra-query [--save-dev]

API

getTableNamesFromQuery (query)

Returns an array of the table names involved in query.

removeComments (query)

Cleans comments from query.

cleanAndInline (query)

Cleans comments from query, also compacting it in a single line if multiline.

queryMainAction (query)

Checks what the main action of the query is, even for the complicated ones. Possible return values are: create, alter, drop, insert, update, delete, select.

queryDescription (query, rows, time)

Returns a human readable description of the query.

Examples:

  • Created table cars (time: <time>)
  • Inserted <rows> rows into cars (time: <time>)

formatQuery (qry, params)

Clean and colorize a query with logging in mind.

Keywords

js

FAQs

Package last updated on 23 Nov 2022

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