add examples to docstrings for every function in sqlalchemy.sql, every method in sqlalchemy.orm.Query

Issue #1730 closed
Michael Bayer
repo owner created an issue

No description provided.

Comments (6)

  1. Michael Bayer reporter

    Just a simple example, i.e.::

    select_from(*from_obj)¶
    
        Set the from_obj parameter of the query and 
         return the newly resulting Query. This replaces
        the table which this Query selects from with the given table.
    
        select_from() also accepts class arguments. Though usually 
        not necessary, can ensure that the full selectable of the 
        given mapper is applied, e.g. for joined-table mappers.
    
        Examples::
    
             session.query(func.count('*')).select_from(Employee)
    
             session.query(user.c.id, addresses.c.email).select_from(users.join(addresses))
    
  2. Log in to comment