QueryRunner interface

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Mar 14 2003 - 01:01:09 EST

  • Next message: Andriy Shapochka: "Re: QueryRunner interface"

    I mentioned this before... An addition of BatchInterpreter and
    StoredProcedures introduced the need to make query *execution*
    adapter-customizable in addition to customizable query *translation*.
    Here is a first draft of an interface that will do that (I plan to do
    this before Beta, since it is required for stored procedures
    customization). Basic algorithm of query execution by the DataNode will
    look like this:

    1. Ask adapter to create QueryTranslator
    2. Ask adapter to create QueryRunner
    3. Determine what method to invoke on the runner based on query type
    4. Invoke this method on the runner.

    Any thoughts?

    [Vaguely related to the message topic] Is anyone familiar with LDAP? I
    may need to implement this sometime soon (outside of 1.0 release first,
    to avoid additional delays). Since it does not use JDBC, I wonder how
    much refactoring will be required at the Node/Adapter level?

    Andrus

    public interface QueryRunner {

         public abstract void runSelect(
             DataNode node,
             QueryTranslator translator,
             OperationObserver delegate)
             throws Exception;

         public abstract void runIteratedSelect(
             DataNode node,
             QueryTranslator translator,
             OperationObserver delegate)
             throws Exception;

         public abstract void runUpdate(
             DataNode node,
             QueryTranslator translator,
             OperationObserver delegate)
             throws Exception;

         public abstract void runBatchUpdate(
             DataNode node,
             QueryTranslator translator,
             OperationObserver delegate)
             throws Exception;

         public abstract void runStoredProcedureUpdate(
             DataNode node,
             QueryTranslator translator,
             OperationObserver delegate)
             throws Exception;

         public abstract void runStoredProcedureSelect(
             DataNode node,
             QueryTranslator translator,
             OperationObserver delegate)
             throws Exception;

         public abstract void runStoredProcedureIteratedSelect(
             DataNode node,
             QueryTranslator translator,
             OperationObserver delegate)
             throws Exception;

    }



    This archive was generated by hypermail 2.0.0 : Fri Mar 14 2003 - 01:04:43 EST