Skip to content

Commit

Permalink
Fixed: examples in VingSchema need to differentiate between the able …
Browse files Browse the repository at this point in the history
…and the kind class #155
  • Loading branch information
rizen committed Jun 23, 2024
1 parent b2859da commit b938924
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ving/docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ outline: deep

## June 2024

### 2024-06-23
* Fixed: examples in VingSchema need to differentiate between the able and the kind class #155

### 2024-06-21
* Replaced PrimeFlex with Tailwind.
* Replaced PrimeVue 3 with PrimeVue 4.
Expand Down
8 changes: 4 additions & 4 deletions ving/record/VingRecord.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ export class VingKind {
* @param {Object} where A drizzle where clause
* @returns {object} A drizzle where clause
* @example
* const results = await Users.delete.where(Users.calcWhere(like(Users.realName, 'Fred%')));
* const results = await Users.delete.where(Users.calcWhere(like(Users.table.realName, 'Fred%')));
*/
calcWhere(where) {
let defaults = undefined;
Expand Down Expand Up @@ -954,7 +954,7 @@ export class VingKind {
* @param {Object[]} options.orderBy An array of drizzle table fields to sort by with `asc()` or `desc()` function wrappers
* @returns {VingRecord[]} A list of records
* @example
* const listOfFredRecords = await Users.findMany(like(Users.realName, 'Fred%'));
* const listOfFredRecords = await Users.findMany(like(Users.table.realName, 'Fred%'));
*/
async findMany(
where,
Expand All @@ -981,7 +981,7 @@ export class VingKind {
* @param {Object[]} options.orderBy An array of drizzle table fields to sort by with `asc()` or `desc()` function wrappers
* @returns {Iterator<VingRecord>} An iterator that points to a list of records
* @example
* const fredRecords = await Users.findAll(like(Users.realName, 'Fred%'));
* const fredRecords = await Users.findAll(like(Users.table.realName, 'Fred%'));
* for await (const fred of fredRecords) {
* // do stuff with each record
* }
Expand Down Expand Up @@ -1010,7 +1010,7 @@ export class VingKind {
* @param {Object} where A drizzle where clause
* @returns {VingRecord|undefined} a record or `undefined` if no record is found
* @example
* const fredRecord = await Users.findOne(eq(Users.username, 'Fred'));
* const fredRecord = await Users.findOne(eq(Users.table.username, 'Fred'));
*/
async findOne(where) {
const result = await this.findMany(where, { limit: 1 });
Expand Down

0 comments on commit b938924

Please sign in to comment.