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

dal-go / dalgo2sql / 37239148496
100%

Build:
DEFAULT BRANCH: main
Ran 04 Oct 2026 10:13PM UTC
Jobs 1
Files 22
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

04 Oct 2026 10:12PM UTC coverage: 100.0%. Remained the same
37239148496

push

github

web-flow
feat(sql): compile isNull and isNotNull in the SQLite structured emitter (#201) (#208)

The SQLite structured emitter now compiles dal.IsNullCondition (isNull and isNotNull). This changes only sqlite_emit.go; the tests are in a new file, sqlite_null_test.go. The root package passes with 100% statement coverage and vet is clean.

compileSQLConditionWithSources emits `(+<operand> COLLATE BINARY) IS [NOT] NULL`. The operand goes through the existing expression compiler, so identifiers are quoted, the unknown-source and unqualified-in-JOIN checks apply, and constants and arithmetic operands stay bound arguments. An unsupported or nil operand returns an error instead of panicking.

rewriteSQLConditionAliases now handles IsNullCondition: it rewrites aliases inside the operand, including inside arithmetic, and keeps the negation. A qualified field is never rewritten. As a result, HAVING can test an aggregate or an alias such as `total`.

CanExecuteJoin needed no change. It already calls compileStructuredSQL, so a joined query with a null test now compiles, is accepted, and dal.PlanJoin picks the native strategy.

Tests cover:
- compile output and arguments for field, qualified, arithmetic and constant operands, and inside AND/OR groups;
- bad operands (nil, unknown source, unqualified in a join, unsupported value);
- alias rewrite behaviour;
- real SQLite rows for WHERE (NULL, empty string and zero treated as values, nested AND/OR, arithmetic operand, division by zero), for HAVING over an aggregate, an alias and a group key, and for WHERE and HAVING together;
- a LEFT JOIN case where `isNull` is accepted for native execution, planned as native, and returns the right rows through a read-only transaction.

Source commits:

- 018c3581b151 feat(sql): compile isNull and isNotNull in the SQLite structured emitter (#201)

Pull request: dal-go/dalgo2sql#208
Review: https://github.com/dal-go/dalgo2sql/pull/208#issuecomment-5984993639

17 of 17 new or added lines in 1 file covered. (100.0%)

2839 of 2839 relevant lines covered (100.0%)

1.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 37239148496.1 04 Oct 2026 10:13PM UTC 22
100.0
GitHub Action Run
Source Files on build 37239148496
  • Tree
  • List 22
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3dc847dc on github
  • Prev Build on main (#37239066469)
  • Next Build on main (#37239718246)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc