MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / query

Method query

sqlmodel/orm/session.py:156–168  ·  view source on GitHub ↗

🚨 You probably want to use `session.exec()` instead of `session.query()`. `session.exec()` is SQLModel's own short version with increased type annotations. Or otherwise you might want to use `session.execute()` instead of `session.query()`.

(  # type: ignore
        self, *entities: _ColumnsClauseArgument[Any], **kwargs: Any
    )

Source from the content-addressed store, hash-verified

154 """
155 )
156 def query( # type: ignore
157 self, *entities: _ColumnsClauseArgument[Any], **kwargs: Any
158 ) -> _Query[Any]:
159 """
160 🚨 You probably want to use `session.exec()` instead of `session.query()`.
161
162 `session.exec()` is SQLModel's own short version with increased type
163 annotations.
164
165 Or otherwise you might want to use `session.execute()` instead of
166 `session.query()`.
167 """
168 return super().query(*entities, **kwargs)

Callers 1

test_queryFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_queryFunction · 0.64