You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by John Gentilin <jo...@eyecatching.com> on 2001/03/17 01:06:08 UTC

SQL Extension, Question about original design

Scott,

When you get a chance to look into this code again. Here is a
question I have about the initial design that you may be able to
answer. If anyone else knows, please feel free to join in.

In the Row.java class, there are two instance variables
m_IsStreamable and m_next.

In getNextSibling(),
  If m_IsStreamable is true the result set is just being walked
  hence you will only have a single instance of a row object.

  If m_IsStreamable is false, then m_next is populated with a
  new Row() object and m_Next is returned.  In this case, you
  are building a forward only linked list of Rows. Presumably
  so you can re-traverse the NodeList.

A problem that I see with case 2 is that if you don't actually try
to retrieve the ColumnData, it will not be extracted from the
record set since the record set is not read until getData instead
of the constructor. So a list of Rows are being built but no data
is being stored.

If we are to build a tree in non streamable mode, would it not be
better to store both a forward and reverse reference (m_next /m_prev)
so that we could support getPreviousSibling() ??

Should the default be IsStreamable == false ?? It is now.

IsStreamable should be controllable from the XConnection, any ideas
for a good mutator name streamableON(), streamableOFF()   ??

TIA
JohnG