Socket
Socket
Sign inDemoInstall

@ts-safeql/generate

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

@ts-safeql/generate - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

13

lib/src/generate.js

@@ -138,4 +138,7 @@ "use strict";

if ("introspected" in params.col) {
const value = (_b = (_a = params.pgEnums
.get(params.col.described.type)) === null || _a === void 0 ? void 0 : _a.values.map((x) => `'${x}'`).join(" | ")) !== null && _b !== void 0 ? _b : params.typesMap[params.col.introspected.colType];
const valueAsEnum = (_a = params.pgEnums
.get(params.col.described.type)) === null || _a === void 0 ? void 0 : _a.values.map((x) => `'${x}'`).join(" | ");
const valueAsBase = (0, shared_1.fmap)(params.col.introspected.colBaseType, (x) => params.typesMap[x]);
const valueAsType = params.typesMap[params.col.introspected.colType];
const value = (_b = valueAsEnum !== null && valueAsEnum !== void 0 ? valueAsEnum : valueAsType) !== null && _b !== void 0 ? _b : valueAsBase;
const key = (_c = params.col.described.name) !== null && _c !== void 0 ? _c : params.col.introspected.colName;

@@ -226,2 +229,8 @@ const isNullable = !params.col.introspected.colNotNull ||

pg_type.typname as "colType",
CASE
WHEN pg_type.typtype = 'd' THEN
(SELECT typname FROM pg_type pt WHERE pt.oid = pg_type.typbasetype)
ELSE
NULL
END as "colBaseType",
pg_attribute.attnum as "colNum",

@@ -228,0 +237,0 @@ pg_attribute.atthasdef "colHasDef",

2

package.json
{
"name": "@ts-safeql/generate",
"version": "0.0.12",
"version": "0.0.13",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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