
'Declaration
Public NotInheritable Class MimerBatch Inherits System.Data.Common.DbBatch
public sealed class MimerBatch : System.Data.Common.DbBatch
public class MimerBatch = class(System.Data.Common.DbBatch)sealed;
public sealed class MimerBatch extends System.Data.Common.DbBatch
public __gc __sealed class MimerBatch : public System.Data.Common.DbBatch
var connectionString = "Database=exampledb;protocol=tcp;node=dbnode;user id=devuser;password=devpass"; using var connection = new MimerConnection(connectionString); using var batch = new MimerBatch(connection); connection.Open(); var count = 10; for (int i = 0; i < count; i++) { var batchCommand = new MimerBatchCommand("insert into tab values(?,?)") { Parameters = { new MimerParameter("", i), new MimerParameter("", "foo") } }; batch.BatchCommands.Add(batchCommand); } var select = new MimerBatchCommand("select c1, c2 from tab"); var update = new MimerBatchCommand("update tab set c2 = 'bar' where c2 = 'foo'"); batch.BatchCommands.Add(select, update, select); var results = new List<string>(); using (var reader = batch.ExecuteReader()) { do { while (reader.Read()) { results.Add($"{reader.GetInt32(0)}, {reader.GetString(1)}"); } } while (reader.NextResult()); } foreach (var result in results) { Console.WriteLine(result); }
System.Object
System.Data.Common.DbBatch
Mimer.Data.Client.MimerBatch