| 32 | } |
| 33 | |
| 34 | getExecOptions() { |
| 35 | const execOpts = { outFormat: this.outFormat, autoCommit: this.autoCommit }; |
| 36 | |
| 37 | // We set the oracledb |
| 38 | const oracledb = this.sequelize.connectionManager.lib; |
| 39 | |
| 40 | if (this.model && this.isSelectQuery()) { |
| 41 | const fInfo = {}; |
| 42 | const keys = Object.keys(this.model.tableAttributes); |
| 43 | for (const key of keys) { |
| 44 | const keyValue = this.model.tableAttributes[key]; |
| 45 | if (keyValue.type.key === 'DECIMAL') { |
| 46 | fInfo[key] = { type: oracledb.STRING }; |
| 47 | } |
| 48 | // Fetching BIGINT as string since, node-oracledb doesn't support JS BIGINT yet |
| 49 | if (keyValue.type.key === 'BIGINT') { |
| 50 | fInfo[key] = { type: oracledb.STRING }; |
| 51 | } |
| 52 | } |
| 53 | if ( fInfo ) { |
| 54 | execOpts.fetchInfo = fInfo; |
| 55 | } |
| 56 | } |
| 57 | return execOpts; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * convert binding values for unsupported |