• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

huandu / go-sqlbuilder / 18400676197
97%

Build:
DEFAULT BRANCH: master
Ran 10 Oct 2025 08:16AM UTC
Jobs 1
Files 20
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Oct 2025 08:13AM UTC coverage: 96.976% (-0.2%) from 97.2%
18400676197

push

github

huandu
Add OrderByAsc and OrderByDesc methods to all builders

Implement new OrderByAsc(col) and OrderByDesc(col) methods for
SelectBuilder, UnionBuilder, UpdateBuilder, and DeleteBuilder. These
methods allow chaining multiple ORDER BY columns with different sort
directions, addressing the limitation where the old OrderBy/Asc/Desc
pattern could only apply a single direction to all columns.

Key changes:
- Add OrderByAsc(col string) and OrderByDesc(col string) to all four builders
- Each method appends the column with explicit ASC/DESC suffix
- Support chaining for complex ordering: OrderByDesc("score").OrderByAsc("name")
- Deprecate OrderBy/Asc/Desc methods with clear migration guidance
- Add comprehensive tests (TestSelectBuilder_OrderByAscDesc)
- Add example functions demonstrating usage
- Update all existing examples to use new API
- Update README.md with new "Build ORDER BY clause" section

This design is inspired by MyBatis-Plus and provides a more intuitive
and flexible API for handling multiple ORDER BY columns with different
sorting directions.

fix #214

30 of 40 new or added lines in 4 files covered. (75.0%)

3848 of 3968 relevant lines covered (96.98%)

1.09 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
10
91.94
-5.22% delete.go
Jobs
ID Job ID Ran Files Coverage
1 18400676197.1 10 Oct 2025 08:16AM UTC 20
96.98
GitHub Action Run
Source Files on build 18400676197
  • Tree
  • List 20
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2aef540e on github
  • Prev Build on master (#18399860880)
  • Next Build on master (#18400966518)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc