Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

add test for pg computed values across multiple schema#615

Merged
ymc9 merged 4 commits into
zenstackhq:devfrom
lsmith77:pg-computed-multischema-test
Jan 24, 2026
Merged

add test for pg computed values across multiple schema#615
ymc9 merged 4 commits into
zenstackhq:devfrom
lsmith77:pg-computed-multischema-test

Conversation

@lsmith77
Copy link
Copy Markdown
Contributor

@lsmith77 lsmith77 commented Jan 22, 2026

This tests shows that #614 can be closed. Not sure if its worth adding this test, given that the two features are being tests independently already.

Summary by CodeRabbit

  • Tests
    • Added end-to-end test coverage validating computed fields in a multi-schema Postgres setup, ensuring cross-schema relations resolve correctly and computed values (e.g., derived author name) are returned as expected.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

A new end-to-end test adds a Postgres multi-schema scenario with models in separate schemas and a computed field on Book that resolves across schemas to Author.name, validating cross-schema computed field resolution.

Changes

Cohort / File(s) Summary
New multi-schema computed fields test
tests/e2e/orm/client-api/pg-computed-multischema.test.ts
Added new E2E test (+53 lines) configuring Postgres across public, mySchema1, mySchema2; defines Author (mySchema1) and Book (mySchema2) and wires Book.authorName computed field to resolve Author.name across schemas; creates records and asserts computed value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐇 I hopped through schemas, soft and spry,

Found Author tucked where numbers lie,
Book nearby with a curious name,
A computed whisper called it the same,
Jane smiled — my cross-schema trick did fly.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a test for Postgres computed values that work across multiple schemas, which matches the actual test file addition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ymc9 ymc9 changed the base branch from main to dev January 24, 2026 02:04
@ymc9 ymc9 merged commit 9e819e8 into zenstackhq:dev Jan 24, 2026
4 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants