Add own status
and remove isXX()
methods
#726
Labels
semver-major
Changes that break backward compatibility
status
and remove isXX()
methods
#726
Follow-up for TODO comments added in #725. Since that PR, the
levelup
interface has astatus
property the same asabstract-leveldown
. It returnsthis.db.status
.Ideally
levelup
has its ownstatus
that is tracked separately from the underlyingdb
. That wayopen
events and externally seen status will be consistent. E.g. if the underlyingdb.status
is initially 'open' (rather than 'new'), thelevelup
status should nevertheless be 'new', and the two states will "consolidate" uponopen()
.For API parity (Level/community#58) and simplicity, we should also prefer using
db.status
over these 3 utility methods:isOpen()
,_isOpening()
andisClosed()
. Be aware thatsubleveldown
uses those atm. Keep theisOperational()
utility method because that expresses something different: whether operations can be made on the db regardless of itsstatus
.The text was updated successfully, but these errors were encountered: