テーブルが存在するかどうかを返します。

@param	string	テーブル名
@param	bool	強制再取得フラグ
@return	bool	テーブルが既に存在する場合はtrue, そうでない場合はfalse
13436
public static function ExistTable (array $options, $table_name, $forced_obtain = false) {
		$tables = static::GetConnection($options)->getTables($forced_obtain);
		return isset($tables[$table_name]);
	}
438772
public static function Exist ($options = [], $forced_obtain = false) {
		$options += $options + static::GetDefaultOptions();
		return DBI::ExistTable($options, static::GetName(), $forced_obtain);
	}
999002
public static function Exists ($name) {
		static::Start();
		if (!static::IsSessionActive()) {
			throw CoreException::RaiseSystemError('セッションが開始されていないため、セッションを利用できません。');
		}
		if (is_array($name)) {
			return Arrays::ExistsLowest($_SESSION, $name);
		} else {
			return isset($_SESSION[$name]) ? $_SESSION[$name] : null;
		}
	}
273579
public static function GetNotNullColumns (array $options, $table_name, $forced_obtain = false) {
		return static::GetConnection($options)->getNotNullColumns($table_name, $forced_obtain);
	}
283175
public static function GetColumnDefaultValues (array $options, $table_name, $forced_obtain = false) {
		return static::GetConnection($options)->getColumnDefaultValues($table_name, $forced_obtain);
	}
309860
public function __isset($name)
    {
        if (isset($this->instances[$name])) {
            return true;
        } elseif (isset($this->autoloader)) {
            try {
                $this->$name;
                return true;
            } catch (InvalidModuleException $e) {
            }
        }
        return false;
    }
190388
@CallerSideMethod
    public RealLiveTable tbl(String name ) {
        return (RealLiveTable) getActor().syncTableAccess.get(name);
    }
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;
	}
194730
public function tableExists($table_name,$which_connection='')
    {
        /**
          Check whether the definition is in cache
        */
        if (isset($this->structure_cache[$which_connection]) && isset($this->structure_cache[$which_connection][$table_name])) {
            return true;
        }

        $conn = $this->getNamedConnection($which_connection);
        if (!is_object($conn)) {
            return false;
        }
        $cols = $conn->MetaColumns($table_name);
        if ($cols === false) {
            return false;
        }

        return true;
    }
234315
protected function _updateIndexes ($table_name) {
		$this->_indexes[$table_name] = [];

		//スキーマからインデックス情報を抜く
		//プライマリキーの取得
		foreach ($this->getColumns($table_name, true) as $column_info) {
			if ($column_info['primary_key']) {
				$seq_in_index = 1;
				foreach (explode(',', $column_info['column_name']) as $column_name) {
					$this->_indexes[$table_name]['PRIMARY'][] = [
						'table_name'		=> $table_name,
						'temporary'			=> null,
						'unique'			=> null,
						'if_not_exists'		=> null,
						'key_name'			=> 'PRIMARY',
						'column_name'		=> $column_name,
						'seq_in_index'		=> $seq_in_index++,
						'collation'			=> null,
						'cardinality'		=> null,
						'comment'			=> null,
						'index_comment'		=> null,
						'order'				=> null,
						'index_type'		=> null,
						'sub_part'			=> null,
						'raw_data'			=> null,
					];
				}
			}
		}

		//インデックスの取得
		$stmt	= $this->prepare('SELECT tbl_name, name, sql FROM sqlite_master WHERE type = ? AND tbl_name = ?');
		$stmt->execute(['index', $table_name]);
		$stmt->setFetchMode(\PDO::FETCH_ASSOC);
		foreach ($stmt as $index_schema) {
			$tbl_name = $index_schema['tbl_name'];
			$name = $index_schema['name'];
			$schema = preg_replace("/^\s*CREATE\s+|\s*\)\s*/i", '', str_replace(["\r\n", "\r", "\n"], '', $index_schema['sql']));

			if (false !== $temporary = preg_match("/^(?:TEMP|TEMPORARY)\s+(.+)/i", $schema, $matches) !== 0) {
				$schema = $matches[1];
			}

			if (false !== $unique = preg_match("/^UNIQUE\s+(.+)/i", $schema, $matches) !== 0) {
				$schema = $matches[1];
			}

			$schema = preg_replace("/^INDEX\s+/i", '', $schema);

			if (false !== $if_not_exists = preg_match("/^IF\s+NOT\s+EXISTS\s+(.+)/i", $schema, $matches) !== 0) {
				$schema = $matches[1];
			}

			$schema = preg_replace(sprintf("/^%s\s+ON\s+%s\s*\(/i", $name, $tbl_name), '', $schema);

			$indexed_column = [];
			$seq_in_index = 1;
			foreach (explode(',', $schema) as $element) {
				if ($element === '') {
					continue;
				}
				preg_match("/^\s*([^\s]+)(.*)/i", $element, $matches);

				$column_name = $matches[1];
				$schema = $matches[2];

				$collection_name = null;
				$order = null;

				if (preg_match("/^\s+COLLATE\s+([^\s]+)(.*)/i", $schema, $matches) !== 0) {
					$collection_name = $matches[1];
					$schema = $matches[2];
				}
				if (preg_match("/^\s+(ASC|DESC)/i", $schema, $matches) !== 0) {
					$order = $matches[1];
				}

				$this->_indexes[$table_name][$name][] = [
					'table_name'		=> $table_name,
					'temporary'			=> $temporary,
					'unique'			=> $unique,
					'if_not_exists'		=> $if_not_exists,
					'key_name'			=> $name,
					'column_name'		=> $column_name,
					'seq_in_index'		=> $seq_in_index++,
					'collation'			=> $collection_name,
					'cardinality'		=> null,
					'comment'			=> null,
					'index_comment'		=> null,
					'order'				=> $order,
					'index_type'		=> null,
					'sub_part'			=> null,
					'raw_data'			=> null,
				];
			}
		}
	}
663292
public static function GetIndexes (array $options, $table_name, $forced_obtain = false) {
		return static::GetConnection($options)->getIndexes($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;
	}
766894
public function getNotNullColumns ($table_name, $forced_obtain = false) {
		if ($forced_obtain || !Arrays::KeyExists($this->_notNullColumns, $table_name)) {
			$this->_updateNotNullColumns($table_name);
		}
		return $this->_notNullColumns[$table_name];
	}
598395
public function _get($_name)
    {
        $getMethod = 'get' . ucfirst($_name);
        if(method_exists($this,$getMethod))
            return $this->$getMethod();
        else
            return false;
    }
621248
public function indexOf(string $name, bool $public = true)
    {
        if ($public) {
            return isset($this->public[$name]);
        }
        return isset($this->private[$name]);
    }
780578
public function get($name = 'HTTP_HOST')
    {
        $name = isset($this->references[$name]) ? $this->references[$name]: $this->resolveCase($name);

        return $this->has($name) ? $_SERVER[$name] : false;
    }
698153
public function whichDB($db_name)
    {
        if ($this->connection->tableExists($db_name . $this->connection->sep() . $this->name)) {
            $this->fq_name = $db_name . $this->connection->sep() . $this->name;
            return true;
        } else {
            return false;
        }
    }