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

Issue #1730 closed
Mike Bayer repo owner created an issue

No description provided.

Comments (6)

  1. Mike 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. Mike Bayer reporter
    • changed milestone to 0.7.0

    putting this on the 0.7.0 milestone as this is a big, easy, tedious, educational job for pycon sprinters

  3. Log in to comment