Skip to content

chore: [#1074] add unit tests for JSON queries#1075

Merged
almas-x merged 2 commits intomasterfrom
almas/chore
Jun 16, 2025
Merged

chore: [#1074] add unit tests for JSON queries#1075
almas-x merged 2 commits intomasterfrom
almas/chore

Conversation

@almas-x
Copy link
Contributor

@almas-x almas-x commented Jun 13, 2025

📑 Description

Closes goravel/goravel#705

✅ Checks

  • Added test cases for my code

Copilot AI review requested due to automatic review settings June 13, 2025 08:44
@almas-x almas-x requested a review from a team as a code owner June 13, 2025 08:44
@almas-x almas-x changed the title chore: [#1074] upgrade database driver and add unit tests for JSON pa… chore: [#1074] upgrade database driver and add unit tests for JSON path queries Jun 13, 2025
@almas-x almas-x marked this pull request as draft June 13, 2025 08:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the database driver dependencies in go.mod and refactors JSON path handling in the schema wrap functions.

  • Upgraded several indirect dependencies, including redis/go-redis from v9.5.1 to v9.8.0.
  • Added new indirect dependencies for goravel/mysql, postgres, sqlite, and sqlserver.
  • Refactored regex usage in database/schema/wrap.go to use precompiled regex variables.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
go.mod Upgraded database driver versions and added new indirect dependency requirements.
database/schema/wrap.go Updated JSON path functions to use precompiled regex patterns for improved performance and clarity.

@codecov
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.03%. Comparing base (8007257) to head (94de0fd).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1075   +/-   ##
=======================================
  Coverage   71.03%   71.03%           
=======================================
  Files         181      181           
  Lines       12710    12710           
=======================================
  Hits         9028     9028           
  Misses       3312     3312           
  Partials      370      370           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@almas-x almas-x force-pushed the almas/chore branch 13 times, most recently from 8921bec to 21066ca Compare June 14, 2025 09:13
@almas-x almas-x changed the title chore: [#1074] upgrade database driver and add unit tests for JSON path queries chore: [#1074] add unit tests for JSON path queries Jun 14, 2025
@almas-x almas-x force-pushed the almas/chore branch 2 times, most recently from a5dcbb2 to a4358a8 Compare June 14, 2025 09:37
@almas-x almas-x changed the title chore: [#1074] add unit tests for JSON path queries chore: [#1074] add unit tests for JSON queries Jun 14, 2025
@almas-x almas-x force-pushed the almas/chore branch 6 times, most recently from ff5fd84 to 482eafc Compare June 14, 2025 10:40
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 94de0fd Previous: 462e3c1 Ratio
Benchmark_Fatal 2e-7 ns/op 0 B/op 0 allocs/op 1e-7 ns/op 0 B/op 0 allocs/op 2
Benchmark_Fatal - ns/op 2e-7 ns/op 1e-7 ns/op 2

This comment was automatically generated by workflow using github-action-benchmark.

@almas-x almas-x force-pushed the almas/chore branch 2 times, most recently from 530438e to 3256990 Compare June 14, 2025 10:51
@almas-x almas-x marked this pull request as ready for review June 14, 2025 10:59
@almas-x almas-x enabled auto-merge (squash) June 14, 2025 11:06
Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

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

Nice, could you add some or test casts?

@almas-x
Copy link
Contributor Author

almas-x commented Jun 16, 2025

Nice, could you add some or test casts?

Okay

@almas-x almas-x force-pushed the almas/chore branch 2 times, most recently from d97f7e5 to 8463677 Compare June 16, 2025 05:42
@almas-x almas-x requested a review from hwbrzzl June 16, 2025 06:09
Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

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

Perfect

@almas-x almas-x merged commit d52cfe9 into master Jun 16, 2025
13 of 14 checks passed
@almas-x almas-x deleted the almas/chore branch June 16, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

facades.Orm().Query() Support JSON Where Clauses

3 participants