private function generateSP(string $tableName, string $spType, string $spName): string
  {
    switch ($spType)
    {
      case 'UPDATE':
        $routine = new UpdateRoutine($this->input,
                                     $this->output,
                                     $this->helper,
                                     $spType,
                                     $spName,
                                     $tableName,
                                     $this->dataSchema);
        break;

      case 'DELETE':
        $routine = new DeleteRoutine($this->input,
                                     $this->output,
                                     $this->helper,
                                     $spType, $spName,
                                     $tableName,
                                     $this->dataSchema);
        break;

      case 'SELECT':
        $routine = new SelectRoutine($this->input,
                                     $this->output,
                                     $this->helper,
                                     $spType, $spName,
                                     $tableName,
                                     $this->dataSchema);
        break;

      case 'INSERT':
        $routine = new InsertRoutine($this->input,
                                     $this->output,
                                     $this->helper,
                                     $spType,
                                     $spName,
                                     $tableName,
                                     $this->dataSchema);
        break;

      default:
        throw new FallenException("Unknown type '%s'", $spType);
    }

    return $routine->getCode();
  }