示例#1
0
 /**
  * load informations of the given table
  * @return jDbTable ready to make change
  */
 function getTable($name)
 {
     $name = $this->conn->prefixTable($name);
     if ($this->tables === null) {
         $this->tables = $this->_getTables();
     }
     if (isset($this->tables[$name])) {
         return $this->tables[$name];
     }
     return null;
 }
 /**
  * @param jDbConnection $conn the database connection
  */
 function __construct($conn)
 {
     $this->_conn = $conn;
     if ($this->_conn->hasTablePrefix()) {
         foreach ($this->_tables as $table_name => $table) {
             $this->_tables[$table_name]['realname'] = $this->_conn->prefixTable($table['realname']);
         }
     }
 }
示例#3
0
 /**
  * @internal
  */
 protected final function _createOrderClause($daocond)
 {
     $order = array();
     $props = $this->getProperties();
     foreach ($daocond->order as $name => $way) {
         if (isset($props[$name])) {
             $order[] = $this->_conn->prefixTable($props[$name]['table']) . '.' . $this->_conn->encloseName($props[$name]['fieldName']) . ' ' . $way;
         }
     }
     if (count($order)) {
         return ' ORDER BY ' . implode(', ', $order);
     }
     return '';
 }
示例#4
0
 /**
  * return the field list of a given table
  * @return array  array of jDbFieldProperties
  */
 public function getFieldList($tableName)
 {
     return $this->_getFieldList($this->_connector->prefixTable($tableName));
 }