Exit the current table, by inserting a default block after the table.
766081
function onModEnter(
    event: *,
    change: Change,
    editor: *,
    opts: Options
): void | Change {
    const { value } = change;
    if (!value.isCollapsed) {
        return undefined;
    }

    event.preventDefault();

    const exitBlock = Block.create({
        type: opts.exitBlockType,
        nodes: [Text.create('')]
    });

    const table = TablePosition.create(opts, value.document, value.startKey)
        .table;
    const tableParent = value.document.getParent(table.key);
    const insertionIndex = tableParent.nodes.indexOf(table) + 1;

    return change
        .insertNodeByKey(tableParent.key, insertionIndex, exitBlock)
        .collapseToStartOf(exitBlock);
}
546256
def insert(self, table, value, ignore=False, commit=True):
        
        value_q, _args = self._value_parser(value, columnname=False)
        _sql = ''.join(['INSERT', ' IGNORE' if ignore else '', ' INTO ', self._backtick(table),
                        ' (', self._backtick_columns(value), ') VALUES (', value_q, ');'])

        if self.debug:
            return self.cur.mogrify(_sql, _args)

        self.cur.execute(_sql, _args)
        if commit:
            self.conn.commit()
        return self.cur.lastrowid
595840
@Override
  public void exitScope(NodeTraversal t) {
    if (t.isHoistScope()) {
      pop(blockStack);
    }
    behavior.afterExitScope(t, new ReferenceMapWrapper(referenceMap));
  }
615828
function () {
    const oThis = this
    ;

    oThis.snmData.lastProcessedBlock = oThis.toBlock;

    fs.writeFileSync(
      oThis.filePath,
      JSON.stringify(oThis.snmData),
      function (err) {
        if (err)
          logger.error(err);
      }
    );

    if (oThis.interruptSignalObtained) {
      logger.info('Exiting Process....');
      process.exit(1);
    }
  }
715195
def add_after(self):
        """"""
        idx = self._container.structure.index(self)
        return BlockBuilder(self._container, idx+1)
175731
def clear(self, startBlock, endBlock):
        
        for block in qutepart.iterateBlocksFrom(startBlock):
            self._setBlockMarked(block, False)
            if block == endBlock:
                break
1113360
def flush(self, table):
        '''
        
        '''
        table_path = os.path.join(self.db_path, table)
        if os.path.exists(table_path):
            os.unlink(table_path)
574049
def drop(self, table):
        
        blueprint = self._create_blueprint(table)

        blueprint.drop()

        self._build(blueprint)
1228178
def OnInsertTabs(self, event):
        """"""

        with undo.group(_("Insert table")):
            self.grid.actions.insert_tabs(self.grid.current_table - 1, 1)

        self.grid.GetTable().ResetView()
        self.grid.actions.zoom()

        event.Skip()
843822
def insert_block(position, anchor_block, new_block)
      case position
      when :before
        anchor_block.xml.previous_sibling = new_block.xml
      when :after
        anchor_block.xml.next_sibling = new_block.xml
      else
        raise "position argument must be one of :before, :after"
      end
    end
194748
public void doRemove() throws DBException
    {
        try   {
            synchronized (this.getSyncObject())
            {   // In case this is called from another task
                m_tableRemote.remove(null, this.getRecord().getOpenMode());
            }
        } catch (Exception ex) {
            throw DatabaseException.toDatabaseException(ex);
        }
    }
700491
function onTab(
    event: *,
    change: Change,
    editor: *,
    opts: Options
): void | Change {
    event.preventDefault();
    const { value } = change;
    const direction = event.shiftKey ? -1 : +1;

    // Create new row if needed
    const { startKey, selection } = value;
    const pos = TablePosition.create(opts, value.document, startKey);
    if (pos.isFirstCell() && direction === -1) {
        insertRow(opts, change, 0);
    } else if (pos.isLastCell() && direction === 1) {
        insertRow(opts, change);
    }

    // Move back to initial cell (insertRow moves selection automatically).
    change.select(selection);

    // Move
    moveSelectionBy(opts, change, direction, 0);

    // Select all cell.
    return selectAllText(change);
}
100629
void abort() throws SQLException {
        if (mRegisteredLobs != null) {
            for (JDBCLob lob : mRegisteredLobs) {
                lob.close();
            }
            mRegisteredLobs = null;
        }

        if (mIsNested) {
            if (mReady) {
                if (mSavepoint != null) {
                    mConnection.rollback(mSavepoint);
                    mSavepoint = null;
                }
                mReady = false;
            }

            if (mOriginalLevel != LEVEL_NOT_CHANGED) {
                if (mOriginalLevel == Connection.TRANSACTION_NONE) {
                    mConnection.setAutoCommit(true);
                } else {
                    mConnection.setTransactionIsolation(mOriginalLevel);
                }
            }

        } else {
            if (mReady) {
                mConnection.rollback();
                mReady = false;
            }
        }
    }
930915
public function down()
    {
        $table = $this->table('menus');
        $table->addColumn('name', 'string', ['limit' => 255, 'null' => false])
            ->addColumn('menu_item_count', 'integer', ['default' => 0, 'null' => false])
            ->addColumn('created', 'datetime', ['null' => false, 'default' => 'CURRENT_TIMESTAMP'])
            ->addColumn('modified', 'datetime', ['null' => false, 'default' => 'CURRENT_TIMESTAMP']);
        $table->addIndex('name', ['name' => 'BY_NAME', 'unique' => false]);
        $table->create();

        $this->unsignedIntId($table);
        $table->save();
    }
548006
private void firstInnerTableStart(Options opt) {
	w.print(linePrefix + linePrefix + "<tr>" + opt.shape.extraColumn() +
		"<td><table border=\"0\" cellspacing=\"0\" " +
		"cellpadding=\"1\">" + linePostfix);
    }
869596
public function down()
    {
        // Check if the 2 tables exist
        if (Schema::hasTable('tags') && Schema::hasTable('taggables')) {
            if (! Schema::hasColumn('tags', 'tagable_id') && ! Schema::hasColumn('tags', 'tagable_type')) {
                Schema::table('tags', function($table) {
                    $table->integer('tagable_id')->default(1);
                    $table->string('tagable_type', 32)->default('type');
                });
                $tags = DB::table('tags')->get();
                foreach ($tags as $tag) {
                    $tagable = DB::table('taggables')->where('tag_id', '=', $tag->id)->first();
                    if ($tagable) {
                        // Points to old namespace Redooor\\Redminportal\\
                        $old_type_array = explode('\\', $tagable->taggable_type);
                        $last_model = array_pop($old_type_array);
                        $old_type = 'Redooor\\Redminportal\\' . $last_model;
                        DB::table('tags')
                            ->where('id', $tag->id)
                            ->update([
                                'tagable_id' => $tagable->taggable_id,
                                'tagable_type' => $old_type
                            ]);
                    }
                }
            }
        }
    }
401779
bbBlock truncate(Object caller, int version, int pos) {
        assert mutation_in_progress(caller, version);
        if (0 > pos || pos > this._buf_limit )
            throw new IllegalArgumentException();
        // clear out all the blocks in use from the last in use
        // to the block where the eof will be located
        bbBlock b = null;
        for (int idx = this._next_block_position - 1; idx >= 0; idx--) {
            b = this._blocks.get(idx);
            if (b._offset <= pos) break;
            b.clearBlock();
        }
        if (b == null) {
            throw new IllegalStateException("block missing at position "+pos);
        }
        // reset the next block position to account for this.
        this._next_block_position = b._idx + 1;
        // on the block where eof is, set it's limit appropriately
        b._limit = pos - b._offset;
        // set the overall buffer limits
        this._buf_limit = pos;
        b = this.findBlockForRead(pos, version, b, pos);
        return b;
    }