• 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
[SOLVED] rawRowsForSQL key to uppercase, a bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] rawRowsForSQL key to uppercase, a bug?


  • Subject: [SOLVED] rawRowsForSQL key to uppercase, a bug?
  • From: Lon Baker <email@hidden>
  • Date: Tue, 2 Nov 2004 15:33:21 -0500

Thanks to everyone who answered my questions. I found a solution that is working for me temporarily.

The challenge I had was that I am doing some dynamic Qualifier generation in a shared workspace application. So the fetch qualifications can change between page refreshes significantly.

Here is my solution for now, I am using rawRows here. The long term issue being the depreciation of EOSQLQualifier which I did not find a solution for. This all happens in appendToResponse.

NSMutableArray qualArray = new NSMutableArray();
EODatabaseDataSource dataSource = (EODatabaseDataSource) messageDisplayGroup.dataSource();
dataSource.fetchSpecification().setFetchLimit(1000);


// Set user defined filter qualifiers else use defaults
// statusFilter is created using a pull down in the UI

if (filters.valueForKey("statusFilter") != null) {
qualArray.addObject(filters.valueForKey("statusFilter"));
qualArray.addObject(Qualifiers.getFeedQualifier(((Session) session()).userObject, ((Session) session()).currentFeed));
} else {
qualArray.addObject(Qualifiers.getMessageQualifier(((Session) session()).userObject, ((Session) session()).currentFeed));
}


// If a global search exists create full text sql qualifier

if (((Session) session()).searchString != null) {

EOEntity entity = EOUtilities.modelGroup(session().defaultEditingContext()).entityNamed("M essage");

EOSQLQualifier test = new EOSQLQualifier(entity,
"MATCH (messageRaw, messageSummary, messageHolder, messageSubject) AGAINST ('" +
((Session) session()).searchString + "')", null);

qualArray.addObject(test);


} else {

	// Else set sort ordering here. We do not set it when searching
	// to allow relevance of the search to the sort results

dataSource.fetchSpecification().setSortOrderings(
new NSArray(EOSortOrdering.sortOrderingWithKey("dateModified", EOSortOrdering.CompareDescending)));
}


// Insert our new qualifer for the fetch

dataSource.fetchSpecification().setQualifier(new EOAndQualifier(qualArray));

// Fetch rows

messageDisplayGroup.fetch();

// Store the count here to avoid redundant queries triggering due to WOConditional

messageCount = ((messageDisplayGroup != null) &&
	(messageDisplayGroup.allObjects() != null)) ?
		messageDisplayGroup.allObjects().count() : 0;

// Hack to handle deletions and other user changes which result in the
// WODisplayGroup leaving a user without any visible rows when deep in a group


if (messageDisplayGroup.currentBatchIndex() > messageDisplayGroup.batchCount()) {
messageDisplayGroup.setCurrentBatchIndex(messageDisplayGroup.batchCount( ));
}


--
Lon Baker

_______________________________________________
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: 
 >rawRowsForSQL key to uppercase, a bug? (From: Lon Baker <email@hidden>)
 >Re: rawRowsForSQL key to uppercase, a bug? (From: Lon Baker <email@hidden>)
 >Re: rawRowsForSQL key to uppercase, a bug? (From: David LeBer <email@hidden>)

  • Prev by Date: Re: WebObjects Update?
  • Next by Date: [SOLVED] rawRowsForSQL key to uppercase, a bug?
  • Previous by thread: Re: rawRowsForSQL key to uppercase, a bug?
  • Next by thread: [SOLVED] rawRowsForSQL key to uppercase, a bug?
  • Index(es):
    • Date
    • Thread