/** * The preprocess before writing SQL statement * @return boolean * @throws epExceptionQueryBuilder */ protected function preproc() { // get root alias $this->aliases_secondary = array(); if (!$this->processFrom()) { return false; } // collect contained aliases $this->aliases_contained = array(); if (!$this->walk($this->root, 'collectAliases')) { return false; } // normalize variables if (!$this->walk($this->root, 'normalizeVariable')) { return false; } // process 'contains' and 'variable' nodes while (!$this->walk($this->root, 'processVariable')) { // loop until all aliases and vars are set up } // process array or object place holders if (!$this->walk($this->root, 'processPlaceholder')) { return false; } // call path manager to create SQL from clause return $this->pm->generateSql(); }
/** * The preprocess before writing SQL statement * @return boolean * @throws epExceptionQueryBuilder */ protected function preproc() { // create query path include_once EP_SRC_QUERY . '/epQueryPath.php'; if (!($this->pm = new epQueryPathManager())) { throw new epExceptionQueryBuilder('cannot instantiate path manager'); return false; } // get root alias $this->aliases_secondary = array(); if (!$this->processFrom()) { return false; } // collect contained aliases $this->aliases_contained = array(); if (!$this->walk($this->root, 'collectAliases')) { return false; } // normalize variables if (!$this->walk($this->root, 'normalizeVariable')) { return false; } // process 'contains' and 'variable' nodes while (!$this->walk($this->root, 'processVariable')) { // loop until all aliases and vars are set up } // process array or object place holders if (!$this->walk($this->root, 'processPlaceholder')) { return false; } // call path manager to create SQL from clause return $this->pm->generateSql(); }