Changeset 19146


Ignore:
Timestamp:
2010/11/06 23:05:57 (13 years ago)
Author:
fukuda
Message:

MDB2のインデックスcreate,dropを利用できるようにメソッドを追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camp/camp-2_5-D/data/class/SC_Query.php

    r18990 r19146  
    731731        return $this->conn->listTableIndexes($table); 
    732732    } 
    733  
     733     
     734    /** 
     735     * テーブルにインデックスを付与する 
     736     * 
     737     * @param string $table テーブル名 
     738     * @param string $name インデックス名 
     739     * @param array $definition フィールド名など 通常のフィールド指定時は、$definition=array('fields' => array('フィールド名' => array())); 
     740     */ 
     741    function createIndex($table, $name, $definition) { 
     742        $this->conn->loadModule('Manager'); 
     743        return $this->conn->createIndex($table, $name, $definition); 
     744    } 
     745 
     746    /** 
     747     * テーブルにインデックスを破棄する 
     748     * 
     749     * @param string $table テーブル名 
     750     * @param string $name インデックス名 
     751     */ 
     752    function dropIndex($table, $name) { 
     753        $this->conn->loadModule('Manager'); 
     754        return $this->conn->dropIndex($table, $name); 
     755    } 
     756     
    734757    /** 
    735758     * 値を適切にクォートする. 
Note: See TracChangeset for help on using the changeset viewer.