* convert binding values for unsupported * types in connector library * * @param {string} bindingDictionary a string representing the key to scan * @param {object} oracledb native oracle library * @private
(bindingDictionary, oracledb)
| 66 | * @private |
| 67 | */ |
| 68 | _convertBindAttributes(bindingDictionary, oracledb) { |
| 69 | if (this.model && this.options[bindingDictionary]) { |
| 70 | // check against model if we have some BIGINT |
| 71 | const keys = Object.keys(this.model.tableAttributes); |
| 72 | for (const key of keys) { |
| 73 | const keyValue = this.model.tableAttributes[key]; |
| 74 | if (keyValue.type.key === 'BIGINT') { |
| 75 | const oldBinding = this.options[bindingDictionary][key]; |
| 76 | if (oldBinding) { |
| 77 | this.options[bindingDictionary][key] = { |
| 78 | ...oldBinding, |
| 79 | type: oracledb.STRING, |
| 80 | maxSize: 10000000 //TOTALLY ARBITRARY Number to prevent query failure |
| 81 | }; |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | async run(sql, parameters) { |
| 89 | // We set the oracledb |