From: Kevin D. <ke...@tr...> - 2006-01-16 22:03:50
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <STYLE type=text/css> P, UL, OL, DL, DIR, MENU, PRE { margin: 0 auto;}</STYLE> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY leftMargin=1 topMargin=1 rightMargin=1><FONT face=Tahoma size=2> <DIV><FONT face=Arial>I wanted to follow up on something Bryan mentioned last week: Right now, there is no way to delete a BTree. You can delete the root, but that won't delete any of the pages...</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>I have an immediate need for doing this kind of deletion in my application, and I'm wondering if you guys have any preferences on how to add this...</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>Here is what I'm thinking about doing:</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>1. Add an instance method delete() to BTree</FONT></DIV> <DIV><FONT face=Arial>2. Add an instance method delete() to BPage</FONT></DIV> <DIV><FONT face=Arial>3. Have BTree call delete on all of it's children recursively, then delete itself</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>The recman will be assocaited with the BTree already (via the statis load() method), so I don't think we need to pass that in again.</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>Does anyone have any objections to the above strategy, or is there a better approach that I haven't thought of?</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>Thanks!</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>- K</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>Kevin Day<BR>Trumpet, Inc.<BR><A href="http://www.trumpetinc.com"><FONT color=#0000ff>www.trumpetinc.com</FONT></A><BR><A href="mailto:ke...@tr..."><FONT color=#0000ff>ke...@tr...</FONT></A><BR>602-438-7030</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV></FONT></BODY></HTML> |