Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
[submodule "code-repos/zenstackhq/v3-doc-plugin"]
path = code-repos/zenstackhq/v3-doc-plugin
url = https://github.com/zenstackhq/v3-doc-plugin
[submodule "code-repos/zenstackhq/v3-doc-orm-procedure"]
path = code-repos/zenstackhq/v3-doc-orm-procedure
url = https://github.com/zenstackhq/v3-doc-orm-procedure.git
1 change: 1 addition & 0 deletions code-repos/zenstackhq/v3-doc-orm-procedure
Submodule v3-doc-orm-procedure added at ef3abb
2 changes: 1 addition & 1 deletion code-repos/zenstackhq/v3-doc-plugin
5 changes: 5 additions & 0 deletions docs/orm/custom-proc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: ORM custom procedures

import PreviewFeature from '../_components/PreviewFeature';
import AvailableSince from '../_components/AvailableSince';
import StackBlitzGithub from '@site/src/components/StackBlitzGithub';

# Custom Procedures

Expand Down Expand Up @@ -96,3 +97,7 @@ const feeds = await db.$procs.getUserFeeds({
## Error handling

The `ZenStackClient` always throws an `ORMError` to the caller when an error occurs. To follow this protocol, custom procedure implementations should ensure other types of errors are caught and wrapped into `ORMError` and re-thrown. See [Error Handling](./errors.md) for more details.

## Samples

<StackBlitzGithub repoPath="zenstackhq/v3-doc-orm-procedure" openFile={['zenstack/schema.zmodel', 'main.ts']} startScript="dev" />
2 changes: 1 addition & 1 deletion docs/orm/polymorphism.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ The ORM query API hides all the complexity of managing polymorphic models for yo

The schema used in the sample involves a base model and three concrete models:

<StackBlitzGithub repoPath="zenstackhq/v3-doc-orm-polymorphism" codeFiles={['zenstack/schema.zmodel', 'main.ts']} startScript="generate,dev" />
<StackBlitzGithub repoPath="zenstackhq/v3-doc-orm-polymorphism" openFile={['zenstack/schema.zmodel', 'main.ts']} startScript="dev" />