定制 keboola/db-extractor-adapter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

keboola/db-extractor-adapter

最新稳定版本:1.15.2

Composer 安装命令:

composer require keboola/db-extractor-adapter

包简介

Set of connection adapters for DB extractors.

README 文档

README

This library contains a common interface for connecting to and data extracting from, various sources:

  • It is intended for use with db-extractor-common.
  • It supports PDO and ODBC connections for now.
  • The interfaces defined in this library can be easily used to support other methods, e.g. cli BCP tool.

Main Classes

  • Interface DbConnection is an abstraction that represents a connection to the database.
  • Interface QueryResult is an abstraction that represents query result - rows returned from database.
  • Interface ExportAdapter is an abstraction which defines how the data is to be extracted.
    • Based on ExportConfig, ExportResult is generated. The rows are written to the specified CSV file.
    • By implementing this interface, it is possible to add support for CLI tools for export.
    • Abstract class BaseExportAdapter contains common code.
    • Class PdoExportAdapter implements export for PDO connection.
    • Class OdbcExportAdapter implements export for ODBC connection.
    • Class FallbackExportAdapter allows you to use multiple adapters. If one fails, then fallback adapter is used.
  • Interface QueryFactory used to generate SQL query from ExportConfig. It is used if query is not set in the config.
  • Class QueryResultCsvWriter used to write rows from the QueryResult to the specified CSV file.

Development

Clone this repository and init the workspace with following command:

git clone https://github.com/keboola/db-extractor-adapter
cd db-extractor-adapter
docker compose build
docker compose run --rm dev composer install --no-scripts

Run the test suite using this command:

docker compose run --rm dev composer tests

License

MIT licensed, see LICENSE file.

统计信息

  • 总下载量: 3.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 15
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-12