pbergman / doctrine-export-bundle
Bundle for exporting query results.
1.0.0
2021-03-15 15:43 UTC
Requires
- php: >7.3
- doctrine/dbal: ^2
- sonata-project/exporter: ^2
- symfony/config: ^4.4
- symfony/console: ^4.4
- symfony/dependency-injection: ^4.4
- symfony/http-kernel: ^4.4
Requires (Dev)
- symfony/http-client: ^4.2
This package is auto-updated.
Last update: 2024-11-29 13:10:24 UTC
README
And bundle for exporting query results to different output types. This can be done by defining a query in the config or using the raw command directly.
Installing
composer require pbergman\doctrine-export-bundle
Usage
Configure a query:
p_bergman_doctrine_export:
example:
description: An example command
query: |
select 1,2,3
with the list command you can print a overview of all commands:
php bin/console pbergman:export:list
----------- ----------------------------------------------------------------------------------
name description
----------- ----------------------------------------------------------------------------------
example An example command
----------- ----------------------------------------------------------------------------------
and execute the command:
php bin/console pbergman:export:exec -F json
[{"1":"1","2":"2","3":"3"}]
or do a raw export:
php bin/console pbergman:export:raw -F json 'select 1,2,3'
[{"1":"1","2":"2","3":"3"}]