/**
  * Builds the DDL SQL for a Unique constraint object.
  *
  * @param  Unique $unique
  * @return string
  */
 public function getUniqueDDL(Unique $unique)
 {
     return sprintf('UNIQUE (%s)', $this->getColumnListDDL($unique->getColumnObjects()));
 }
예제 #2
0
 public function getUniqueDDL(Unique $unique)
 {
     return sprintf('CONSTRAINT %s UNIQUE (%s)', $this->quoteIdentifier($unique->getName()), $this->getColumnListDDL($unique->getColumnObjects()));
 }
예제 #3
0
 /**
  * Builds the DDL SQL for a Unique constraint object. MS SQL Server CONTRAINT specific
  *
  * @param  Unique $unique
  * @return string
  */
 public function getUniqueDDL(Unique $unique)
 {
     $pattern = 'CONSTRAINT %s UNIQUE NONCLUSTERED (%s) ON [PRIMARY]';
     return sprintf($pattern, $this->quoteIdentifier($unique->getName()), $this->getColumnListDDL($unique->getColumnObjects()));
 }