Dynamic queries

Locked
danielwang
Village Idiot
Joined: Fri May 03, 2002 12:17 am
Location: Denver, CO Banned: Several times!
Contact:
Org Profile

Dynamic queries

Post by danielwang » Fri Dec 12, 2003 8:27 pm

Just a suggestion, of course. I know you're far too busy.

Add a few methods to the form to allow for dynamic queries, PLSQL operators and object data, the Boolen basics would be nice. After boolean you can add dynamic queries and extensible user search stuff.

Or why not just give us direct access to Database so we can do this like this (pseudocode you can call it AMV Search Code)...

Users could type this into a big box, maximum query is 256 directives:




PLSQL method

Code: Select all

UNION SELECT * FROM VIDEOS WHERE video.anime INCLUDES "Tekkaman" AND SELECT * FROM VIDEOS WHERE video.anime INCLUDES "Gundam" MERGE video.author EQUALS "VicBond007" DROP video.author EQUALS "danielwang" OR video.music BEGINS "Nsync"
Proprietary Search Schema Method
P.S. I invented this schema so don't Google for it.

Code: Select all


// Gundam and Tekkaman action videos
// That don't SUCK SUCK SUCK (see subroutine)
// as well as VicBond007 Videos
// But any of them have to have 10 opinions

SELECT "videos"

SORT { 

   GROUP "groupone" { // First group

      SORT { // Get ANY Tekkaman and Gundam
         MERGE SORT // Same as UNION two SORT groups
            { video.anime.name .= "Tekkaman" // Includes Tekkaman
               & video.anime.name .= "Gundam" // Or Gundam
            } // End of merge sort
      } // End of sort

      JOIN SORT { // Get all of VicBond007's videos
         SORT { amv.author.cn == "VicBond007" // VicBond code
      } // End of sort

      DROP SORT { // Videos that SUCK SUCK SUCK!!!
         amv.author.name == "danielwang" } // MY VIDS!
      } // End dropping DANIELWANG'S SUCKY VIDEOS
        

   } // End groupone, write scratch to "groupone" group

   GROUP "grouptwo" { // Second group
      SORT { // Only 10 opinions or more
         SELECT "groupone" // Performance, search only groupone
         videos.opinions.count >= 10 // Must have 10 opinions
      } // End sort
   } // End group two

   SORT { "groupone" AND "grouptwo" } // Videos in both groups
      
ORDER { // Ordering algorithms programmed here maybe!
   ASCENDING ratings.average
}

END // End job, To allow for splitting queries into multiple jobs


User avatar
downwithpants
BIG PICTURE person
Joined: Tue Dec 03, 2002 1:28 am
Status: out of service
Location: storrs, ct
Org Profile

Post by downwithpants » Fri Dec 12, 2003 8:59 pm

you can add in a "-" in the search fields, which acts as at "not" operator
for example to find entering artists other than linkin park with the word park in their names you would enter "park -linkin" in the artist field.

an "or" operator would be nice though
maskandlayer()|My Guide to WMM 2.x
a-m-v.org Last.fm|<a href="http://www.frappr.com/animemusicvideosdotorg">Animemusicvideos.org Frappr</a>|<a href="http://tinyurl.com/2lryta"> Editors and fans against the misattribution of AMVs</a>

Locked

Return to “Site Help & Feedback”