* Processes the provided error callback. * @param {ErrorCallback} callback signals when the call finishes * @returns {void}
(callback)
| 1186 | * @returns {void} |
| 1187 | */ |
| 1188 | readRecords(callback) { |
| 1189 | if (this.hooks.readRecords.isUsed()) { |
| 1190 | if (this.recordsInputPath) { |
| 1191 | asyncLib.parallel( |
| 1192 | [ |
| 1193 | (cb) => this.hooks.readRecords.callAsync(cb), |
| 1194 | this._readRecords.bind(this) |
| 1195 | ], |
| 1196 | (err) => callback(/** @type {Error | null} */ (err)) |
| 1197 | ); |
| 1198 | } else { |
| 1199 | this.records = {}; |
| 1200 | this.hooks.readRecords.callAsync(callback); |
| 1201 | } |
| 1202 | } else if (this.recordsInputPath) { |
| 1203 | this._readRecords(callback); |
| 1204 | } else { |
| 1205 | this.records = {}; |
| 1206 | callback(null); |
| 1207 | } |
| 1208 | } |
| 1209 | |
| 1210 | /** |
| 1211 | * Processes the provided error callback. |
no test coverage detected