You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.Data;
|
|
|
|
|
using Connected.ServiceModel.Client.Data.Remote;
|
|
|
|
|
|
|
|
|
|
namespace Connected.ServiceModel.Client.Data;
|
|
|
|
|
internal sealed class TableDataCommand : IDbCommand
|
|
|
|
|
{
|
|
|
|
|
public TableDataCommand(RemoteTableService tables)
|
|
|
|
|
{
|
|
|
|
|
Parameters = new DataParameterCollection();
|
|
|
|
|
Tables = tables;
|
|
|
|
|
}
|
|
|
|
|
public string CommandText { get; set; }
|
|
|
|
|
public int CommandTimeout { get; set; }
|
|
|
|
|
public CommandType CommandType { get; set; }
|
|
|
|
|
public IDbConnection? Connection { get; set; }
|
|
|
|
|
|
|
|
|
|
public IDataParameterCollection Parameters { get; }
|
|
|
|
|
|
|
|
|
|
public IDbTransaction? Transaction { get; set; }
|
|
|
|
|
public UpdateRowSource UpdatedRowSource { get; set; }
|
|
|
|
|
public RemoteTableService Tables { get; }
|
|
|
|
|
|
|
|
|
|
public void Cancel()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IDbDataParameter CreateParameter()
|
|
|
|
|
{
|
|
|
|
|
return new TableDataParameter();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int ExecuteNonQuery()
|
|
|
|
|
{
|
|
|
|
|
AsyncUtils.RunSync(() => Tables.Update(CommandText));
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IDataReader ExecuteReader()
|
|
|
|
|
{
|
|
|
|
|
return new TableDataReader(AsyncUtils.RunSync(() => Tables.Query(CommandText)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IDataReader ExecuteReader(CommandBehavior behavior)
|
|
|
|
|
{
|
|
|
|
|
return new TableDataReader(AsyncUtils.RunSync(() => Tables.Query(CommandText)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object? ExecuteScalar()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Prepare()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|