Returns an object for a table access

@param string $tableName
a table name
@param array $map [optional]
a map (a key => a real table column)
@return \go\DB\Table
a "table" instance
428858
public function getTable($tableName, array $map = null)
    {
        if (($map === null) && (is_string($tableName))) {
            if (isset($this->cacheTables[$tableName])) {
                $table = $this->cacheTables[$tableName];
            } else {
                $table = new Table($this, $tableName);
                $this->cacheTables[$tableName] = $table;
            }
        } else {
            $table = new Table($this, $tableName, $map);
        }
        return $table;
    }
574904
public function addTable($tableName)
    {
        $this->tables[$tableName] = new TableMap($tableName, $this);

        return $this->tables[$tableName];
    }
1216136
public function getModelJoinByTableName($tableName) {
        foreach ($this->joins as $join) {
            if ($join instanceof ModelJoin && $join->getTableMap()->getName() == $tableName) {
                return $join;
            }
        }

        return null;
    }
822084
public function serializer($data,$map = array()) {
		$def = array(
			'model' => null,
			'bind' => array()	
		);
		$singltion= false;
		
		if(!isset($data[0])){
		 $singltion = true;
		 $data = array( $data );
	    }
	    $out = array();
		foreach($data as $key => $val ){
			
			$rec = $val[$map['model']];
			foreach($map['bind'] as $alias => $path ){
				$x = $val[$path];
		//		if(!isset($x[0]) == 1) $x = array($x);
				$rec[$alias] = $x;
			}		
			$out[] = $rec;
		}
			if(!$singltion){
				$alias =  Inflector::tableize($map['model']);		
			} else{
				$alias = strtolower($map['model']);
				$out = $out[0];
			} 
		  return array($alias => $out);

	}
129991
public static function table($name)
    {
        Helpers\Validate::table($name)->exists();

        $self       = new self();
        $self->name = $name;

        $self->setFields();
        $self->setPending();

        return $self;
    }
76104
protected Table getTableFromDB(String tableName) {
        Table table = m_db.getTables().getExact(tableName);
        return table;
    }
148513
protected function createTable($tableName, $table) {
		$res = "\$this->schema->create('$tableName', function(\$table) {";

		foreach($table->getColumns() as $colName=>$col)
			$res .= $this->createColumn($colName, $col);

		foreach($table->getIndexes() as $index)
			$res .= $this->createIndex($index);

		foreach($table->getForeignKeys() as $key)
			$res .= $this->createForeignKey($key);

		$res .= "\n});\n\n";

		return $res;
	}
788526
public function findTableInArray($tablename) {
        foreach ($this->tables as $i => $table) {
            if ($tablename == $table->getName()) {
                return $i;
            }
        }
        return null;
    }
1163712
public function insert($table, array $map = []): Query\InsertQuery
    {
        $query = $this->engine->makeInsert()->into($table);
        if (empty($map) === false) {
            $query = $query->map($map);
        }
        return $query;
    }
476272
public function getTable($name = '')
    {
        if ($name || empty($this->table)) {
            $name      = $name ?: $this->name;
            $tableName = $this->prefix;
            if ($name) {
                $tableName .= Parse::parseName($name);
            }
        } else {
            $tableName = $this->table;
        }
        return $tableName;
    }
689601
final public function getTable(string $name): Table
    {
        if (!array_key_exists($name, $this->tables)) {
            throw new InvalidArgumentException('Table '.$name.' not added');
        }

        return $this->tables[$name];
    }
1362155
def get_table(self, tablename):
        
        table, (_row, _col) = self.__tables[tablename]
        return table
1226899
private function getTableColumns (string $tableName)
    {
        $columns = DB::getSchemaBuilder ()->getColumnListing ($tableName);

        if (!count ($columns))
            $this->abort ("Table not found: " . $tableName);
        else
            $columns = DB::select (DB::raw ('SHOW COLUMNS FROM ' . $tableName));


        return $columns;
    }
388261
public function prune($map = null)
    {
        if ($map) {
            $this->addUsingAlias(MapTableMap::COL_ID, $map->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
912264
public function map($map = null) {
		if ($map !== null) {
			$this->_map = $map;
			return $this;
		}
		return $this->_map;
	}
1139807
public static Table getTable(DatabaseMetaData metadata, String tableName) throws Exception {
        return new Table(
            tableName,
            getPrimaryKey(metadata, tableName),
            getForeignKeys(metadata, tableName),
            getExportedKeys(metadata, tableName),
            getColumns(metadata, tableName)
        );
    }
404260
public function fromTable(string $tableName) : TableChartMappingDefiner
    {
        if (!isset($this->tables[$tableName])) {
            throw InvalidArgumentException::format(
                    'Invalid table name supplied to %s: expecting one of (%s), \'%s\' given',
                    __METHOD__, Debug::formatValues(array_keys($this->tables)), $tableName
            );
        }

        return new TableChartMappingDefiner($this->name, $this->tables[$tableName]->getDataSource(), $this->callback);
    }