/// <summary> /// Creates a <see cref="DataTable"/> based on the required insert/update command parameters. /// </summary> private static DbBatchOperation CreateBuffer(IStoreEventSettings settings, IEventStoreDialect dialect) { using (var command = dialect.CreateCommand(dialect.MarkDispatched)) { command.Parameters.Add(dialect.CreateIdParameter(default(Int64))); return(new DbBatchOperation(dialect, command, settings.BatchSize, settings.FlushInterval)); } }
/// <summary> /// Mark the specified commit as being dispatched. /// </summary> /// <param name="id">The unique commit identifier that has been dispatched.</param> public void MarkDispatched(Int64 id) { Verify.NotDisposed(this, disposed); if (useAsyncWrite) { dispatchedBuffer.Add(id); } else { using (var command = dialect.CreateCommand(dialect.MarkDispatched)) { Log.Trace("Marking commit {0} as dispatched", id); command.Parameters.Add(dialect.CreateIdParameter(id)); dialect.ExecuteNonQuery(command); } } }
/// <summary> /// Creates a <see cref="DataTable"/> based on the required insert/update command parameters. /// </summary> private static DbBatchOperation CreateBuffer(IStoreEventSettings settings, IEventStoreDialect dialect) { using (var command = dialect.CreateCommand(dialect.MarkDispatched)) { command.Parameters.Add(dialect.CreateIdParameter(default(Int64))); return new DbBatchOperation(dialect, command, settings.BatchSize, settings.FlushInterval); } }