@naturalcycles/db-lib 10.20.2 → 10.20.4

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.
@@ -158,10 +158,10 @@ export declare class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity
158
158
  * Proxy to this.cfg.db.ping
159
159
  */
160
160
  ping(): Promise<void>;
161
- withId(id: ID): DaoWithId<typeof this>;
162
- withIds(ids: ID[]): DaoWithIds<typeof this>;
163
- withRowsToSave(rows: Unsaved<BM>[]): DaoWithRows<typeof this>;
164
- withRowToSave(row: Unsaved<BM>, opt?: DaoWithRowOptions<BM>): DaoWithRow<typeof this>;
161
+ withId(id: ID): DaoWithId<CommonDao<BM, DBM, ID>>;
162
+ withIds(ids: ID[]): DaoWithIds<CommonDao<BM, DBM, ID>>;
163
+ withRowsToSave(rows: Unsaved<BM>[]): DaoWithRows<CommonDao<BM, DBM, ID>>;
164
+ withRowToSave(row: Unsaved<BM>, opt?: DaoWithRowOptions<BM>): DaoWithRow<CommonDao<BM, DBM, ID>>;
165
165
  /**
166
166
  * Load rows (by their ids) from Multiple tables at once.
167
167
  * An optimized way to load data, minimizing DB round-trips.
@@ -1,2 +1,3 @@
1
1
  export * from './common.dao.js';
2
2
  export * from './common.dao.model.js';
3
+ export * from './commonDaoTransaction.js';
@@ -1,2 +1,3 @@
1
1
  export * from './common.dao.js';
2
2
  export * from './common.dao.model.js';
3
+ export * from './commonDaoTransaction.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/db-lib",
3
3
  "type": "module",
4
- "version": "10.20.2",
4
+ "version": "10.20.4",
5
5
  "dependencies": {
6
6
  "@naturalcycles/js-lib": "^15",
7
7
  "@naturalcycles/nodejs-lib": "^15"
@@ -1035,28 +1035,28 @@ export class CommonDao<
1035
1035
  await this.cfg.db.ping()
1036
1036
  }
1037
1037
 
1038
- withId(id: ID): DaoWithId<typeof this> {
1038
+ withId(id: ID): DaoWithId<CommonDao<BM, DBM, ID>> {
1039
1039
  return {
1040
1040
  dao: this,
1041
1041
  id,
1042
1042
  }
1043
1043
  }
1044
1044
 
1045
- withIds(ids: ID[]): DaoWithIds<typeof this> {
1045
+ withIds(ids: ID[]): DaoWithIds<CommonDao<BM, DBM, ID>> {
1046
1046
  return {
1047
1047
  dao: this,
1048
1048
  ids,
1049
1049
  }
1050
1050
  }
1051
1051
 
1052
- withRowsToSave(rows: Unsaved<BM>[]): DaoWithRows<typeof this> {
1052
+ withRowsToSave(rows: Unsaved<BM>[]): DaoWithRows<CommonDao<BM, DBM, ID>> {
1053
1053
  return {
1054
1054
  dao: this,
1055
1055
  rows: rows as any,
1056
1056
  }
1057
1057
  }
1058
1058
 
1059
- withRowToSave(row: Unsaved<BM>, opt?: DaoWithRowOptions<BM>): DaoWithRow<typeof this> {
1059
+ withRowToSave(row: Unsaved<BM>, opt?: DaoWithRowOptions<BM>): DaoWithRow<CommonDao<BM, DBM, ID>> {
1060
1060
  return {
1061
1061
  dao: this,
1062
1062
  row: row as any,
@@ -1,2 +1,3 @@
1
1
  export * from './common.dao.js'
2
2
  export * from './common.dao.model.js'
3
+ export * from './commonDaoTransaction.js'