async def editNodeNdef(self, oldv, newv):
        '''
        Migration-only method

        Notes:
            Precondition: buid cache must be disabled
        '''
        assert self.buidcache.disabled

        oldb = s_common.buid(oldv)
        newb = s_common.buid(newv)

        pvoldval = s_msgpack.en((oldb,))
        pvnewval = s_msgpack.en((newb,))

        oldfenc = oldv[0].encode() + b'\x00'
        newfenc = newv[0].encode() + b'\x00'

        newprel = b'*' + newv[0].encode()

        newnindx = self.core.model.prop(newv[0]).type.indx(newv[1])

        # avoid any potential iter/edit issues...
        todo = list(self.layrslab.scanByPref(oldb, db=self.bybuid))

        for lkey, lval in todo:

            proputf8 = lkey[32:]
            valu, indx = s_msgpack.un(lval)

            # for the *<form> prop, the byprop index has <form><00><00><indx>
            if proputf8[0] == 42:

                newpropkey = newfenc + b'\x00' + newnindx

                if indx is not None:
                    oldpropkey = oldfenc + b'\x00' + indx
                    if not self.layrslab.delete(oldpropkey, pvoldval, db=self.byprop): # pragma: no cover
                        logger.warning(f'editNodeNdef del byprop missing for {repr(oldv)} {repr(oldpropkey)}')

                self.layrslab.put(newpropkey, pvnewval, dupdata=True, db=self.byprop)

                byts = s_msgpack.en((newv[1], newnindx))
                self.layrslab.put(newb + newprel, byts, db=self.bybuid)

            else:

                # <prop><00><indx>
                propindx = proputf8 + b'\x00' + indx

                if proputf8[0] in (46, 35): # ".univ" or "#tag"
                    self.layrslab.put(propindx, pvnewval, dupdata=True, db=self.byuniv)
                    self.layrslab.delete(propindx, pvoldval, db=self.byuniv)

                oldpropkey = oldfenc + propindx
                newpropkey = newfenc + propindx

                if not self.layrslab.delete(oldpropkey, pvoldval, db=self.byprop): # pragma: no cover
                    logger.warning(f'editNodeNdef del byprop missing for {repr(oldv)} {repr(oldpropkey)}')

                self.layrslab.put(newpropkey, pvnewval, dupdata=True, db=self.byprop)
                self.layrslab.put(newb + proputf8, lval, db=self.bybuid)

            self.layrslab.delete(lkey, db=self.bybuid)
async def editNodeNdef ( self , oldv , newv ) : assert self . buidcache . disabled oldb = s_common . buid ( oldv ) newb = s_common . buid ( newv ) pvoldval = s_msgpack . en ( ( oldb , ) ) pvnewval = s_msgpack . en ( ( newb , ) ) oldfenc = oldv [ 0 ] . encode ( ) + b'\x00' newfenc = newv [ 0 ] . encode ( ) + b'\x00' newprel = b'*' + newv [ 0 ] . encode ( ) newnindx = self . core . model . prop ( newv [ 0 ] ) . type . indx ( newv [ 1 ] ) todo = list ( self . layrslab . scanByPref ( oldb , db = self . bybuid ) ) for lkey , lval in todo : proputf8 = lkey [ 32 : ] valu , indx = s_msgpack . un ( lval ) if proputf8 [ 0 ] == 42 : newpropkey = newfenc + b'\x00' + newnindx if indx is not None : oldpropkey = oldfenc + b'\x00' + indx if not self . layrslab . delete ( oldpropkey , pvoldval , db = self . byprop ) : logger . warning ( f'editNodeNdef del byprop missing for {repr(oldv)} {repr(oldpropkey)}' ) self . layrslab . put ( newpropkey , pvnewval , dupdata = True , db = self . byprop ) byts = s_msgpack . en ( ( newv [ 1 ] , newnindx ) ) self . layrslab . put ( newb + newprel , byts , db = self . bybuid ) else : propindx = proputf8 + b'\x00' + indx if proputf8 [ 0 ] in ( 46 , 35 ) : self . layrslab . put ( propindx , pvnewval , dupdata = True , db = self . byuniv ) self . layrslab . delete ( propindx , pvoldval , db = self . byuniv ) oldpropkey = oldfenc + propindx newpropkey = newfenc + propindx if not self . layrslab . delete ( oldpropkey , pvoldval , db = self . byprop ) : logger . warning ( f'editNodeNdef del byprop missing for {repr(oldv)} {repr(oldpropkey)}' ) self . layrslab . put ( newpropkey , pvnewval , dupdata = True , db = self . byprop ) self . layrslab . put ( newb + proputf8 , lval , db = self . bybuid ) self . layrslab . delete ( lkey , db = self . bybuid )
Migration-only method

        Notes:
            Precondition: buid cache must be disabled