1

Closed

SQL Server Extensions

description

Add extensions for making asynchronous requests to SQL Server and converting row sets into IEnumerable<T> or IObservable<T> sequences.
 
Note: This work item is not related to reactive queries; i.e., IQbservable<T> support in SQL Server.
 
Original discussion:
http://social.msdn.microsoft.com/Forums/en-US/rx/thread/b44746c2-e68b-4221-b5c3-0b8c2c1afa7e
Closed Mar 10, 2012 at 7:48 AM by davedev
Added in Rxx 1.3. See comments below for details.

comments

davedev wrote Sep 24, 2011 at 2:29 AM

Consider generalizing the extensions so they return IEnumerable<CommandDataRow> or IObservable<CommandDataRow>:

class CommandDataRow
{
CommandDataRowSet Result { get; }
System.Data.DataRow Data { get; }
}

class CommandDataRowSet
{
int Index { get; }
int FieldCount { get; }
int VisibleFieldCount { get; }
int RecordsAffected { get; }
int HasRows { get; }
DataTable Schema { get; }
}

Call IDataReader.GetSchemaTable and use the DataTable's NewRow method to construct a new row from the current record, without it being added to the DataTable.

davedev wrote Feb 20, 2012 at 3:13 PM

Only simple wrappers have been added for SqlCommand. Extensions that expand results into a sequence of rows will be considered for a future release.