@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<
|
|
162
|
-
withIds(ids: ID[]): DaoWithIds<
|
|
163
|
-
withRowsToSave(rows: Unsaved<BM>[]): DaoWithRows<
|
|
164
|
-
withRowToSave(row: Unsaved<BM>, opt?: DaoWithRowOptions<BM>): DaoWithRow<
|
|
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.
|
package/dist/commondao/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1035,28 +1035,28 @@ export class CommonDao<
|
|
|
1035
1035
|
await this.cfg.db.ping()
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
|
-
withId(id: ID): DaoWithId<
|
|
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<
|
|
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<
|
|
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<
|
|
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,
|
package/src/commondao/index.ts
CHANGED