Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: SQL Parsing with Parse::RecDescent

by DACONTI (Scribe)
on Mar 05, 2008 at 15:57 UTC ( [id://672202]=note: print w/replies, xml ) Need Help??


in reply to Re^3: SQL Parsing with Parse::RecDescent
in thread SQL Parsing with Parse::RecDescent

Hi moritz
You only need one row per table to be able to log many of the SQL statements.
And thats already a difficulty if your sql query is 3-4 pages long.
Of course you can do the job manually by adding here and there in the tables proper values by hand, but this approach is tedious and it can take hours just to fill a few rows.
Saluti, Davide
  • Comment on Re^4: SQL Parsing with Parse::RecDescent

Replies are listed 'Best First'.
Re^5: SQL Parsing with Parse::RecDescent
by Anonymous Monk on Mar 06, 2008 at 09:11 UTC
    You only have to generate a sample dataset once
      Thanks for your advices
      but I think it is difficult for you to understand the motivation behind.
      Please stop digging into this.
      Thanks to moritz, however I think I got it.
      He said:

      I just think that "blind" searching in source code for SQL statements will not work reliably, it will have both many false positives and false negatvies.

      BUT THAT'S EXACTLY THE POINT: WHY SHOULD IT WORK RELIABLY?
      I dont need to have exact matches for each data row:
      for testing its even better if I got negative as well as positive matches.
      That's exactly boundary testing, and I get it for free!
      So today I reprogrammed my RD engine to take only expressions of this kind:
      - column = 'value' (or whatever other operator)
      - column1 = column2
      In my context I dont even want to find out the correspondig table
      because I will insert the value in all the tables having this column.
      I already modified my parser and detected successfully a lot of values in a huge query.
      I'll try to publish the program in my scratchpad
      (but first I've to ask because I'm working in a bank).


      PERLMONKS IS GREAT!

      Ciao!
      Davide.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://672202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found