Skip to content

Implement new ADO.NET batching API #2317

Closed
Closed

Description

@roji

Assuming the new batching API proposal makes it through (https://github.com/dotnet/corefx/issues/35135), we need to implement it in Npgsql. The details still need to be finalized in that proposal, but here are some comments/questions:

  • NpgsqlStatement will probably disappear, since we'll now have an NpgsqlCommandSet containing multiple NpgsqlCommands, rather than an NpgsqlCommand containing multiple NpgsqlStatements. Investigate the consequences of this.
  • We probably want to maintain backwards compatibility and continue to support concatenation-based batching in NpgsqlCommand. This means that we should continue parsing the CommandText for semicolons, and if we find multiple statements, internally construct an NpgsqlCommandSet and execute that.
  • However, when executing as part of a batch, we should not split commands on semicolons ("nested batching").
  • Regardless, we still need to parse/rewrite SQL because of the parameter placeholder problem (https://github.com/dotnet/corefx/issues/27075). Once everything is completed, we can have an opt-in mode without any SQL access (New raw SQL mode where Npgsql doesn't parse the SQL #1042).

Activity

  1. added this to the 4.1 milestone on Feb 8, 2019
  2. modified the milestones: 4.1, 5.0 on Aug 26, 2019
  3. modified the milestones: 5.0, 6.0.0 on Sep 17, 2020
  4. self-assigned this
    on Sep 17, 2020
  5. added 2 commits that reference this issue on Jul 31, 2021
    0a4e8f3
    cf3f491
  6. added a commit that references this issue on Mar 13, 2024
    0d8dd34
  7. added theissue type on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions