• 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: Oracle and Sorting Null Values - everyone thinks different - everyone is correct
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Oracle and Sorting Null Values - everyone thinks different - everyone is correct


  • Subject: Re: Oracle and Sorting Null Values - everyone thinks different - everyone is correct
  • From: Ray Kiddy <email@hidden>
  • Date: Mon, 11 Jan 2010 11:53:55 -0800


On Jan 11, 2010, at 9:23 AM, David Avendasora wrote:

Hi Aaron!

On Jan 11, 2010, at 10:29 AM, email@hidden wrote:

In summary, it doesn't matter if you "fix" the DB or you fix the in-memory sorting as we have done. What matters is that you realize there can be differences and you have full control over how you want sorting to work no matter what DB you use. 

I agree completely. Sorting nulls isn't technically valid in the first place but in practical terms you need to do something with them. Since we have conflicting needs, I think we should come up with a property that will define how nulls are sorted so that both your solution and a DB-specific one (if available) are triggered based on the preference.

something along the lines of: nullSortOrdering=first/last

What do you think?

Based on your email, I will update the Jira PATCH ticket I submitted to hold off on applying it so we can better address this.

Dave
_______________________________________________

It definitely makes sense to use a property here. We should be explicit, though, about a few edges.

- If the property is not set, does the memory sorting behavior automatically inherit the default behavior of the database? Presumably yes.

- If the property is set and the default behavior of the database is different than the property and there is no way to tell the database to switch the behavior (such as when an adaptor or driver does not read a connection dictionary value for this), does the code just warn, or throw an exception?

JDBC does require the DatabaseMetaData object to implement a nullsAreSortedHigh() and nullsAreSortedLow() method, but the spec does not actually say anything about them. For example, we could assume that the values returned from the two methods are different from each other and constant for the life of a connection, but the spec does not say that. And we have data sources that are not JDBC. We should at least be specific about what should happen with an uncooperative data source.

cheers - ray

 _______________________________________________
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

References: 
 >Oracle and Sorting Null Values - everyone thinks different - everyone is correct (From: email@hidden)
 >Re: Oracle and Sorting Null Values - everyone thinks different - everyone is correct (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: WO 5.4.3 vs WO 5.3.3
  • Next by Date: Re: WO 5.4.3 vs WO 5.3.3
  • Previous by thread: Re: Oracle and Sorting Null Values - everyone thinks different - everyone is correct
  • Next by thread: Re: Oracle and Sorting Null Values - everyone thinks different - everyone is correct
  • Index(es):
    • Date
    • Thread