Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pgtyped/query

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pgtyped/query - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

13

lib/tag.d.ts

@@ -6,8 +6,15 @@ interface IDatabaseConnection {

}
export declare class TaggedQuery<TResult, TParams> {
run: (params: TParams, dbConnection: IDatabaseConnection) => Promise<TResult[]>;
export declare class TaggedQuery<TTypePair extends {
params: any;
result: any;
}> {
run: (params: TTypePair["params"], dbConnection: IDatabaseConnection) => Promise<TTypePair["result"]>;
private query;
constructor(query: string);
}
declare const sql: <TResult, TParams>(stringsArray: TemplateStringsArray) => TaggedQuery<TResult, TParams>;
interface ITypePair {
params: any;
result: any;
}
declare const sql: <TTypePair extends ITypePair>(stringsArray: TemplateStringsArray) => TaggedQuery<TTypePair>;
export default sql;
{
"name": "@pgtyped/query",
"version": "0.3.0",
"version": "0.4.0",
"main": "lib/index.js",

@@ -25,7 +25,7 @@ "types": "lib/index.d.ts",

"dependencies": {
"@pgtyped/wire": "^0.3.0",
"@pgtyped/wire": "^0.4.0",
"@types/debug": "^4.1.4",
"debug": "^4.1.1"
},
"gitHead": "e898a73247c2a8f871623177bcd9b63f7071f6ae"
"gitHead": "6227605fa3e98c6c53fe959cfe10911512537a55"
}

@@ -10,7 +10,7 @@ import processQuery, {

export class TaggedQuery<TResult, TParams> {
export class TaggedQuery<TTypePair extends {params: any, result: any}> {
public run: (
params: TParams,
params: TTypePair["params"],
dbConnection: IDatabaseConnection,
) => Promise<TResult[]>;
) => Promise<TTypePair["result"]>;

@@ -32,6 +32,11 @@ private query: string;

const sql = <TResult, TParams>(stringsArray: TemplateStringsArray) => (
new TaggedQuery<TResult, TParams>(stringsArray[0])
interface ITypePair {
params: any;
result: any;
}
const sql = <TTypePair extends ITypePair>(stringsArray: TemplateStringsArray) => (
new TaggedQuery<TTypePair>(stringsArray[0])
);
export default sql;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc