xdriver 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/database.d.ts +2 -2
- package/lib/database.js +1 -3
- package/lib/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/database.ts +2 -2
- package/src/index.ts +1 -1
package/lib/database.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Connection from "./connection";
|
|
2
|
-
import {
|
|
2
|
+
import { Pagination, Row, RowPacket } from "./table";
|
|
3
3
|
import Mapper from "./mapper";
|
|
4
4
|
export default class Database extends Connection {
|
|
5
5
|
query<R extends Row>(table: string, query?: IDBValidKey | IDBKeyRange, count?: number): Promise<RowPacket<R>>;
|
|
@@ -16,5 +16,5 @@ export default class Database extends Connection {
|
|
|
16
16
|
scan<R extends Row>(table: string, key?: IDBValidKey | IDBKeyRange, direction?: IDBCursorDirection, indexName?: string): Promise<RowPacket<R>>;
|
|
17
17
|
getAllData<R extends Row>(table: string): Promise<Array<R>>;
|
|
18
18
|
paginate<R extends Row>(table: string, pageNo?: number, pageSize?: number, key?: IDBValidKey | IDBKeyRange, indexName?: string): Promise<RowPacket<R>>;
|
|
19
|
-
getMapper<R extends Row>(tableName: string):
|
|
19
|
+
getMapper<R extends Row>(tableName: string): Mapper<R>;
|
|
20
20
|
}
|
package/lib/database.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export default class Driver {
|
|
|
13
13
|
private hasChange;
|
|
14
14
|
connect(version?: number): Promise<Database>;
|
|
15
15
|
}
|
|
16
|
-
export { IndexdbStatus, KeyRange, Connection, Table, Logger, Mapper };
|
|
16
|
+
export { IndexdbStatus, KeyRange, Connection, Table, Logger, Mapper, Row };
|
|
17
17
|
export interface TableDeclare<T extends Row> {
|
|
18
18
|
name: string;
|
|
19
19
|
primaryKey?: keyof T | Array<keyof T>;
|
package/package.json
CHANGED
package/src/database.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Connection from "./connection";
|
|
2
|
-
import {
|
|
2
|
+
import {Pagination, Row, RowPacket} from "./table";
|
|
3
3
|
import Mapper from "./mapper";
|
|
4
4
|
|
|
5
5
|
export default class Database extends Connection {
|
|
@@ -140,7 +140,7 @@ export default class Database extends Connection {
|
|
|
140
140
|
return this.table(table).paginate(pageNo, pageSize, key, indexName)
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
getMapper<R extends Row>(tableName: string):Mapper<R> {
|
|
144
144
|
return new Mapper<R>(this.table(tableName))
|
|
145
145
|
}
|
|
146
146
|
}
|
package/src/index.ts
CHANGED
|
@@ -144,7 +144,7 @@ export default class Driver {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
export {IndexdbStatus, KeyRange, Connection, Table, Logger, Mapper};
|
|
147
|
+
export {IndexdbStatus, KeyRange, Connection, Table, Logger, Mapper, Row};
|
|
148
148
|
|
|
149
149
|
export interface TableDeclare<T extends Row> {
|
|
150
150
|
name: string;
|