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