4 messages in com.mysql.lists.ndb-connectorsRe: selectCount location
FromSent OnAttachments
Monty Taylor27 Apr 2008 21:14 
David Shrewsbury28 Apr 2008 06:56 
Jonas Oreland28 Apr 2008 07:08 
Monty Taylor28 Apr 2008 08:04 
Subject:Re: selectCount location
From:Monty Taylor (mtay@mysql.com)
Date:04/28/2008 08:04:33 AM
List:com.mysql.lists.ndb-connectors

Jonas Oreland wrote:

Monty Taylor wrote:

Hey all,

The selectCount method is currently on NdbTransaction. However, it is a self-contained method and can't be contained with other operations... so I'm thinking it should move to either Ndb or to NdbDictionary::Table.

Any opinions?

if you keep it on NdbTransaction, you can add the feature that it counts no of
inserts/deletes the own transaction has made (like we do in mysqld)

Hrm. That's a good idea. I think I agree with both of you though. So ...

Move the current selectCount to be a method of Table, then make a new method, getCountOperation, which will add the appropriate count operation to a transaction and return a ResultSet.