From 61711d99d98f56bea4c9ae053faa995eae30cb47 Mon Sep 17 00:00:00 2001 From: DictyosteliumDiscoideum <159590297+DictyosteliumDiscoideum@users.noreply.github.com> Date: Sun, 15 Dec 2024 23:29:22 -0700 Subject: [PATCH 1/3] Update types.js --- src/types.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/types.js b/src/types.js index 7c7c2b93..174b7877 100644 --- a/src/types.js +++ b/src/types.js @@ -136,7 +136,9 @@ function values(first, rest, parameters, types, options) { function select(first, rest, parameters, types, options) { typeof first === 'string' && (first = [first].concat(rest)) if (Array.isArray(first)) - return escapeIdentifiers(first, options) + return first.map(x => + Array.isArray(x) [escapeIdentifier(x[0], options),escapeIdentifier(x[1], options)].join(" AS ") : escapeIdentifier(x, options) + ) let value const columns = rest.length ? rest.flat() : Object.keys(first) From 1ec08cec51acf75c42335e05b1c47d2337490b6e Mon Sep 17 00:00:00 2001 From: DictyosteliumDiscoideum <159590297+DictyosteliumDiscoideum@users.noreply.github.com> Date: Sun, 15 Dec 2024 23:51:25 -0700 Subject: [PATCH 2/3] Update types.js --- src/types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types.js b/src/types.js index 174b7877..e56f35e1 100644 --- a/src/types.js +++ b/src/types.js @@ -137,7 +137,7 @@ function select(first, rest, parameters, types, options) { typeof first === 'string' && (first = [first].concat(rest)) if (Array.isArray(first)) return first.map(x => - Array.isArray(x) [escapeIdentifier(x[0], options),escapeIdentifier(x[1], options)].join(" AS ") : escapeIdentifier(x, options) + Array.isArray(x) [escapeIdentifiers([x[0]], options),escapeIdentifier(x[1], options)].join(" AS ") : escapeIdentifiers([x], options) ) let value From 66225d24c3fcc912c8a23a5f91fc796a3d642097 Mon Sep 17 00:00:00 2001 From: DictyosteliumDiscoideum <159590297+DictyosteliumDiscoideum@users.noreply.github.com> Date: Mon, 16 Dec 2024 18:20:54 -0700 Subject: [PATCH 3/3] Update types.js Fix typo --- src/types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types.js b/src/types.js index e56f35e1..22586e1b 100644 --- a/src/types.js +++ b/src/types.js @@ -137,7 +137,7 @@ function select(first, rest, parameters, types, options) { typeof first === 'string' && (first = [first].concat(rest)) if (Array.isArray(first)) return first.map(x => - Array.isArray(x) [escapeIdentifiers([x[0]], options),escapeIdentifier(x[1], options)].join(" AS ") : escapeIdentifiers([x], options) + Array.isArray(x) ? [escapeIdentifiers([x[0]], options),escapeIdentifier(x[1], options)].join(" AS ") : escapeIdentifiers([x], options) ) let value