graze / data-db
Abstracted Database Nodes
dev-master
2016-09-27 11:00 UTC
Requires
- php: >=5.6.0
- graze/data-file: dev-master
- graze/data-node: dev-master
- graze/standards: ^1.0
- league/flysystem-aws-s3-v3: ^1.0
Requires (Dev)
- johnkary/phpunit-speedtrap: ^1.0
- mockery/mockery: ^0.9.4
- phpunit/phpunit: 5.*
- squizlabs/php_codesniffer: ^2.5
- zendframework/zend-db: ^2.7
- zendframework/zendframework1: ^1.12
This package is auto-updated.
Last update: 2024-11-24 05:53:34 UTC
README
Library to import and export tables to/from files.
- Supports:
Pdo
,Zend1
, andZend2
database adapters - Supports:
Mysql
andRedshift
databases currently.
Install
Via Composer
$ composer require graze/data-db
Usage
$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
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ make test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email security@graze.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.