Re: Defining the expected behavior of DatabaseStatements.execute()

Michael Koziarski
Thu, 18 Jan 2007 21:06:10 -0000

> It would be very helpful if the core team could define and document
> the expected behavior of DatabaseStatements.execute(). The
> implementations appear to vary. Most adapters will return some sort of
> native result set, SQL Server returns nil and expects a block, DB2 and
> Sybase return the affected row count.
>
> So please, will someone in core explain the expected behavior and can
> the execute() documentation in the DatabaseStatements module be
> updated to reflect the required behavior. Thanks.

My understanding is that the return value of execute is undefined, but
that it shouldn''t require a block.   The use case is essentially:

"Run  this statement, I don''t need a return value"



--
Cheers

Koz