Skip to content

feat!: Add sql template and loader method#414

Open
wschurman wants to merge 1 commit intowschurman/02-01-feat_add_codemod_for_upcoming_v0.55.0-v0.56.0from
wschurman/02-01-feat_add_sql_template_and_loader_method
Open

feat!: Add sql template and loader method#414
wschurman wants to merge 1 commit intowschurman/02-01-feat_add_codemod_for_upcoming_v0.55.0-v0.56.0from
wschurman/02-01-feat_add_sql_template_and_loader_method

Conversation

@wschurman
Copy link
Member

@wschurman wschurman commented Feb 1, 2026

Why

This is the first new feature afforded by the changes in #407.

It adds a feature that is fairly common amongst typescript ORMs: sql via tagged templates for safe value interpolation into SQL statements.

How

Quite a lot of ORMs have this:

This adds support for it to entity knex.

See tests for examples, especially PostgresEntityIntegration-test.ts.

The idea is that this will replace loadManyByRawWhereClauseAsync over the course of a few versions.

Test Plan

Full test coverage.

Copy link
Member Author

@wschurman wschurman force-pushed the wschurman/02-01-feat_add_sql_template_and_loader_method branch 2 times, most recently from cba5a4b to fa53992 Compare February 2, 2026 00:54
@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (39f26e6) to head (cbd366a).

Additional details and impacted files
@@                                       Coverage Diff                                        @@
##           wschurman/02-01-feat_add_codemod_for_upcoming_v0.55.0-v0.56.0      #414    +/-   ##
================================================================================================
  Coverage                                                         100.00%   100.00%            
================================================================================================
  Files                                                                106       108     +2     
  Lines                                                              13941     14785   +844     
  Branches                                                            1205      1302    +97     
================================================================================================
+ Hits                                                               13941     14785   +844     
Flag Coverage Δ
integration 22.00% <91.24%> (+4.45%) ⬆️
unittest 96.50% <81.42%> (-0.92%) ⬇️

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

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wschurman wschurman force-pushed the wschurman/02-01-feat_add_sql_template_and_loader_method branch 13 times, most recently from 4d4d971 to fe4ee5c Compare February 3, 2026 22:34
@wschurman wschurman force-pushed the wschurman/02-01-feat_add_codemod_for_upcoming_v0.55.0-v0.56.0 branch from ceba08f to da8f011 Compare February 4, 2026 03:31
@wschurman wschurman force-pushed the wschurman/02-01-feat_add_sql_template_and_loader_method branch from fe4ee5c to 1c65da3 Compare February 4, 2026 03:31
@wschurman wschurman requested a review from ide February 4, 2026 03:38
@wschurman wschurman marked this pull request as ready for review February 4, 2026 03:38
Copy link
Member

@ide ide left a comment

Choose a reason for hiding this comment

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

Comments

@wschurman wschurman force-pushed the wschurman/02-01-feat_add_sql_template_and_loader_method branch from 1c65da3 to eea3a17 Compare February 4, 2026 21:29
@wschurman wschurman force-pushed the wschurman/02-01-feat_add_codemod_for_upcoming_v0.55.0-v0.56.0 branch from da8f011 to 39f26e6 Compare February 4, 2026 21:29
@wschurman wschurman force-pushed the wschurman/02-01-feat_add_sql_template_and_loader_method branch from eea3a17 to 098ab02 Compare February 4, 2026 21:55
@wschurman wschurman force-pushed the wschurman/02-01-feat_add_sql_template_and_loader_method branch from 098ab02 to cbd366a Compare February 4, 2026 21:58
@wschurman wschurman requested a review from ide February 4, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants