code: protected function buildTblConst()/*# : array */
      {
          $result = $this->buildCol();
  
          // primary
          if (isset($this->tbl_constraint['primary'])) {
              $p = $this->tbl_constraint['primary'];
              $result[] = 'PRIMARY KEY (' .
                  join(', ', $this->quoteIndex($p[0])) . ')' .
                  (empty($p[1]) ? '' : " $p[1]");
          }
  
          // unique
          if (isset($this->tbl_constraint['unique'])) {
              foreach ($this->tbl_constraint['unique'] as $uniq) {
                  $result[] = 'UNIQUE (' .
                      join(', ', $this->quoteIndex($uniq[0])) . ')' .
                      (empty($uniq[1]) ? '' : " $uniq[1]");
              }
          }
  
          // other constraints
          if (isset($this->tbl_constraint['other'])) {
              foreach ($this->tbl_constraint['other'] as $const) {
                  $result[] = $const;
              }
          }
  
          return $result;
      }
docs: Build table constraints
  
  @return array
  @access protected