Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Breaking: remove Batch._levelup property
Browse files Browse the repository at this point in the history
In favor of Batch.db which matches the property on
abstract-leveldown's chained batch interface.

Unlikely to cause breakage because _levelup was a private and
undocumented property.
  • Loading branch information
vweevers committed Apr 17, 2021
1 parent 4b35716 commit cfce6bb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ const getCallback = require('./common').getCallback
const getOptions = require('./common').getOptions

function Batch (levelup) {
// TODO (next major): remove this._levelup alias
this.db = this._levelup = levelup
this.db = levelup
this.batch = levelup.db.batch()
this.ops = []
this.length = 0
Expand Down Expand Up @@ -53,7 +52,7 @@ Batch.prototype.clear = function () {
}

Batch.prototype.write = function (options, callback) {
const levelup = this._levelup
const levelup = this.db
const ops = this.ops

callback = getCallback(options, callback)
Expand Down

0 comments on commit cfce6bb

Please sign in to comment.