Skip to content

db.sqlite: support ability to process multiple sql calls with parameters of data#26100

Merged
spytheman merged 13 commits into
vlang:masterfrom
quaesitor-scientiam:master
Dec 26, 2025
Merged

db.sqlite: support ability to process multiple sql calls with parameters of data#26100
spytheman merged 13 commits into
vlang:masterfrom
quaesitor-scientiam:master

Conversation

@quaesitor-scientiam

Copy link
Copy Markdown
Contributor

sqlite.c.v: Added sqlite reset() call and allows exec_param_many() multiple arrays of data and logic to process that.

@spytheman

Copy link
Copy Markdown
Contributor

I think adding a separate new API, that accepts just [][]string, leaving the old one to accept just a []string parameter will be clearer, and less breaking, than changing the old one to accept a sum type, just to immediately do a type switch inside it.

@quaesitor-scientiam

quaesitor-scientiam commented Dec 24, 2025

Copy link
Copy Markdown
Contributor Author

I think adding a separate new API, that accepts just [][]string, leaving the old one to accept just a []string parameter will be clearer, and less breaking, than changing the old one to accept a sum type, just to immediately do a type switch inside it.

exec_param_many2() perhaps? I thought about using a generic syntax but thought that was a breaking change as well.

@StunxFS StunxFS changed the title Support SQLite ability to process multiple sql calls with parameters of data db.sqlite: support ability to process multiple sql calls with parameters of data Dec 24, 2025
@quaesitor-scientiam

Copy link
Copy Markdown
Contributor Author

I think adding a separate new API, that accepts just [][]string, leaving the old one to accept just a []string parameter will be clearer, and less breaking, than changing the old one to accept a sum type, just to immediately do a type switch inside it.

Ran sqlite tests with no changes no breaks found

PS S:\repo\vlang2> v test vlib/db/sqlite
---- Testing... ----------------------------------------------------------------------------------------------------------------------------
 OK    [1/6] C:   776.6 ms, R:   379.223 ms vlib/db/sqlite/sqlite_f32_test.v
 OK    [2/6] C:   776.7 ms, R:   379.221 ms vlib/db/sqlite/sqlite_comptime_field_test.v
 OK    [3/6] C:   777.5 ms, R:   378.881 ms vlib/db/sqlite/parent_child_test.v
 OK    [4/6] C:   772.2 ms, R:   401.230 ms vlib/db/sqlite/sqlite_orm_test.v
 OK    [5/6] C:   772.3 ms, R:   400.798 ms vlib/db/sqlite/sqlite_test.v
 OK    [6/6] C:   771.9 ms, R:   401.556 ms vlib/db/sqlite/sqlite_vfs_lowlevel_test.v
--------------------------------------------------------------------------------------------------------------------------------------------
Summary for all V _test.v files: 6 passed, 6 total. Elapsed time: 1338 ms, on 6 parallel jobs. Comptime: 4647 ms. Runtime: 2340 ms.

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @quaesitor-scientiam 🙇🏻 .

Comment thread cmd/tools/modules/testing/common.v
@spytheman spytheman merged commit 7c29359 into vlang:master Dec 26, 2025
71 of 72 checks passed
spytheman added a commit that referenced this pull request Dec 26, 2025
… []string (it now accepts a sumtype of both) (#26100)"

This reverts commit 7c29359.
spytheman added a commit that referenced this pull request Dec 26, 2025
…r []string (it now accepts a sumtype of both) (#26100)"

This reverts commit 3779d72.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants