Skip to content

Commit 192910f

Browse files
committed
update
1 parent 25822c8 commit 192910f

File tree

8 files changed

+46
-12
lines changed

8 files changed

+46
-12
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
position: 2
1+
position: 3
22
label: Data Modeling
33
collapsible: true
44
collapsed: true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
position: 3
1+
position: 4
22
label: ORM
33
collapsible: true
44
collapsed: true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
sidebar_position: 16
3+
description: ORM Errors
4+
---
5+
6+
# Errors
7+
8+
The ORM uses the following error classes from `@zenstackhq/runtime` to represent different types of failures:
9+
10+
## `ValidationError`
11+
12+
This error is thrown when the argument passed to the ORM methods is invalid, e.g., missing required fields, or containing unknown fields. The `cause` property is set to the original error thrown during validation.
13+
14+
## `NotFoundError`
15+
16+
This error is thrown when a requested record is not found in the database, e.g., when calling `findUniqueOrThrow`, `update`, etc.
17+
18+
## `QueryError`
19+
20+
This error is used to encapsulate all other errors thrown from the underlying database driver. The `cause` property is set to the original error thrown.

versioned_docs/version-3.x/orm/migration.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
sidebar_position: 16
3-
description: Schema migration introduction
2+
sidebar_position: 17
43
---
54

6-
# Database Schema Migration
5+
# Database Migration
76

87
Database schema migration is a crucial aspect of application development. It helps you keep your database schema in sync with your data model and ensures deployments are smooth and predictable. ZenStack provides migration tools that create migration scripts based on the ZModel schema and apply them to the database.
98

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# Prerequisite
6+
7+
## Node.js
8+
9+
Node.js v20 or above.
10+
11+
## TypeScript
12+
13+
TypeScript v5.8.0 or above.
14+
15+
## IDE Extension
16+
17+
If you use VSCode, please install the [ZenStack VSCode Extension](https://marketplace.visualstudio.com/items?itemName=zenstack.zenstack) for syntax highlighting, auto-completion, and error reporting. Make sure you switch to the prerelease version that's compatible with v3.
18+
19+
![VSCode Extension](./vscode.png)
20+
21+
Other IDEs are not supported at this time.

versioned_docs/version-3.x/recipes/_category_.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

versioned_docs/version-3.x/roadmap.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ sidebar_position: 11
1010
- [ ] Performance benchmark
1111
- [ ] Query-as-a-Service (automatic CRUD API)
1212
- [ ] Json filter
13+
- [ ] Custom procedures

versioned_docs/version-3.x/vscode.png

424 KB
Loading

0 commit comments

Comments
 (0)