Loading ...
Sorry, an error occurred while loading the content.

programatically access and rewrite select-statement

Expand Messages
  • Christian Dreier
    Hi Ron! I need to make sure that for EVERY SELECTED DATABASE-TUPLE the PRIMARY KEY is selected during the publishing process. (This is just a requirement of
    Message 1 of 2 , Feb 11 11:11 AM
    • 0 Attachment
      Hi Ron!



      I need to make sure that for EVERY SELECTED DATABASE-TUPLE the PRIMARY KEY
      is selected during the publishing process. (This is just a requirement of
      the application I'm developing,...)

      I can't trust that it is selected with the mapping and filters written by
      the users. (Again because of some reasons within my application domain.)

      So I want to assure it programatically. Now I'm wondering if this is
      possible. I assume that I could manage it, if I had access to the
      user-generated or DBMS-generated (in case of usage of ResultSetInfo) Select
      statement. (I know that always have access to the user-generated Select
      statement...)

      Could you tell me if I can get out the Select-Statement generated by the
      XML-DBMS (I think that this is just in case of ResultSetInfo, isn't it?)? If
      I get it, I could change it before the publishing is done.

      It would be great if you could give me any hints where to find the
      code-section where I access this Select-statement before the publishing is
      done.

      It would be a great help, because it would save me from looking through all
      the thousands lines of code...



      Thanks very much in advance



      BR Christian

















      [Non-text portions of this message have been removed]
    • Ronald Bourret
      Before I try to answer this question, which has several possible answers, could you explain your application architecture? In particular, I need to know where
      Message 2 of 2 , Feb 15 11:17 PM
      • 0 Attachment
        Before I try to answer this question, which has several possible
        answers, could you explain your application architecture? In particular,
        I need to know where XML-DBMS fits into things and how you are calling it.

        For example, do you distribute a copy of the xmldbms20 jar to everybody
        and have them call Transfer from the command line? Did you write an
        application that calls DBMSToDOM directly and have people submit maps
        and filters through a Web site? etc.

        Also, I assume that you want the primary key to be published to the XML
        document? You don't actually say this.

        (A short answer is that you can intercept SELECT statements in the
        DataHandler, but I don't think that does you much good. Even if you
        modify them to include the primary key, DBMSToDOM will ignore this
        column, since it isn't in the map. Other problems are that you will be
        basing your choice of primary key on the map document, which is
        perfectly welcome to lie, so this also depends on how much you trust
        your users. Finally, none of this does any good if people submit result
        sets programmatically or SELECT statements through Transfer, since no
        primary key information will be in the map file in these cases.)

        -- Ron

        Christian Dreier wrote:

        > I need to make sure that for EVERY SELECTED DATABASE-TUPLE the PRIMARY KEY
        > is selected during the publishing process. (This is just a requirement of
        > the application I'm developing,...)
        >
        > I can't trust that it is selected with the mapping and filters written by
        > the users. (Again because of some reasons within my application domain.)
        >
        > So I want to assure it programatically. Now I'm wondering if this is
        > possible. I assume that I could manage it, if I had access to the
        > user-generated or DBMS-generated (in case of usage of ResultSetInfo) Select
        > statement. (I know that always have access to the user-generated Select
        > statement...)
        >
        > Could you tell me if I can get out the Select-Statement generated by the
        > XML-DBMS (I think that this is just in case of ResultSetInfo, isn't it?)? If
        > I get it, I could change it before the publishing is done.
        >
        > It would be great if you could give me any hints where to find the
        > code-section where I access this Select-statement before the publishing is
        > done.
        >
        > It would be a great help, because it would save me from looking through all
        > the thousands lines of code...
      Your message has been successfully submitted and would be delivered to recipients shortly.