Skip to content

Conversation

@caffeinum
Copy link

Summary

Fixes two bugs discovered when following the getting-started guide:

  1. Documentation bug: The getting-started.md example used .where("is_active", "=", true) on the version table, but this column doesn't exist. The active version is tracked in a separate active_version table. Fixed by using proper join with active_version table.

  2. selectWorkingDiff SQL syntax error: The function was incorrectly embedding Kysely query builders into a raw SQL template string, causing "near 'from': syntax error". Fixed by using Kysely's native .unionAll() method instead.

Changes

  • packages/website/content/docs/getting-started.md: Updated active version query to use active_version table join
  • packages/sdk/src/diff/select-working-diff.ts: Replaced raw SQL union template with Kysely's .unionAll() method

Testing

  • All 9 select-working-diff.test.ts tests pass
  • All 11 diff module tests pass

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.

1 participant