Delete a signed in entry.

    :param entry: `models.Entry` object. The entry to delete.
    :param session: (optional) SQLAlchemy session through which to access the database.
337535
def undo_sign_in(entry, session=None):
     # noqa
    if session is None:
        session = Session()
    else:
        session = session

    entry_to_delete = (
        session
        .query(Entry)
        .filter(Entry.uuid == entry.uuid)
        .one_or_none()
    )

    if entry_to_delete:
        logger.info('Undo sign in: {}'.format(entry_to_delete.user_id))
        logger.debug('Undo sign in: {}'.format(entry_to_delete))
        session.delete(entry_to_delete)
        session.commit()
    else:
        error_message = 'Entry not found: {}'.format(entry)
        logger.error(error_message)
        raise ValueError(error_message)
638732
def delete(self, session_key=None):
        

        if session_key is None:
            if self.session_key is None:
                return
            session_key = self.session_key

        self.table.delete_item(Key={'session_key': session_key})
286708
def delete(uid)
      @modified_entries.delete(uid)

      index = uid % @size
      if (object = @unmodified_entries[index]) && object.uid == uid
        @unmodified_entries[index] = nil
      end
    end
370948
public void remove(Entry entry) {
        entry.priority = null;
        cutAndMakeRoot(entry);
        oMinEntry = entry;
        poll();
    }
618902
void reset(OperationEntry<?> entry, ServerSessionContext session, long timestamp) {
    if (references.compareAndSet(0, 1)) {
      this.index = entry.getIndex();
      this.session = session;
      this.instant = Instant.ofEpochMilli(timestamp);
      this.operation = entry.getOperation();
      session.acquire();
      references.set(1);
    } else {
      throw new IllegalStateException("Cannot recycle commit with " + references.get() + " references");
    }
  }
1254928
public function deleteAction()
    {
        try {
            $stack = $this->_initStackInstance();
            if ($stack) {
                $stack->delete();
                $this->_getSession()->addSuccess( $this->__( 'The entry has been deleted.' ) );
            }
        } catch (Exception $e) {
            $this->_getSession()->addError($e->getMessage());
        }

        $this->_redirect('*/*/');
    }
607494
def delete(self, query):
        

        record = self.get(query=query).one()

        self._url = self._url_builder.get_appended_custom("/{0}".format(record['sys_id']))
        return self._get_response('DELETE').one()
96250
def key?(key)
      if @entries.key?(key) && (@entries[key].nil? || @entries[key].expired?)
        self.delete(key)
      end
      @entries.key?(key)
    end
735999
def delete_model(self, model):
        """"""
        if SessionActivity.is_current(sid_s=model.sid_s):
            flash('You could not remove your current session', 'error')
            return
        delete_session(sid_s=model.sid_s)
        db.session.commit()
344558
def remove_entry(self, **field_value):
        
        field, value = next(iter(field_value.items()))
        self.data['entries'][:] = [entry
            for entry in self.data.get('entries')
            if entry.get('{}_entry'.format(self.typeof))
            .get(field) != str(value)]
800030
def delete(ctx, query, force):
    

    ensure_validated(ctx)
    controller = ctx.obj['controller']
    creds = controller.list()
    hits = _search(creds, query)
    if len(hits) == 0:
        click.echo('No matches, nothing to be done.')
    elif len(hits) == 1:
        cred = hits[0]
        if force or (click.confirm(
                u'Delete credential: {} ?'.format(cred.printable_key),
                default=False, err=True
        )):
            controller.delete(cred)
            click.echo(u'Deleted {}.'.format(cred.printable_key))
        else:
            click.echo('Deletion aborted by user.')

    else:
        _error_multiple_hits(ctx, hits)
300335
def delete(access_key):
    
    with Session() as session:
        try:
            data = session.KeyPair.delete(access_key)
        except Exception as e:
            print_error(e)
            sys.exit(1)
        if not data['ok']:
            print_fail('KeyPair deletion has failed: {0}'.format(data['msg']))
            sys.exit(1)
        print('Key pair is deleted: ' + access_key + '.')
1312970
def delete(self, *, auto_commit=False):
        
        try:
            db.session.delete(self.resource)
            if auto_commit:
                db.session.commit()
        except SQLAlchemyError:
            self.log.exception('Failed deleting resource: {}'.format(self.id))
            db.session.rollback()
855466
public synchronized void remove(Entry entry)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "remove", new Object[] { entry });

    super.remove(entry);
    DestinationHandler dh = (DestinationHandler) entry.data;
    if(dh.isMQLink()) removeFromMQLinkIndex(dh);
    DestinationEntry destEntry = (DestinationEntry) nameIndex.get(dh.getName());
    if(destEntry == entry)
    {
      nameIndex.remove(dh.getName());
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "remove");
  }
600119
def delete(self, main_type, sub_type, unique_id, owner=None):
        
        params = {'owner': owner} if owner else {}
        if not sub_type:
            url = '/v2/{}/{}'.format(main_type, unique_id)
        else:
            url = '/v2/{}/{}/{}'.format(main_type, sub_type, unique_id)
        return self.tcex.session.delete(url, params=params)
455159
def _delete(self, identifier=None):
        
        query = text("""
            DELETE FROM identifier_index
            WHERE identifier = :identifier;
        """)
        self.backend.library.database.connection.execute(query, identifier=identifier)
231784
def delete(self):
        
        try:
            if self.exists() is False:
                return None
            self.db.session.delete(self)
            self.db.session.commit()
        except (Exception, BaseException) as error:
            # fail silently
            return None