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

huandu / go-sqlbuilder / 16501931889
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: chore-oralce-select-offset-fetch
DEFAULT BRANCH: master
Ran 24 Jul 2025 04:03PM 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

24 Jul 2025 04:01PM UTC coverage: 96.714% (+0.2%) from 96.475%
16501931889

Pull #212

github

huandu
feat: implement Returning method for UpdateBuilder and DeleteBuilder

Fixes #210

This commit adds the Returning method to both UpdateBuilder and DeleteBuilder,
following the same implementation pattern as InsertBuilder.

Changes:
- Add returning field to UpdateBuilder and DeleteBuilder structs
- Add updateMarkerAfterReturning and deleteMarkerAfterReturning markers
- Implement Returning methods for both builders
- Add RETURNING clause support for PostgreSQL and SQLite flavors
- Add comprehensive test coverage including:
  - Basic functionality tests
  - Flavor-specific behavior tests
  - Edge cases (empty, single, multiple columns)
  - Complex scenarios (ORDER BY, LIMIT, CTE)
  - SQL injection compatibility
  - Method chaining validation

The RETURNING clause is properly positioned after LIMIT and is ignored
for database flavors that don't support it (MySQL, SQL Server, CQL,
ClickHouse, Presto).

Example usage:
  ub := Update("users").Set("name = ?", "John").Where("id = ?", 1).Returning("id", "updated_at")
  db := DeleteFrom("users").Where("status = ?", "inactive").Returning("id", "deleted_at")
Pull Request #212: feat: implement Returning method for UpdateBuilder and DeleteBuilder

22 of 22 new or added lines in 2 files covered. (100.0%)

3561 of 3682 relevant lines covered (96.71%)

1.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 16501931889.1 24 Jul 2025 04:03PM UTC 20
96.71
GitHub Action Run
Source Files on build 16501931889
  • Tree
  • List 20
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #212
  • PR Base - master (#16098266535)
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

© 2026 Coveralls, Inc