graze/data-db

抽象数据库节点

dev-master 2016-09-27 11:00 UTC

This package is auto-updated.

Last update: 2024-09-24 05:34:48 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

库,用于将表格导入/导出到文件。

  • 支持: PdoZend1Zend2 数据库适配器
  • 当前支持: MysqlRedshift 数据库。

安装

通过 Composer

$ composer require graze/data-db

用法

$table1 = new Table($mysqlAdapter, 'schema', 'table');
$file = new LocalFile('/some/path/to/file');
$exporter = new TableExporter($file, new CsvFormat());
$exporter->export($table);

// file written to with the contents of $table1 in the default Csv Format

$table2 = new Table($redshiftAdapter, 'schema', 'table');
$importer = new RedshiftFileImporter($table2);
$importer->import($file);

// table2 now contains the contents of table1

变更日志

请参阅 CHANGELOG 了解最近更改的详细信息。

测试

$ make test

贡献

请参阅 CONTRIBUTING 了解详细信息。

安全性

如果您发现任何与安全性相关的问题,请发送电子邮件至 security@graze.com 而不是使用问题跟踪器。

鸣谢

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件