(res: QueryExecResult[])
| 167 | } |
| 168 | options.select = options.select.replace(/ ASCENDING/ig, " ASC"); |
| 169 | options.select = options.select.replace(/ DESCENDING/ig, " DESC"); |
| 170 | options.select = options.select.replace(/~/g, "."); |
| 171 | options.select = options.select.replace(/ LIMIT 0/g, ""); // hack, todo |
| 172 | // SQLite has no LEFT()/RIGHT() functions, translate to substr() |
| 173 | options.select = options.select.replace(/\bLEFT\s*\(\s*(.+?)\s*,\s*(\d+)\s*\)/ig, "substr($1, 1, $2)"); |
| 174 | options.select = options.select.replace(/\bRIGHT\s*\(\s*(.+?)\s*,\s*(\d+)\s*\)/ig, "substr($1, -$2)"); |
| 175 | |
| 176 | if (this.trace === true) { |
| 177 | console.log(options.select); |
| 178 | } |
| 179 | |
| 180 | try { |
| 181 | res = this.sqlite!.exec(options.select); |
| 182 | } catch (error) { |
| 183 | // @ts-ignore |
| 184 | if (abap.Classes["CX_SY_DYNAMIC_OSQL_SEMANTICS"] !== undefined) { |
| 185 | // @ts-ignore |
| 186 | throw await new abap.Classes["CX_SY_DYNAMIC_OSQL_SEMANTICS"]().constructor_({sqlmsg: error.message || ""}); |
| 187 | } |
| 188 | throw error; |
no outgoing calls
no test coverage detected