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
This commit is contained in:
Asad 2024-11-20 19:43:13 -05:00
parent 1cbac92f77
commit e2fb27aa4f
2 changed files with 8 additions and 8 deletions

2
.gitignore vendored

@ -4,4 +4,4 @@ node_modules/
.log
:.prettierrc
SheetJSPGExport.xlsx
pres.numbers
pres.numbers

@ -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();
}
})();
})();