Skip to content

Commit ce7ff3b

Browse files
author
fernandocode
committed
v.0.4.6
Corrigido possibilidade de executar cascade no metodo `mapper`, assim como é feito no `toList`. #1015
1 parent 17baabe commit ce7ff3b

6 files changed

Lines changed: 153 additions & 80 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "database-builder",
3-
"version": "0.4.5",
3+
"version": "0.4.6",
44
"description": "Library to assist in creating and maintaining SQL commands.",
55
"main": "./src/index.js",
66
"types": "./src/index.d.ts",

src/core/row-result.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { MapperUtils } from "../mapper/mapper-utils";
1010
import { RowMapper } from "./row-mapper";
1111

1212
export class RowResult<T> {
13+
1314
private _databaseHelper: DatabaseHelper;
1415

1516
constructor(

src/crud/query/query-readable-builder-base.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class QueryReadableBuilderBase {
3939
getMapper: (tKey: (new () => any) | string) => MetadataTable<any>,
4040
query: QueryBuilderBaseContract<any, any>,
4141
newable: new () => any,
42-
): any {
42+
): any[] {
4343
const items: any[] = [];
4444
this.forCursor(cursor, (item) => {
4545
items.push(mapper(new RowResult(item, newable, mapperTable, getMapper, query)));
@@ -63,7 +63,6 @@ export class QueryReadableBuilderBase {
6363
const items: TReader[] = [];
6464
this.forCursor(cursor, (row) => {
6565
const item = new RowResult(row, newable, mapperTable).read(newable);
66-
// const item = this.parseToObject(row, newable, mapperTable);
6766
items.push(item);
6867
});
6968
return items;

0 commit comments

Comments
 (0)