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

@mrnafisia/type-query

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mrnafisia/type-query - npm Package Compare versions

Comparing version 1.0.30 to 1.0.31

2

dist/schema.d.ts

@@ -21,3 +21,3 @@ import type { ClientBase } from 'pg';

declare const dropTableSQL: (table: Table) => string;
declare const getSequenceName: (tableTitle: string, columnKey: string, column: {
declare const getSequenceName: (tableSchema: string, tableTitle: string, columnKey: string, column: {
title?: string;

@@ -24,0 +24,0 @@ seqTitle?: string;

@@ -317,3 +317,3 @@ "use strict";

// build query
var tokens = ["CREATE SEQUENCE ".concat(getSequenceName(table.title, key, column))];
var tokens = ["CREATE SEQUENCE ".concat(getSequenceName(table.schema, table.title, key, column))];
if (column.type === 'smallint') {

@@ -341,3 +341,3 @@ tokens.push('as smallint');

// add query to the result
queries.push("DROP SEQUENCE ".concat(getSequenceName(table.title, key, column), " ;"));
queries.push("DROP SEQUENCE ".concat(getSequenceName(table.schema, table.title, key, column), " ;"));
}

@@ -357,3 +357,3 @@ return queries;

if (column.default === 'auto-increment') {
tokens.push("DEFAULT nextVal( '".concat(getSequenceName(table.title, key, column), "'::regClass )"));
tokens.push("DEFAULT nextVal( '".concat(getSequenceName(table.schema, table.title, key, column), "'::regClass )"));
}

@@ -397,4 +397,4 @@ else if (column.default === true) {

exports.dropTableSQL = dropTableSQL;
var getSequenceName = function (tableTitle, columnKey, column) { var _a, _b; return (_a = column.seqTitle) !== null && _a !== void 0 ? _a : (tableTitle + '_' + ((_b = column.title) !== null && _b !== void 0 ? _b : columnKey) + '_seq'); };
var getSequenceName = function (tableSchema, tableTitle, columnKey, column) { var _a, _b; return "\"".concat(tableSchema, "\".\"") + ((_a = column.seqTitle) !== null && _a !== void 0 ? _a : (tableTitle + '_' + ((_b = column.title) !== null && _b !== void 0 ? _b : columnKey) + '_seq')) + '"'; };
exports.getSequenceName = getSequenceName;
//# sourceMappingURL=schema.js.map
{
"name": "@mrnafisia/type-query",
"version": "1.0.30",
"version": "1.0.31",
"description": "mini-orm with full type support for postgres.",

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

Sorry, the diff of this file is not supported yet

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