Conversation
Adds `bulk_insert_columns(self, table, columns)` and turns `bulk_insert(self, table)` into a compatibility shim that calls `self.bulk_insert_columns(table, &["*"])`, maintaining the existing behaviour.
MattJackson
referenced
this pull request
in MattJackson/tiberius-ng
Aug 29, 2026
joelparkerhenderson
added a commit
to mssql-rust/mssql-rust
that referenced
this pull request
Aug 29, 2026
Mirrors tiberius-rs/tiberius#359, fixes upstream issue #311. Client::bulk_insert_columns(table, columns) lets callers restrict and order the columns used in a BULK INSERT, so source data that doesn't cover every column or is in a different column order than the table can still use bulk_insert. bulk_insert(table) becomes a thin wrapper calling bulk_insert_columns(table, &["*"]). Ported the test macro to this fork's mssql/pastey naming. Verified live against a real SQL Server (Azure SQL Edge via rustls): all 8 new tests pass (default/override column subsets, both orderings, optional and NOT NULL variants), plus the full 88-test tests/bulk.rs suite. Also verified: cargo check across all 6 CI feature combinations, cargo clippy --all-targets, cargo fmt --check, and cargo test --lib (153 passing). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156Di1tRRLsJK8ctU1AmAJr
MattJackson
referenced
this pull request
in MattJackson/tiberius-ng
Aug 29, 2026
…397, #217, #403) Adapted from upstream #398 (author @etylermoss), reconciled with the already-integrated bulk_insert_columns (#359): - Client::column_metadata(table, columns) returns owned Vec<MetaDataColumn> (names, types, size/precision/scale, nullability, identity); bulk insert now shares this path. - MetaDataColumn::col_name()/base() accessors; BaseMetaDataColumn:: is_identity()/is_nullable()/ty()/flags() (resolves #403).
joelparkerhenderson
added a commit
to mssql-rust/mssql-rust
that referenced
this pull request
Aug 30, 2026
Mirrors tiberius-rs/tiberius#359, fixes upstream issue #311. Client::bulk_insert_columns(table, columns) lets callers restrict and order the columns used in a BULK INSERT, so source data that doesn't cover every column or is in a different column order than the table can still use bulk_insert. bulk_insert(table) becomes a thin wrapper calling bulk_insert_columns(table, &["*"]). Ported the test macro to this fork's mssql/pastey naming. Verified live against a real SQL Server (Azure SQL Edge via rustls): all 8 new tests pass (default/override column subsets, both orderings, optional and NOT NULL variants), plus the full 88-test tests/bulk.rs suite. Also verified: cargo check across all 6 CI feature combinations, cargo clippy --all-targets, cargo fmt --check, and cargo test --lib (153 passing). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156Di1tRRLsJK8ctU1AmAJr
This was referenced Sep 1, 2026
Closed
MattJackson
added a commit
that referenced
this pull request
Sep 3, 2026
(cherry picked from commit b114498)
MattJackson
added a commit
that referenced
this pull request
Sep 3, 2026
, #217, #403) Adapted from upstream #398 (author @etylermoss), reconciled with the already-integrated bulk_insert_columns (#359): - Client::column_metadata(table, columns) returns owned Vec<MetaDataColumn> (names, types, size/precision/scale, nullability, identity); bulk insert now shares this path. - MetaDataColumn::col_name()/base() accessors; BaseMetaDataColumn:: is_identity()/is_nullable()/ty()/flags() (resolves #403).
MattJackson
added a commit
that referenced
this pull request
Sep 4, 2026
(cherry picked from commit b114498)
MattJackson
added a commit
that referenced
this pull request
Sep 4, 2026
, #217, #403) Adapted from upstream #398 (author @etylermoss), reconciled with the already-integrated bulk_insert_columns (#359): - Client::column_metadata(table, columns) returns owned Vec<MetaDataColumn> (names, types, size/precision/scale, nullability, identity); bulk insert now shares this path. - MetaDataColumn::col_name()/base() accessors; BaseMetaDataColumn:: is_identity()/is_nullable()/ty()/flags() (resolves #403).
MattJackson
added a commit
that referenced
this pull request
Sep 6, 2026
(cherry picked from commit b114498)
MattJackson
added a commit
that referenced
this pull request
Sep 6, 2026
, #217, #403) Adapted from upstream #398 (author @etylermoss), reconciled with the already-integrated bulk_insert_columns (#359): - Client::column_metadata(table, columns) returns owned Vec<MetaDataColumn> (names, types, size/precision/scale, nullability, identity); bulk insert now shares this path. - MetaDataColumn::col_name()/base() accessors; BaseMetaDataColumn:: is_identity()/is_nullable()/ty()/flags() (resolves #403).
MattJackson
added a commit
that referenced
this pull request
Sep 15, 2026
(cherry picked from commit b114498)
MattJackson
added a commit
that referenced
this pull request
Sep 16, 2026
(cherry picked from commit b114498)
MattJackson
added a commit
that referenced
this pull request
Sep 16, 2026
, #217, #403) Adapted from upstream #398 (author @etylermoss), reconciled with the already-integrated bulk_insert_columns (#359): - Client::column_metadata(table, columns) returns owned Vec<MetaDataColumn> (names, types, size/precision/scale, nullability, identity); bulk insert now shares this path. - MetaDataColumn::col_name()/base() accessors; BaseMetaDataColumn:: is_identity()/is_nullable()/ty()/flags() (resolves #403).
MattJackson
added a commit
that referenced
this pull request
Sep 24, 2026
, #217, #403) Adapted from upstream #398 (author @etylermoss), reconciled with the already-integrated bulk_insert_columns (#359): - Client::column_metadata(table, columns) returns owned Vec<MetaDataColumn> (names, types, size/precision/scale, nullability, identity); bulk insert now shares this path. - MetaDataColumn::col_name()/base() accessors; BaseMetaDataColumn:: is_identity()/is_nullable()/ty()/flags() (resolves #403).
Contributor
|
Included in #441 — shipped in tiberius v0.13.0. Thanks for this! Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
bulk_insert_columns(self, table, columns)and turnsbulk_insert(self, table)into a compatibility shim that callsself.bulk_insert_columns(table, &["*"]), maintaining the existing behaviour.This should simplify bulk inserts in cases where column order may be unpredictable, or only a subset of columns need to be inserted.