From e2fb27aa4f2798d8e5211e195698f732f40197d7 Mon Sep 17 00:00:00 2001 From: Asad Date: Wed, 20 Nov 2024 19:43:13 -0500 Subject: [PATCH] feat(pg): add Ubuntu/Debian PostgreSQL installation guide & enhanced SheetJSPG.js type deduc - Include Ubuntu/Debian installation instructions - Improve PostgreSQL table creation with better type detection - Enhance date format detection and parsing Breaking Changes: - Replace `aoo_to_pg_table` to `sheet_to_pg_table` & now it takes worksheet object instead of array of arrays - Changed type detection algorithm may produce column types --- .gitignore | 2 +- SheetJSPG.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 7157897..3c16c33 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ node_modules/ .log :.prettierrc SheetJSPGExport.xlsx -pres.numbers \ No newline at end of file +pres.numbers diff --git a/SheetJSPG.js b/SheetJSPG.js index 81ace3f..b1b9d9b 100644 --- a/SheetJSPG.js +++ b/SheetJSPG.js @@ -1,12 +1,12 @@ const pg = require("pg"), format = require("pg-format"); const XLSX = require("xlsx"); const opts = { - database:"SheetJSPG", - host: "127.0.0.1", // localhost - port: 5432, - user: "postgres", - password: "7509" -}; + database:"SheetJSPG", + host: "127.0.0.1", // localhost + port: 5432, + user: "postgres", + password: "7509" + }; function deduceType(cells) { if (!cells || cells.length === 0) return 'text'; @@ -170,4 +170,4 @@ try { /* disconnect */ await client.end(); } -})(); \ No newline at end of file +})();