2017 © Pedro Peláez
 

symfony-bundle stored-procedure-bundle

Symfony bundle for work with red-defender/pgfunc

image

doctrs/stored-procedure-bundle

Symfony bundle for work with red-defender/pgfunc

  • Thursday, June 7, 2018
  • by DOC_tr
  • Repository
  • 1 Watchers
  • 1 Stars
  • 43 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Stored Procedure Bundle

Symfony bundle for pgfunc lib, (*1)

Build Status Code Intelligence Status SensioLabsInsight, (*2)

Bundle for work with stored procedure through https://github.com/red-defender/pgfunc, (*3)

You may create many connection and execute stored procedure throught one of them, (*4)

Install

composer require doctrs/stored-procedure-bundle

Configuration

Create file config/packages/stored_procedure.yaml and configure connections, (*5)

stored_procedure:
    connections:
        api_master:
            dbname: '%env(API_DB_MASTER_DBNAME)%'
            host: '%env(API_DB_MASTER_HOST)%'
            port: '%env(API_DB_MASTER_PORT)%'
            user: '%env(API_DB_MASTER_USER)%'
        admin_master:
            dbname: '%env(ADMIN_DB_MASTER_DBNAME)%'
            host: '%env(ADMIN_DB_MASTER_HOST)%'
            port: '%env(ADMIN_DB_MASTER_PORT)%'
            user: '%env(ADMIN_DB_MASTER_USER)%'
        any_connection: ~
        any_second_connection: ~

List of all configure variables, (*6)

application_name
client_encoding
connect_timeout
dbname
fallback_application_name
gsslib
host
hostaddr
keepalives
keepalives_count
keepalives_idle
keepalives_interval
krbsrvname
options
passfile
port
requirepeer
requiressl
service
sslcert
sslcompression
sslcrl
sslkey
sslmode
sslrootcert
target_session_attrs
tty

Execute procedure

Procedure::execute(string $connectionName, \PgFunc\Procedure $procedure);

...

$procedure = new Procedure('any_procedure_name');
$procedure->addParameters(...$parameters);
...
return $container->get('doctrs.stored_procedure')->execute('api_master', $procedure);

Events

  • stored_procedure.connection_name - Change connection name.
  • stored_procedure.connection - Change connection class, and change Procedure class
  • stored_procedure.result - Change result

The Versions

07/06 2018

dev-master

9999999-dev https://github.com/Doctrs/StoredProcedureBundle

Symfony bundle for work with red-defender/pgfunc

  Sources   Download

MIT

The Requires

 

by Avatar DOC_tr

symfony red-defender pgfunc

07/06 2018

1.0.0

1.0.0.0 https://github.com/Doctrs/StoredProcedureBundle

Symfony bundle for work with red-defender/pgfunc

  Sources   Download

MIT

The Requires

 

by Avatar DOC_tr

symfony red-defender pgfunc

05/06 2018

0.1.0

0.1.0.0 https://github.com/Doctrs/StoredProcedureBundle

Symfony bundle for work with red-defender/pgfunc

  Sources   Download

MIT

The Requires

 

by Avatar DOC_tr

symfony red-defender pgfunc