data-db
, (*1)
Library to import and export tables to/from files., (*2)
- Supports:
Pdo
, Zend1
, and Zend2
database adapters
- Supports:
Mysql
and Redshift
databases currently.
Install
Via Composer, (*3)
``` bash
$ composer require graze/data-db, (*4)
### Usage
```php
$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., (*5)
Testing
bash
$ make test
, (*6)
Contributing
Please see CONTRIBUTING for details., (*7)
Security
If you discover any security related issues, please email security@graze.com instead of using the issue tracker., (*8)
Credits
License
The MIT License (MIT). Please see License File for more information., (*9)