Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite,test,doc: accept Buffer and URL as paths #56991

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

geeksilva97
Copy link
Contributor

@geeksilva97 geeksilva97 commented Feb 10, 2025

Closes #56940

This PR adds the capability to the sqlite module to accept Buffer and URL as the database location.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Feb 10, 2025
@geeksilva97 geeksilva97 force-pushed the sqlite-accept-buffer branch 3 times, most recently from 2a608e1 to 5b5a8cf Compare February 20, 2025 01:37
@geeksilva97 geeksilva97 marked this pull request as ready for review February 20, 2025 01:38
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 86.79245% with 7 lines in your changes missing coverage. Please review.

Project coverage is 90.35%. Comparing base (772c609) to head (7019435).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/node_sqlite.cc 86.79% 2 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56991      +/-   ##
==========================================
- Coverage   90.36%   90.35%   -0.01%     
==========================================
  Files         629      629              
  Lines      184308   184407      +99     
  Branches    36010    36029      +19     
==========================================
+ Hits       166544   166619      +75     
+ Misses      10910    10907       -3     
- Partials     6854     6881      +27     
Files with missing lines Coverage Δ
src/node_sqlite.cc 78.60% <86.79%> (+0.01%) ⬆️

... and 29 files with indirect coverage changes

@geeksilva97 geeksilva97 force-pushed the sqlite-accept-buffer branch 4 times, most recently from 06d30bf to 4561203 Compare February 21, 2025 12:49
@geeksilva97 geeksilva97 changed the title [WIP] sqlite,test,doc: accept Buffer and URL as paths sqlite,test,doc: accept Buffer and URL as paths Feb 21, 2025
url->Get(env->context(), env->protocol_string()).ToLocal(&protocol) &&
protocol->IsString()) {
location = Utf8Value(env->isolate(), href.As<String>()).ToString();
if (!has_null_bytes(location)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checking for null bytes here but when using new URL it deals with that already.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make sqlite module consitent with other modules like fs
3 participants