from ..sql.base import _generative
from ..sql.base import HasMemoized
from ..sql.base import InPlaceGenerative
+from ..util import deprecated
from ..util import HasMemoized_ro_memoized_attribute
from ..util import NONE_SET
from ..util._has_cy import HAS_CYEXTENSION
return MappingResult(self)
@property
+ @deprecated(
+ "2.1.0",
+ "The :attr:`.Result.t` method is deprecated, :class:`.Row` "
+ "now behaves like a tuple and can unpack types directly.",
+ )
def t(self) -> TupleResult[Tuple[Unpack[_Ts]]]:
"""Apply a "typed tuple" typing filter to returned rows.
"""
return self # type: ignore
+ @deprecated(
+ "2.1.0",
+ "The :method:`.Result.tuples` method is deprecated, :class:`.Row` "
+ "now behaves like a tuple and can unpack types directly.",
+ )
def tuples(self) -> TupleResult[Tuple[Unpack[_Ts]]]:
"""Apply a "typed tuple" typing filter to returned rows.
def __delattr__(self, name: str) -> NoReturn:
raise AttributeError("can't delete attribute")
+ @deprecated(
+ "2.1.0",
+ "The :meth:`.Row._tuple` method is deprecated, :class:`.Row` "
+ "now behaves like a tuple and can unpack types directly.",
+ )
def _tuple(self) -> Tuple[Unpack[_Ts]]:
"""Return a 'tuple' form of this :class:`.Row`.
return self._tuple()
@property
+ @deprecated(
+ "2.1.0",
+ "The :attr:`.Row._t` attribute is deprecated, :class:`.Row` "
+ "now behaves like a tuple and can unpack types directly.",
+ )
def _t(self) -> Tuple[Unpack[_Ts]]:
"""A synonym for :meth:`.Row._tuple`.
from ...engine.row import Row
from ...engine.row import RowMapping
from ...sql.base import _generative
+from ...util import deprecated
from ...util.concurrency import greenlet_spawn
from ...util.typing import Literal
from ...util.typing import Self
)
@property
+ @deprecated(
+ "2.1.0",
+ "The :attr:`.AsyncResult.t` attribute is deprecated, :class:`.Row` "
+ "now behaves like a tuple and can unpack types directly.",
+ )
def t(self) -> AsyncTupleResult[Tuple[Unpack[_Ts]]]:
"""Apply a "typed tuple" typing filter to returned rows.
"""
return self # type: ignore
+ @deprecated(
+ "2.1.0",
+ "The :method:`.AsyncResult.tuples` method is deprecated, "
+ ":class:`.Row` now behaves like a tuple and can unpack types "
+ "directly.",
+ )
def tuples(self) -> AsyncTupleResult[Tuple[Unpack[_Ts]]]:
"""Apply a "typed tuple" typing filter to returned rows.
from ..sql.selectable import HasSuffixes
from ..sql.selectable import LABEL_STYLE_TABLENAME_PLUS_COL
from ..sql.selectable import SelectLabelStyle
+from ..util import deprecated
from ..util.typing import Literal
from ..util.typing import Self
from ..util.typing import TypeVarTuple
for ent in util.to_list(entities)
]
+ @deprecated(
+ "2.1.0",
+ "The :method:`.Query.tuples` method is deprecated, :class:`.Row` "
+ "now behaves like a tuple and can unpack types directly.",
+ )
def tuples(self: Query[_O]) -> Query[Tuple[_O]]:
"""return a tuple-typed form of this :class:`.Query`.