Skip to content

Commit 3ad3eac

Browse files
committed
remove collections
1 parent e62e25a commit 3ad3eac

File tree

10 files changed

+3
-506
lines changed

10 files changed

+3
-506
lines changed

documentation/Collections.md

-26
This file was deleted.

documentation/GettingStarted.md

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#### Documentation
55

6-
- [Collections](Collections.md)
76
- [Events](Events.md)
87
- [Migrations](Migrations.md)
98
- [Model](Model.md)

src/collections/ArrayCollection.ts

-210
This file was deleted.

src/collections/Collection.ts

-16
This file was deleted.

src/collections/MapCollection.ts

-84
This file was deleted.

src/collections/index.ts

-5
This file was deleted.

src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Collection } from './collections';
21
import { DB } from './connection';
32
import { Emitter } from './emitter';
43
import { Schema } from './migrations';
@@ -7,7 +6,6 @@ import { Builder } from './query';
76

87
export {
98
Builder,
10-
Collection,
119
DB,
1210
Emitter,
1311
Model,

src/query/Builder.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Collection } from '../collections';
21
import { DB } from '../connection';
32
import { PaginateObject, Pagination } from '../libraries/Pagination';
43
import models from '../model/stores/models';
@@ -204,16 +203,14 @@ export default class Builder
204203
return this.compiler.compileSelect(this);
205204
}
206205

207-
private transformRows(rows: Array<any>): Array<any>|Collection
206+
private transformRows(rows: Array<any>): Array<any>
208207
{
209-
const collection: any = Collection.initialize(rows);
210-
211208
if (!this.model) {
212-
return collection;
209+
return rows;
213210
}
214211

215212
const Model = models.getModel(this.model);
216-
return collection.map(row => new Model(row, true));
213+
return rows.map(row => new Model(row, true));
217214
}
218215

219216
public async update(updates): Promise<any>

0 commit comments

Comments
 (0)