Collects the table column metadata.
@param CCubridTableSchema $table the table metadata
@return boolean whether the table exists in the database
484318
protected function findColumns($table)
	{
		// it may be good to use CUBRID PHP API to retrieve column info.
		$sql='SHOW COLUMNS FROM '.$table->rawName;
		try
		{
			$columns=$this->getDbConnection()->createCommand($sql)->queryAll();
		}
		catch(Exception $e)
		{
			return false;
		}
		foreach($columns as $column)
		{
			$c=$this->createColumn($column);
			$table->columns[$c->name]=$c;
		}
		return true;
	}
412142
public function getColumnType($table, $column)
    {
        $table = $this->connection->getTablePrefix().$table;

        return $this->connection->getDoctrineColumn($table, $column)->getType()->getName();
    }
963885
protected function _tableExists($table)
    {
        $db = ConnectionManager::get('default');
        $tables = $db->schemaCollection()->listTables();

        return in_array($table, $tables);
    }
152630
public function getTableSchema(): ?TableSchema
    {
        if ($this->_tableSchema === null) {
            $this->_tableSchema = $this->db->getTableSchema($this->tableName);
        }

        return $this->_tableSchema;
    }
732146
public function getColumnListing($table)
    {
        $table = $this->connection->getTablePrefix().$table;

        $results = $this->connection->select($this->grammar->compileColumnExists($table));

        return $this->connection->getPostProcessor()->processColumnListing($results);
    }
160013
public function getColumnListing($table)
    {
        [$schema, $table] = $this->parseSchemaAndTable($table);

        $table = $this->connection->getTablePrefix().$table;

        $results = $this->connection->select(
            $this->grammar->compileColumnListing(), [$schema, $table]
        );

        return $this->connection->getPostProcessor()->processColumnListing($results);
    }
330127
public function FetchColumns($Table) {
      $Sql = $this->FetchColumnSql($Table);
      $Data = $this->Query($Sql);
      $Return = array();
      foreach($Data->ResultArray() as $Row) {
         if (isset($Row['COLUMN_NAME']))
            $Return[] = $Row['COLUMN_NAME'];
         else
            $Return[] = current($Row);
      }

      return $Return;
   }
1021543
protected function _fetchTableInfo($table)
    {
        $result = null;
        $sql    = $this->quoteValue($this->getTableNeedle().$table);

        if ($info  = $this->show('SHOW TABLE STATUS LIKE '.$sql, AnDatabase::FETCH_OBJECT)) {
            //Parse the table raw schema data
            $result = $this->_parseTableInfo($info);
        }

        return $result;
    }
671193
public function getTableColumns(string $table): array {
		$query = <<<QUERY
			SELECT COLUMN_NAME
			FROM INFORMATION_SCHEMA.COLUMNS
			WHERE TABLE_SCHEMA = :database
			AND TABLE_NAME = :table
QUERY;
		
		$params = [
			"database" => $this->database,
			"table"    => $table,
		];
		
		try {
			$results = $this->getCol($query, $params);
			return is_array($results) ? $results : [];
		} catch (\PDOException $databaseException) {
			throw $this->prepareDatabaseException($databaseException, $query, $params);
		}
	}
402674
protected function loadCacheInformation($table = null)
    {
        $schema = $this->schema;
        $this->checkTableArgument($table);

        if (!in_array($schema, self::$fullyCachedSchemas)) {
            if ($table !== null) {
                $this->getTableConfig($table);
            } else {
                $this->getSchemaConfig();
            }
        } elseif ($table !== null) {
            // Just in case to check if table exists
            $this->getTableConfig($table);
        }
    }
222006
public function refreshTableSchema($table)
	{
		echo "    > refresh table $table schema cache ...";
		$time=microtime(true);
		$this->getDbConnection()->getSchema()->getTable($table,true);
		echo " done (time: ".sprintf('%.3f', microtime(true)-$time)."s)\n";
	}
55935
public function getColumns($table)
    {
        $table = $this->prefixTable($table);

        if (empty($this->queriesResultCache[ 'tableColumns' ][ $table ])) {
            $result = $this->query('PRAGMA TABLE_INFO(' . $this->protectIdentifiers($table, true, null, false) . ')');

            if ($result->count()) {
                foreach ($result as $row) {
                    // Do we know from where to get the column's name?
                    if ( ! isset($key)) {
                        if (isset($row[ 'name' ])) {
                            $key = 'name';
                        }
                    }

                    $this->queriesResultCache[ 'tableColumns' ][ $table ][ $row->offsetGet($key) ] = $row;
                }
            }
        }

        return $this->queriesResultCache[ 'tableColumns' ][ $table ];
    }
175726
public function getTableSchema($table, $database = 'base')
    {
        $cacher = $this->config->getSchemaCacher();
        if ($cacher->has($table)) return $cacher->get($table);

        $driver = $this->getDatabase($database)->getDriver();
        $connection = $this->establishConnection($database, Database::TARGET_SLAVE);
        $describe = $driver->getTableDescribe($connection, $table);

        $schema = new TableSchema($table, $describe);
        $cacher->cache($table, $schema);
        return $schema;
    }
1073471
protected function findColumns($table)
	{
		$sql='SHOW FULL COLUMNS FROM '.$table->rawName;
		try
		{
			$columns=$this->getDbConnection()->createCommand($sql)->queryAll();
		}
		catch(Exception $e)
		{
			return false;
		}
		foreach($columns as $column)
		{
			$c=$this->createColumn($column);
			$table->columns[$c->name]=$c;
			if($c->isPrimaryKey)
			{
				if($table->primaryKey===null)
					$table->primaryKey=$c->name;
				elseif(is_string($table->primaryKey))
					$table->primaryKey=array($table->primaryKey,$c->name);
				else
					$table->primaryKey[]=$c->name;
				if($c->autoIncrement)
					$table->sequenceName='';
			}
		}
		return true;
	}
586777
public function getColmuns($table)
    {
        $table = self::table($table);
        $columns = [];
        //
        $data = Database::read("select COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '".Config::get('database.database')."' AND TABLE_NAME = '$table';");
        //
        foreach ($data as $key => $value) {
            $columns[] = $value['COLUMN_NAME'];
        }
        //
        return $columns;
    }
584834
public function hasTable($table)
	{
            $sql = $this->grammar->compileTableExists($table);
            $statement = $this->connection->getBatchQuery($sql, []);
            $data = $statement->getResultSet();
            return $data->result()? true: false;
          
	}
1234738
public function hasTable($table = '')
    {
        $tableName = '';

        $tableName = ($table !== '') ?
            $table : $this->tableName;

        $this->schema = "SHOW TABLES LIKE '".$tableName."'";
        $this->checkSchemaExistence = true;

        return $this;
    }