|
|
|
@ -33,6 +33,7 @@ interface RunConfig { |
|
|
|
sort?: SortJson |
|
|
|
paginate?: PaginationJson |
|
|
|
row?: Row |
|
|
|
rows?: Row[] |
|
|
|
} |
|
|
|
|
|
|
|
module External { |
|
|
|
@ -600,7 +601,7 @@ module External { |
|
|
|
throw `Unable to process query, table "${tableName}" not defined.` |
|
|
|
} |
|
|
|
// look for specific components of config which may not be considered acceptable
|
|
|
|
let { id, row, filters, sort, paginate } = cleanupConfig(config, table) |
|
|
|
let { id, row, filters, sort, paginate, rows } = cleanupConfig(config, table) |
|
|
|
filters = buildFilters(id, filters || {}, table) |
|
|
|
const relationships = this.buildRelationships(table) |
|
|
|
// clean up row on ingress using schema
|
|
|
|
@ -626,7 +627,7 @@ module External { |
|
|
|
sort, |
|
|
|
paginate, |
|
|
|
relationships, |
|
|
|
body: row, |
|
|
|
body: row || rows, |
|
|
|
// pass an id filter into extra, purely for mysql/returning
|
|
|
|
extra: { |
|
|
|
idFilter: buildFilters(id || generateIdForRow(row, table), {}, table), |
|
|
|
|