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

Add more tests #3336

Merged
merged 8 commits into from Sep 11, 2023
Merged

Add more tests #3336

merged 8 commits into from Sep 11, 2023

Conversation

chilagrow
Copy link
Contributor

@chilagrow chilagrow commented Sep 11, 2023

Description

Closes #{issue_number}.

At the moment subcomponent operator -> is used and it uses quoted string '"64fe76829d57c1b7ded6b5de"'

sqlite> SELECT _ferretdb_sjson FROM 'chi_f5858a65' WHERE _ferretdb_sjson -> '$._id' = '"64fe76829d57c1b7ded6b5de"';
{"$s":{"p":{"_id":{"t":"objectId"},"v":{"t":"int"}},"$k":["_id","v"]},"_id":"64fe76829d57c1b7ded6b5de","v":1}

We want to replace it with subcomponent operator ->> so we can use without quoted string '64fe76829d57c1b7ded6b5de'.

sqlite> SELECT _ferretdb_sjson FROM 'chi_f5858a65' WHERE _ferretdb_sjson ->> '$._id' = '64fe76829d57c1b7ded6b5de';
{"$s":{"p":{"_id":{"t":"objectId"},"v":{"t":"int"}},"$k":["_id","v"]},"_id":"64fe76829d57c1b7ded6b5de","v":1}

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Milestone (Next), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #3336 (3c0a4db) into main (a459ba5) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3336      +/-   ##
==========================================
+ Coverage   73.89%   73.92%   +0.03%     
==========================================
  Files         413      413              
  Lines       25088    25096       +8     
==========================================
+ Hits        18538    18552      +14     
+ Misses       5463     5460       -3     
+ Partials     1087     1084       -3     
Files Changed Coverage
internal/backends/sqlite/metadata/metadata.go ø
integration/helpers.go 100.00%
Flag Coverage Δ
hana-1 ?
hana-2 ?
hana-3 ?
integration 70.92% <100.00%> (+0.02%) ⬆️
mongodb-1 4.76% <100.00%> (+0.05%) ⬆️
pg-1 44.93% <100.00%> (+0.61%) ⬆️
pg-2 45.08% <100.00%> (+1.22%) ⬆️
pg-3 42.66% <100.00%> (-1.10%) ⬇️
sqlite-1 43.52% <100.00%> (+0.62%) ⬆️
sqlite-2 43.30% <100.00%> (+1.30%) ⬆️
sqlite-3 41.23% <100.00%> (-1.14%) ⬇️
unit 23.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@mergify
Copy link
Contributor

mergify bot commented Sep 11, 2023

@chilagrow this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Sep 11, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Sep 11, 2023
@AlekSi AlekSi changed the title Use SQL representation of subcomponent operator in SQLite Add more tests Sep 11, 2023
@AlekSi AlekSi added the code/chore Code maintenance improvements label Sep 11, 2023
@AlekSi AlekSi added this to the v1.10.0 milestone Sep 11, 2023
@AlekSi
Copy link
Member

AlekSi commented Sep 11, 2023

Moved to #3340

@AlekSi AlekSi marked this pull request as ready for review September 11, 2023 18:00
@AlekSi AlekSi requested a review from a team as a code owner September 11, 2023 18:00
@AlekSi AlekSi merged commit ee5304e into FerretDB:main Sep 11, 2023
28 of 31 checks passed
noisersup pushed a commit to noisersup/FerretDB that referenced this pull request Sep 12, 2023
Co-authored-by: Alexey Palazhchenko <alexey.palazhchenko@ferretdb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants