[Gekidou] fix database schema and models (#5553)

* fix database schema and models

* fix types
This commit is contained in:
Elias Nahum
2021-07-20 15:24:42 -04:00
committed by GitHub
parent bd0f22fcd1
commit 324dbbd054
60 changed files with 781 additions and 554 deletions

View File

@@ -46,7 +46,7 @@ export default class BaseDataOperator {
* @param {(existing: Model, newElement: RawValue) => boolean} inputsArg.findMatchingRecordBy
* @returns {Promise<{ProcessRecordResults}>}
*/
processRecords = async ({createOrUpdateRawValues, deleteRawValues = [], tableName, findMatchingRecordBy, fieldName}: ProcessRecordsArgs): Promise<ProcessRecordResults> => {
processRecords = async ({createOrUpdateRawValues = [], deleteRawValues = [], tableName, findMatchingRecordBy, fieldName}: ProcessRecordsArgs): Promise<ProcessRecordResults> => {
const getRecords = async (rawValues: RawValue[]) => {
// We will query a table where one of its fields can match a range of values. Hence, here we are extracting all those potential values.
const columnValues: string[] = getRangeOfValues({fieldName, raws: rawValues});