Skip to content

Commit

Permalink
Fixed: note in docs how to reference drizzle schema #174
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Jan 12, 2025
1 parent 9f0395e commit 6e4582c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions ving/docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ outline: deep
* Fixed: Documentation: useVingRecord findOne docs are wrong #201
* refactored to use Intl instead of date-fns #204
* NOTE: If you are using the date formating strings in dateTime.mjs you will need to update them to use Intl instead of date-fns.
* Fixed: note in docs how to reference drizzle schema #174

## December 2024

Expand Down
7 changes: 7 additions & 0 deletions ving/docs/subsystems/ving-record.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ import {useKind} from '#ving/record/VingKind.mjs';
const users = await useKind('User');
```

### Access to Drizzle Schema
You can access the drizzle schema for a kind by calling `.table` on the kind. For example, if you wanted to get the schema for the `username` field on the `User` kind you could do this:

```js
const schema = Users.table.username;
```

### Creating Records
You can create records many different ways. In all three methods you'll pass in a list of `props` which is an object containing the values (or columns) to set on the record.

Expand Down

0 comments on commit 6e4582c

Please sign in to comment.