Not sure if this has been asked before, but in the SQLAlchemy docs they talk about introducing select() as part of the new 2.0 style for the ORM.
Previously (1.x style), the query() method were used to fetch data.
What is the difference between these two?
For example, for querying a Users table for a user with email and name we can do something as followed in Query API:
session.query(Users).filter_by(name='name', email='mail@example.com').first()
In Select API, the same leads to more code:
from sqlalchemy import select
query = select(Users).filter_by(name='name', email='mail@example.com')
user = session.execute(query).fetchone()
Is there any significant advantage of using one compared to other, for example, a performance boost? 2.0 API is still in active development yet it seems like their documentation is favoring the select API more than the "legacy" query API. Is this merely attempting to bridge the gap between the ORM and Core functionalities?