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

dbgate-plugin-csv

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbgate-plugin-csv - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

package.json
{
"name": "dbgate-plugin-csv",
"main": "dist/backend.js",
"version": "1.0.6",
"version": "1.0.7",
"homepage": "https://github.com/dbshell/dbgate-plugin-csv",

@@ -6,0 +6,0 @@ "description": "CSV import/export plugin for DbGate",

@@ -8,1 +8,51 @@ [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

CSV import/export plugin for DbGate
## Usage without DbGate
Export from fake object reader into CSV file. Fake object file can be replaced with other reader/writer factory functions, as described in
[dbgate-api package](https://www.npmjs.com/package/dbgate-api)
```javascript
const dbgateApi = require('dbgate-api');
const dbgatePluginCsv = require("dbgate-plugin-csv");
dbgateApi.registerPlugins(dbgatePluginCsv);
async function run() {
const reader = await dbgateApi.fakeObjectReader();
const writer = await dbgateApi.consoleObjectWriter();
await dbgatePluginCsv.shellApi.writer({ fileName: '~/myfile1.csv', separator: ';' });
console.log('Finished job script');
}
dbgateApi.runScript(run);
```
## Factory functions
### shellApi.reader
Reads CSV file
```js
const reader = await dbgateApi.csvReader({
fileName: '/home/root/test.csv',
encoding: 'utf-8',
header: true,
delimiter: ',',
quoted: false,
limitRows: null
});
```
### shellApi.writer
Writes CSV file
```js
const reader = await dbgateApi.csvWriter({
fileName: '/home/root/test.csv',
encoding: 'utf-8',
header: true,
delimiter: ',',
quoted: false
});
```
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