@db.api_context_manager.reader
def _get_build_requests_with_no_instance_uuid(context, limit):
 return context.session.query(api_models.BuildRequest).filter_by(instance_uuid=null()).limit(limit).all()

@ db . api_context_manager . reader def _get_build_requests_with_no_instance_uuid ( context , limit ) : return context . session . query ( api_models . BuildRequest ) . filter_by ( instance_uuid = null ( ) ) . limit ( limit ) . all ( )
returns up to $limit build_requests where instance_uuid is null .