Skip to content

Commit 9436e76

Browse files
authored
doc: custom procedures sample (#554)
1 parent 06dc104 commit 9436e76

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@
3131
[submodule "code-repos/zenstackhq/v3-doc-plugin"]
3232
path = code-repos/zenstackhq/v3-doc-plugin
3333
url = https://github.com/zenstackhq/v3-doc-plugin
34+
[submodule "code-repos/zenstackhq/v3-doc-orm-procedure"]
35+
path = code-repos/zenstackhq/v3-doc-orm-procedure
36+
url = https://github.com/zenstackhq/v3-doc-orm-procedure.git
Submodule v3-doc-orm-procedure added at ef3abb5

docs/orm/custom-proc.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: ORM custom procedures
55

66
import PreviewFeature from '../_components/PreviewFeature';
77
import AvailableSince from '../_components/AvailableSince';
8+
import StackBlitzGithub from '@site/src/components/StackBlitzGithub';
89

910
# Custom Procedures
1011

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

9899
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.
100+
101+
## Samples
102+
103+
<StackBlitzGithub repoPath="zenstackhq/v3-doc-orm-procedure" openFile={['zenstack/schema.zmodel', 'main.ts']} startScript="dev" />

docs/orm/polymorphism.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ The ORM query API hides all the complexity of managing polymorphic models for yo
3030

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

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

0 commit comments

Comments
 (0)