selectstar
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -10,3 +10,3 @@ /// <reference types="node" /> | ||
} | ||
declare type Identifier = Box<{ | ||
export declare type Identifier = Box<{ | ||
type: "identifier"; | ||
@@ -92,3 +92,3 @@ value: string; | ||
export declare const items: typeof list; | ||
declare type Unsafe = Box<{ | ||
export declare type Unsafe = Box<{ | ||
type: "unsafe"; | ||
@@ -123,3 +123,3 @@ value: unknown; | ||
export declare function unsafe(value: unknown): Unsafe; | ||
declare type Subsql = Box<{ | ||
export declare type Subsql = Box<{ | ||
type: "subsql"; | ||
@@ -141,3 +141,3 @@ value: { | ||
export declare type Template = (fn: typeof subsql) => Subsql; | ||
export declare type SqlLiteralParams = Identifier | List | Unsafe | Template | Literal; | ||
export declare type SqlLiteralParams = Identifier | List | Unsafe | Template | Literal | SqlLiteralParams[]; | ||
/** | ||
@@ -144,0 +144,0 @@ * Using a template literal, generate a query with arguments that can be passed |
@@ -213,2 +213,6 @@ "use strict"; | ||
} | ||
else if (Array.isArray(param)) { | ||
// If the param is an array, it is a shorthand for `list(param, ', ')` | ||
processParam(list(param)); | ||
} | ||
else { | ||
@@ -215,0 +219,0 @@ throw new RangeError(`Value ${param} is not a valid pg literal`); |
{ | ||
"name": "selectstar", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Generate safe SQL statements with tagged literals", | ||
@@ -10,2 +10,3 @@ "main": "dist/index.js", | ||
"test": "mocha -r ts-node/register src/**/*.test.ts", | ||
"prepublishOnly": "rm -rf dist && npm run build", | ||
"deploy": "./deploy.sh" | ||
@@ -12,0 +13,0 @@ }, |
Sorry, the diff of this file is not supported yet
32857
467