Did I find the right examples for you? yes no

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/t/u/tuskar-0.4.1/tuskar/db/sqlalchemy/api.py   tuskar(Download)
    """
 
    session = kwargs.get('session') or db_session.get_session()
    query = session.query(model, *args)
    return query
 
 
def get_session():
    return db_session.get_session(sqlite_fk=True)

src/t/u/tuskar-0.4.1/tuskar/openstack/common/db/sqlalchemy/models.py   tuskar(Download)
from sqlalchemy.orm import object_mapper
 
from tuskar.openstack.common.db.sqlalchemy.session import get_session
from tuskar.openstack.common import timeutils
 
    def save(self, session=None):
        """Save this object."""
        if not session:
            session = get_session()
        # NOTE(boris-42): This part of code should be look like:

src/t/u/tuskar-HEAD/tuskar/openstack/common/db/sqlalchemy/models.py   tuskar(Download)
from sqlalchemy.orm import object_mapper
 
from tuskar.openstack.common.db.sqlalchemy.session import get_session
from tuskar.openstack.common import timeutils
 
    def save(self, session=None):
        """Save this object."""
        if not session:
            session = get_session()
        # NOTE(boris-42): This part of code should be look like: