テーブルのステータスを返します。

@param	string	テーブル名
@param	bool	強制再取得フラグ
@return	array	テーブルのステータス。
@see ickx\fw2\io\rdbms\drivers\interfaces.IRdbmsDriver::getTableStatus()
767672
public function getTableStatus ($table_name, $forced_obtain = false) {
		if (!isset(array_flip($this->getTables($forced_obtain))[$table_name])) {
			throw CoreException::RaiseSystemError('存在しないテーブルを指定されました。table_name:%s', [$table_name]);
		}
		if ($forced_obtain || !isset($this->_tableStatus[$table_name])) {
			$this->_updateTableStatus($table_name);
		}
		return $this->_tableStatus;
	}
1251069
function &TableInfo()
	{
	global $_ADODB_ACTIVE_DBS;

		$activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
		$table = $activedb->tables[$this->_tableat];
		return $table;
	}
1269439
public function getPkeys ($table_name, $forced_obtain = false) {
		if (!isset(array_flip($this->getTables($forced_obtain))[$table_name])) {
			throw CoreException::RaiseSystemError('存在しないテーブルを指定されました。table_name:%s', [$table_name]);
		}
		if ($forced_obtain || !Arrays::KeyExists($this->_primaryKeys, $table_name)) {
			$this->_updatePkeys($table_name);
		}
		return $this->_primaryKeys[$table_name];
	}
518454
private static boolean tableExists(CallInfo callInfo, DB db, String tableName) {
    return db.access(callInfo, () -> { 
      DatabaseMetaData dbmd = db.getConnection().getMetaData();
      try(ResultSet rs = dbmd.getTables(null, null, null, new String[] {"TABLE"})) {
        while(rs.next()) { 
          if (tableName.equalsIgnoreCase(rs.getString("TABLE_NAME"))) {
            return true;
          }
        }
      }
      return false;
    });
  }
273579
public static function GetNotNullColumns (array $options, $table_name, $forced_obtain = false) {
		return static::GetConnection($options)->getNotNullColumns($table_name, $forced_obtain);
	}
895948
public static function GetDefaultIndex ($forced_obtain = false, array $options = []) {
		$options += $options + static::GetDefaultOptions();
		$table_name = static::GetName();

		$pkeys = DBI::GetPkeys($options, $table_name, $forced_obtain);
		if ($pkeys !== null) {
			return $pkeys;
		}

		$indexes = DBI::GetIndexes($options, $table_name, $forced_obtain);
		if (is_array($indexes) && !empty($indexes)) {
			$index_list = [];
			foreach ($indexes[key($indexes)] as $index) {
				$index_list[] = $index['column_name'];
			}
			return $index_list;
		}

		return null;
	}
827586
public synchronized TableStatInfo getTableStatInfo(TableInfo ti,
			Transaction tx) {
		if (isRefreshStatOn) {
			Integer c = updateCounts.get(ti.tableName());
			if (c != null && c > REFRESH_THRESHOLD)
				VanillaDb.taskMgr().runTask(
						new StatisticsRefreshTask(tx, ti.tableName()));
		}

		TableStatInfo tsi = tableStats.get(ti.tableName());
		if (tsi == null) {
			tsi = calcTableStats(ti, tx);
			tableStats.put(ti.tableName(), tsi);
		}
		return tsi;
	}
1003042
public static function getTableIndices( $tableName, $refresh = false )
	{
		static $data = [];
		
		if( isset( $data['$tableName'] ) ) {
			return $data['$tableName'];
		}
		
		$indexes = \Yii::$app->db->schema->getTableIndexes( $tableName, $refresh );
		
		foreach( $indexes as $index ) {
			$data[ $tableName ][ $index->name ] = $index;
		}
		
		return $data;
	}
830590
public function getTables(bool $clear = false): array
    {
        if ($clear) {
            $this->tableList = null;
        }

        if ($this->tableList === null) {
            $compiler = $this->connection->schemaCompiler();

            $database = $this->getCurrentDatabase();

            $sql = $compiler->getTables($database);

            $results = $this->connection
                ->query($sql['sql'], $sql['params'])
                ->fetchNum()
                ->all();

            $this->tableList = [];

            foreach ($results as $result) {
                $this->tableList[strtolower($result[0])] = $result[0];
            }
        }

        return $this->tableList;
    }
1263453
public function tableExists($tableName) {
        $cache = [];
        if (App::get()->cacheExists('mpf:PDOConnection:tableList')){
            $cache = App::get()->cacheValue('mpf:PDOConnection:tableList');
            if (!is_array($cache)){
                $cache = []; // a fix for old wrong values;
            }
            if (isset($cache[$tableName])){
                return $cache[$tableName];
            }
        }
        $res = $this->queryAssoc("SHOW TABLES LIKE :table", array(':table' => $tableName));
        $cache[$tableName] = (bool)$res;
        App::get()->cacheSet('mpf:PDOConnection:tableList', $cache);
        return (bool)$res;
    }
972573
public function getFieldsWithTableAlias($table_alias = null)
    {
        $vals = [];
        $replace = $table_alias === null ? '' : sprintf("%s.", $table_alias);

        foreach ($this->fields as $name => $definition) {
            $vals[$name] = $this->replaceToken($this->fields[$name], $replace);
        }

        return $vals;
    }
110365
public TableInfo getTableInfo(String tblName, Transaction tx) {
		// Optimization:
		TableInfo resultTi = tiMap.get(tblName);
		if (resultTi != null)
			return resultTi;

		RecordFile tcatfile = tcatInfo.open(tx, true);
		tcatfile.beforeFirst();
		boolean found = false;
		while (tcatfile.next()) {
			String t = (String) tcatfile.getVal(TCAT_TBLNAME).asJavaVal();
			if (t.equals(tblName)) {
				found = true;
				break;
			}
		}
		tcatfile.close();
		// return null if table is undefined
		if (!found)
			return null;

		RecordFile fcatfile = fcatInfo.open(tx, true);
		fcatfile.beforeFirst();
		Schema sch = new Schema();
		while (fcatfile.next())
			if (((String) fcatfile.getVal(FCAT_TBLNAME).asJavaVal())
					.equals(tblName)) {
				String fldname = (String) fcatfile.getVal(FCAT_FLDNAME)
						.asJavaVal();
				int fldtype = (Integer) fcatfile.getVal(FCAT_TYPE).asJavaVal();
				int fldarg = (Integer) fcatfile.getVal(FCAT_TYPEARG)
						.asJavaVal();
				sch.addField(fldname, Type.newInstance(fldtype, fldarg));
			}
		fcatfile.close();
		// Optimization:
		resultTi = new TableInfo(tblName, sch);
		tiMap.put(tblName, resultTi);
		return resultTi;
	}
133044
public function getTotalNums($pkField = null, $tableName = null, $tablePrefix = null)
    {
        is_null($tableName) && $tableName = $this->getTableName();
        is_null($tablePrefix) && $tablePrefix = $this->tablePrefix;
        is_null($pkField) && $pkField = $this->db($this->getDbConf())->getPk($tableName, $tablePrefix);
        return $this->db($this->getDbConf())->table($tableName, $tablePrefix)->count($pkField, false, $this->useMaster);
    }
774481
public function isDbTableExists($tableName)
    {
        $status = false;
        $resultSet = array();

        $query = $this->executeRawQuery("SHOW TABLES LIKE '".trim($tableName)."';");
        if($resultSet)
            $resultSet = $query->toArray();



        if(!empty($resultSet)) {
            $status = true;

        }

        return $status;
    }
614476
public function getTables()
    {
        $cmd = array(
            'mysql' => array(
                "show tables"),
            'sqlite2?' => array(
                "SELECT name FROM sqlite_master WHERE type='table' AND name!='sqlite_sequence'"),
            'pgsql|sybase|dblib' => array(
                "select table_name from information_schema.tables where table_schema = 'public'"),
            'mssql|sqlsrv|odbc' => array(
                "select table_name from information_schema.tables"),
            'ibm' => array("select TABLE_NAME from sysibm.tables"),
        );
        $query = $this->findQuery($cmd);
        if (!$query[0]) return false;
        $tables = $this->db->exec($query[0]);
        if ($tables && is_array($tables) && count($tables) > 0)
            foreach ($tables as &$table)
                $table = array_shift($table);
        return $tables;
    }
1151239
private function page_list( $table_name ){
		// var_dump($table_name);
		$max_count = $this->exdb->count($table_name, array());
		$this->query_options['limit'] = @intval($this->query_options['limit']);
		if( $this->query_options['limit'] <= 0 ){
			$this->query_options['limit'] = 10;
		}
		$page = intval(@$this->query_options['page']);
		if( $page == 0 ){ $page = 1; }
		$max_page = intval($max_count/$this->query_options['limit'])+1;
		if( $page < 1 || $page > $max_page ){
			@header("HTTP/1.0 404 Not Found");
			$rtn = $this->page_fatal_error('No Items.');
			echo $rtn;
			return null;
		}

		$table_header = json_decode(json_encode($this->table_definition->columns), true);
		$list = $this->exdb->select($table_name, array(), $this->query_options);

		// password を隠す
		if( count($this->table_definition->system_columns->password) ){
			foreach($this->table_definition->system_columns->password as $tmp_column_name){
				unset($table_header[$tmp_column_name]);
				foreach( $list as $key=>$val ){
					unset($list[$key][$tmp_column_name]);
				}
			}
			unset($tmp_column_name);
		}
		// hidden フラグのある値を隠す
		foreach( $table_header as $tmp_column_name=>$tmp_column_definition ){
			if( $tmp_column_definition['hidden'] ){
				unset($table_header[$tmp_column_name]);
				unset($table_header[$tmp_column_name]);
				foreach( $list as $key=>$val ){
					unset($list[$key][$tmp_column_name]);
				}
			}
		}
		unset($tmp_column_name, $tmp_column_definition);

		$original_list = $list;
		$list = array();
		foreach( $original_list as $row ){
			$tmp_row = array();
			$tmp_row['label'] = $row[$this->table_definition->key_column];
			$tmp_row['href'] = $this->generate_url($table_name, $row[$this->table_definition->key_column]);
			$tmp_row['val'] = $row;
			array_push($list, $tmp_row);
		}

		$nav_prev = array(
			'href'=>$this->generate_url($table_name, null, null).'?:page='.($page -1),
		);
		if( $page <= 1 ){
			$nav_prev = null;
		}
		$nav_next = array(
			'href'=>$this->generate_url($table_name, null, null).'?:page='.($page +1),
		);
		if( $page >= $max_page ){
			$nav_next = null;
		}

		$rtn = $this->render(
			'form_list.html',
			array(
				'table_label'=>$this->table_definition->label,
				'table_header'=>$table_header,
				'count'=>$max_count,
				'list'=>$list,
				'href_create'=>$this->generate_url($table_name, null, 'create'),
				'page'=>$page,
				'max_page'=>$max_page,
				'prev'=>$nav_prev,
				'next'=>$nav_next,
			)
		);
		// var_dump($table_list);
		$rtn = $this->wrap_theme($rtn);
		return $rtn;
	}
1310562
public static function getTable($table_name)
        {
            if (!isset(self::$tables[$table_name])) {
                self::loadNewTable(new $table_name());
            }
            if (!isset(self::$tables[$table_name])) {
                throw new Exception('Table ' . $table_name . ' is not loaded');
            }
            return self::$tables[$table_name];
        }