From 36e3b7526ac7f44b8edf78e14d2b4c2bb8aa45e2 Mon Sep 17 00:00:00 2001 From: zYne Date: Tue, 20 Mar 2007 22:53:23 +0000 Subject: [PATCH] fixed index documentation --- ...relational mapping - Indexes - Adding indexes.php | 12 +++--------- ... relational mapping - Indexes - Index options.php | 4 +--- ...elational mapping - Indexes - Special indexes.php | 4 +--- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/manual/docs/Object relational mapping - Indexes - Adding indexes.php b/manual/docs/Object relational mapping - Indexes - Adding indexes.php index 4e25bd4c2..073777a31 100644 --- a/manual/docs/Object relational mapping - Indexes - Adding indexes.php +++ b/manual/docs/Object relational mapping - Indexes - Adding indexes.php @@ -11,9 +11,7 @@ class IndexTest extends Doctrine_Record public function setTableDefinition() { \$this->hasColumn('name', 'string'); - } - public function setUp() - { + \$this->index('myindex', array('fields' => 'name'); } } @@ -30,9 +28,7 @@ class MultiColumnIndexTest extends Doctrine_Record { \$this->hasColumn('name', 'string'); \$this->hasColumn('code', 'string'); - } - public function setUp() - { + \$this->index('myindex', array('fields' => array('name', 'code'))); } } @@ -50,9 +46,7 @@ class MultipleIndexTest extends Doctrine_Record \$this->hasColumn('name', 'string'); \$this->hasColumn('code', 'string'); \$this->hasColumn('age', 'integer'); - } - public function setUp() - { + \$this->index('myindex', array('fields' => array('name', 'code'))); \$this->index('ageindex', array('fields' => array('age')); } diff --git a/manual/docs/Object relational mapping - Indexes - Index options.php b/manual/docs/Object relational mapping - Indexes - Index options.php index 4d77cd3c2..7e4f14b10 100644 --- a/manual/docs/Object relational mapping - Indexes - Index options.php +++ b/manual/docs/Object relational mapping - Indexes - Index options.php @@ -27,9 +27,7 @@ class MultipleIndexTest extends Doctrine_Record \$this->hasColumn('name', 'string'); \$this->hasColumn('code', 'string'); \$this->hasColumn('age', 'integer'); - } - public function setUp() - { + \$this->index('myindex', array( 'fields' => array( 'name' => diff --git a/manual/docs/Object relational mapping - Indexes - Special indexes.php b/manual/docs/Object relational mapping - Indexes - Special indexes.php index 6ee16b9ed..84aec0fef 100644 --- a/manual/docs/Object relational mapping - Indexes - Special indexes.php +++ b/manual/docs/Object relational mapping - Indexes - Special indexes.php @@ -10,9 +10,7 @@ class Article { \$this->hasColumn('name', 'string'); \$this->hasColumn('content', 'string'); - } - public function setUp() - { + \$this->index('content', array('fields' => 'content', 'type' => 'fulltext')); }