def get_component_by_name( app, name ):
    """Get a component from the database via a name."""
    sa_session = app.model.context.current
    return sa_session.query( app.model.Component ) \
                     .filter( app.model.Component.table.c.name == name ) \
                     .first()