Skip to content

Commit

Permalink
Release v6.0.1
Browse files Browse the repository at this point in the history
* Fix jsdocs for create and update
  • Loading branch information
jgeurts committed Jan 6, 2021
1 parent 55eb932 commit 0fa4ccc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 6.0.1
* Fix jsdocs for create and update

### 6.0.0
* Update npms
* Change `.destroy()` to not return records by default. Use `.destroy({}, { returnRecords: true })` for previous behavior
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bigal",
"version": "6.0.0",
"version": "6.0.1",
"description": "A fast and lightweight orm for postgres and node.js, written in typescript.",
"main": "index.js",
"types": "index.d.ts",
Expand Down
9 changes: 6 additions & 3 deletions src/IRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ export interface IRepository<T extends Entity> extends IReadonlyRepository<T> {
/**
* Creates a objects using the specified values
* @param {object} values - Values to insert as multiple new objects.
* @param {{returnRecords: false}} options
* @param {object} [options]
* @param {string[]} [options.returnSelect] - Array of model property names to return from the query.
* @returns {object}
*/
create(values: Partial<T>, options?: ReturnSelect): Promise<T>;

/**
* Creates a objects using the specified values
* @param {object|object[]} values - Values to insert as multiple new objects.
* @param {{returnRecords: false}} options
* @param {object} options
* @param {boolean} options.returnRecords - Determines if inserted records should be returned
* @returns {void}
*/
create(values: Partial<T> | Partial<T>[], options: DoNotReturnRecords): Promise<void>;
Expand Down Expand Up @@ -50,6 +52,8 @@ export interface IRepository<T extends Entity> extends IReadonlyRepository<T> {
* Updates object(s) matching the where query, with the specified values
* @param {object} where - Object representing the where query
* @param {object} values - Values to update
* @param {object} options
* @param {boolean} options.returnRecords - Determines if inserted records should be returned
* @param {{returnRecords: false}} options
* @returns {void}
*/
Expand All @@ -60,7 +64,6 @@ export interface IRepository<T extends Entity> extends IReadonlyRepository<T> {
* @param {object} where - Object representing the where query
* @param {object} values - Values to update
* @param {object} [options] - Values to update
* @param {boolean} [options.returnRecords=true] - Determines if inserted records should be returned
* @param {string[]} [options.returnSelect] - Array of model property names to return from the query.
* @returns {object[]}
*/
Expand Down
11 changes: 6 additions & 5 deletions src/Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ export class Repository<T extends Entity> extends ReadonlyRepository<T> implemen
/**
* Creates a objects using the specified values
* @param {object} values - Values to insert as multiple new objects.
* @param {{returnRecords: false}} options
* @param {object} [options]
* @param {string[]} [options.returnSelect] - Array of model property names to return from the query.
* @returns {object}
*/
public create(values: Partial<T>, options?: ReturnSelect): Promise<T>;

/**
* Creates a objects using the specified values
* @param {object|object[]} values - Values to insert as multiple new objects.
* @param {{returnRecords: false}} options
* @param {object} options
* @param {boolean} options.returnRecords - Determines if inserted records should be returned
* @returns {void}
*/
public create(values: Partial<T> | Partial<T>[], options: DoNotReturnRecords): Promise<void>;
Expand All @@ -34,7 +36,6 @@ export class Repository<T extends Entity> extends ReadonlyRepository<T> implemen
* Creates a objects using the specified values
* @param {object[]} values - Values to insert as multiple new objects.
* @param {object} [options]
* @param {boolean} [options.returnRecords=true] - Determines if inserted records should be returned
* @param {string[]} [options.returnSelect] - Array of model property names to return from the query.
* @returns {object[]}
*/
Expand Down Expand Up @@ -105,7 +106,8 @@ export class Repository<T extends Entity> extends ReadonlyRepository<T> implemen
* Updates object(s) matching the where query, with the specified values
* @param {object} where - Object representing the where query
* @param {object} values - Values to update
* @param {{returnRecords: false}} options
* @param {object} options
* @param {boolean} options.returnRecords - Determines if inserted records should be returned
* @returns {void}
*/
public update(where: WhereQuery, values: Partial<T>, options: DoNotReturnRecords): Promise<void>;
Expand All @@ -115,7 +117,6 @@ export class Repository<T extends Entity> extends ReadonlyRepository<T> implemen
* @param {object} where - Object representing the where query
* @param {object} values - Values to update
* @param {object} [options] - Values to update
* @param {boolean} [options.returnRecords=true] - Determines if inserted records should be returned
* @param {string[]} [options.returnSelect] - Array of model property names to return from the query.
* @returns {object[]}
*/
Expand Down

0 comments on commit 0fa4ccc

Please sign in to comment.