Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • patch-1
  • zf-3.x
  • Fix
  • origin/trunk
  • origin/new_version
  • 1.1.1
  • 1.1.0
  • 1.0.0
9 results

FunctionCreationHelper.php

  • Forked from lib / unicaen / db-import
    222 commits behind the upstream repository.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    FunctionCreationHelper.php 650 B
    <?php
    
    namespace UnicaenDbImport\CodeGenerator\PostgreSQL\Helper;
    
    use UnicaenDbImport\CodeGenerator\PostgreSQL\PostgreSQLCommonsTrait;
    
    /**
     * Version PostgreSQL.
     *
     * @author Unicaen
     */
    class FunctionCreationHelper extends \UnicaenDbImport\CodeGenerator\Common\Helper\FunctionCreationHelper
    {
        use PostgreSQLCommonsTrait;
    
        protected function generateFunctionBodyBeginningSQLSnippet()
        {
            return <<<'EOT'
    $Q$
    DECLARE
        operation VARCHAR(64);
        hash VARCHAR(255);
        sql TEXT;
    BEGIN
    EOT;
        }
    
        protected function generateFunctionBodyEndingSQLSnippet()
        {
            return <<<'EOT'
    END; $Q$
    LANGUAGE plpgsql;
    EOT;
        }
    }