• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Derived Column for Oracle Queries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Derived Column for Oracle Queries


  • Subject: Re: Derived Column for Oracle Queries
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 25 Feb 2013 11:50:33 -0800

My first guess is that you would need to subclass and extend OracleExpression (from the Oracle plugin in JavaJDBCAdaptor).

Chuck


On 2013-02-25, at 11:34 AM, Frank C wrote:

> I have implemented several custom EOQualifiers for Oracle. Some for text searches and some for spatial searches. The queries work fine for what they do, however, I have been unable to take advantage of some of the Oracle features.
>
> When you perform these searches in Oracle you can assign a number to the query that allows you to perform operations on that query. As an example, when you do a full text search using the "CONTAINS" function, I can assign a number to the contains clause. I can then use the "SCORE" function to get the relevancy score for that contains clause.
>
> An Example:
>
> select SCORE(1) from Foo t0 where CONTAINS(t0.description, 'bar', 1) > 0 order by SCORE(1) desc;
>
> As you can see above I can use the "SCORE" function to both get the relevancy score in the column results and to order the results and put the most relevant results first. I could even add a second CONTAINS and label it "2" and then use "SCORE(2)." There are similar functions for Spatial queries as well.
>
> There are a couple of problems I do not know how to solve in WebObjects:
>
> 1) When my custom qualifier is generating the SQL, is there a way for it to insert the function into the select list and/or into the ORDER BY clause. Or is there a way to add a function column or ORDER BY clause that can peek into the qualifiers to see if there is a matching qualifier?
>
> 2) If I can accomplish #1, is there anyway for the qualifiers to know how many qualifiers are in the fetch specification so that I can make sure the multiple qualifiers do not use the same identifier.
>
> 3) If I can accomplish #1 and/or #2, how can I build a fetch on a table that brings back the extra column from the select (i.e. SCORE(1)).
>
> Thanks,
> Frank
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

--
Chuck Hill
Executive Managing Partner, VP Development and Technical Services

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!












 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Derived Column for Oracle Queries
      • From: Ramsey Gurley <email@hidden>
References: 
 >Derived Column for Oracle Queries (From: Frank C <email@hidden>)

  • Prev by Date: Derived Column for Oracle Queries
  • Next by Date: Re: ERJGroupsSynchronizer Configuration Question
  • Previous by thread: Derived Column for Oracle Queries
  • Next by thread: Re: Derived Column for Oracle Queries
  • Index(es):
    • Date
    • Thread