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

types-from-sql

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

types-from-sql

latest
npmnpm
Version
1.0.11
Version published
Maintainers
1
Created
Source

Works only with Postgres. It reads pg connection options from enviroment variables

Usage:

PGPASSWORD=1 PGUSER=1 PGDATABASE=1 PGHOST=1.1.1.1 PGPORT=5432 npx types-from-sql 'select * from table'

-f specify glob instead of query, -fn to set interface name to filename:

PGPASSWORD=1 PGUSER=1 PGDATABASE=1 PGHOST=1.1.1.1 PGPORT=5432 npx types-from-sql -f ./test/*.sql

also interface name can be set with directive @InterfaceName in comment on top of sql:

 -- @InterfaceName: INotification
select * from table

redirect output to interface file with > operator:

PGPASSWORD=1 PGUSER=1 PGDATABASE=1 PGHOST=1.1.1.1 PGPORT=5432 npx types-from-sql -fn ./test/*.sql

See also sql builder with typecheck: https://github.com/xialvjun/ts-sql-plugin#readme

Keywords

postgres

FAQs

Package last updated on 08 Jun 2020

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