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
latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

Calustra logo

NPM Version NPM Downloads

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 hard 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 28 Mar 2023

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.