diff --git a/README.md b/README.md index 6f54768d5..67bdec71b 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ DbGate is fast and efficient database administration tool. It is focused to work * Archives - backup your data in JSON files on local filesystem (or on DbGate server, when using web application) * Light and dark theme * For detailed info, how to run DbGate in docker container, visit [docker hub](https://hub.docker.com/r/dbgate/dbgate) +* Extensible plugin architecture ![Screenshot](https://raw.githubusercontent.com/dbshell/dbgate/master/screenshot.png) @@ -34,14 +35,23 @@ DbGate is fast and efficient database administration tool. It is focused to work * There is plan to incorporate SQLite to support work with local datasets * Platform independed - will run as web application in single docker container on server, or as application using Electron platform on Linux, Windows and Mac +## Plugins +Plugins are standard NPM packages published on [npmjs.com](https://www.npmjs.com). +See all [existing DbGate plugins](https://www.npmjs.com/search?q=keywords:dbgateplugin). +Visit [dbgate generator homepage](https://github.com/dbshell/generator-dbgate) to see, how to create your own plugin. + +Currently following extensions can be implemented using plugins: +- File format parsers/writers +- Database engine connectors + ## How Can I Contribute? You're welcome to contribute to this project! Below are some ideas, how to contribute: +* Create plugins for new import/export formats * Bug fixing * Test Mac edition * Improve linux package build, add to APT repository * Auto-upgrade of electron application -* Support for new import/export formats Any help is appreciated! @@ -99,9 +109,10 @@ Some dbgate packages can be used also without DbGate. You can find them on [NPM * [api](https://github.com/dbshell/dbgate/tree/master/packages/api) - backend, Javascript, ExpressJS [![NPM version](https://img.shields.io/npm/v/dbgate-api.svg)](https://www.npmjs.com/package/dbgate-api) * [datalib](https://github.com/dbshell/dbgate/tree/master/packages/datalib) - TypeScript library for utility classes * [app](https://github.com/dbshell/dbgate/tree/master/app) - application (JavaScript) -* [engines](https://github.com/dbshell/dbgate/tree/master/packages/engines) - drivers for database engine (mssql, mysql, postgres), analysing database structure, creating specific queries (JavaScript) [![NPM version](https://img.shields.io/npm/v/dbgate-engines.svg)](https://www.npmjs.com/package/dbgate-engines) +structure, creating specific queries (JavaScript) [![NPM version](https://img.shields.io/npm/v/dbgate-engines.svg)](https://www.npmjs.com/package/dbgate-engines) * [filterparser](https://github.com/dbshell/dbgate/tree/master/packages/filterparser) - TypeScript library for parsing data filter expressions using parsimmon * [sqltree](https://github.com/dbshell/dbgate/tree/master/packages/sqltree) - JSON representation of SQL query, functions converting to SQL (TypeScript) [![NPM version](https://img.shields.io/npm/v/dbgate-sqltree.svg)](https://www.npmjs.com/package/dbgate-sqltree) * [types](https://github.com/dbshell/dbgate/tree/master/packages/types) - common TypeScript definitions [![NPM version](https://img.shields.io/npm/v/dbgate-types.svg)](https://www.npmjs.com/package/dbgate-types) * [web](https://github.com/dbshell/dbgate/tree/master/packages/web) - frontend in React (JavaScript) * [tools](https://github.com/dbshell/dbgate/tree/master/packages/tools) - various tools [![NPM version](https://img.shields.io/npm/v/dbgate-tools.svg)](https://www.npmjs.com/package/dbgate-tools) + diff --git a/packages/api/README.md b/packages/api/README.md index 98def3791..e0781d3ca 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -13,6 +13,7 @@ This example exports table Customer info CSV file. ```javascript const dbgateApi = require('dbgate-api'); const dbgatePluginMssql = require("dbgate-plugin-mssql"); +const dbgatePluginCsv = require("dbgate-plugin-csv"); dbgateApi.registerPlugins(dbgatePluginMssql); @@ -22,7 +23,7 @@ async function run() { schemaName: 'dbo', pureName: 'Customer', }); - const writer = await dbgateApi.csvWriter({ fileName: 'Customer.csv' }); + const writer = await dbgatePluginCsv.shellApi.writer({ fileName: 'Customer.csv' }); await dbgateApi.copyStream(reader, writer); console.log('Finished job script');