MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _add_to_result_map

Method _add_to_result_map

lib/sqlalchemy/sql/compiler.py:4652–4675  ·  view source on GitHub ↗
(
        self,
        keyname: str,
        name: str,
        objects: Tuple[Any, ...],
        type_: TypeEngine[Any],
    )

Source from the content-addressed store, hash-verified

4650 return " AS " + alias_name_text
4651
4652 def _add_to_result_map(
4653 self,
4654 keyname: str,
4655 name: str,
4656 objects: Tuple[Any, ...],
4657 type_: TypeEngine[Any],
4658 ) -> None:
4659
4660 # note objects must be non-empty for cursor.py to handle the
4661 # collection properly
4662 assert objects
4663
4664 if keyname is None or keyname == "*":
4665 self._ordered_columns = False
4666 self._ad_hoc_textual = True
4667 if type_._is_tuple_type:
4668 raise exc.CompileError(
4669 "Most backends don't support SELECTing "
4670 "from a tuple() object. If this is an ORM query, "
4671 "consider using the Bundle object."
4672 )
4673 self._result_columns.append(
4674 ResultColumnsEntry(keyname, name, objects, type_)
4675 )
4676
4677 def _label_returning_column(
4678 self, stmt, column, populate_result_map, column_clause_args=None, **kw

Callers 2

returning_clauseMethod · 0.80
visit_selectMethod · 0.80

Calls 2

ResultColumnsEntryClass · 0.85
appendMethod · 0.45

Tested by 1

visit_selectMethod · 0.64