loopbackio / loopbackio/loopback-connector-ibmi
"Numeric value out of range" then filtering on a numeric table column
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
We are getting the Error [IBM][System i Access ODBC Driver]Column 3: Numeric value out of range. by using the loopback-connector-ibmi. We debugged through the progress and found out, that it happens on filtering records by a numeric field which is allowed to contain 7 digits. The given filter got a value with 8 digits.
Our database table column is defined like this: KOATRNR NUMERIC(7,0)
Our filter-Json, which we are passing to the ODBC-connector, looks like this:
{where: {KOARTNR: {inq: [1,1234567,12345678]}}}
As you can see, the last value contains a number with 8 digits, one more as the table column is capable to store. The interesting point is, a simple SQL-SELECT like this SELECT * FROM table WHERE KOARTNR IN (1,1234567,12345678) works without an error.
Based on the above data we are now assuming, that there might be a bug inside the connector.

Currently using these versions:
"@loopback/boot": "^1.5.6",
"@loopback/context": "^1.23.0",
"@loopback/core": "^1.10.2",
"@loopback/openapi-v3": "^1.9.7",
"@loopback/repository": "^1.14.0",
"@loopback/rest": "^1.19.0",
"@loopback/rest-explorer": "^1.3.7",
"@loopback/service-proxy": "^1.3.6",
"dotenv": "^8.2.0",
"loopback-connector-ibmi": "^1.0.0-beta.1"
"@loopback/build": "^2.0.11",
"source-map-support": "^0.5.13",
"@loopback/testlab": "^1.8.1",
"@types/node": "^10.14.18",
"@typescript-eslint/parser": "^2.3.0",
"@typescript-eslint/eslint-plugin": "^2.3.0",
"@loopback/eslint-config": "^4.1.0",
"eslint": "^6.4.0",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-eslint-plugin": "^2.1.0",
"eslint-plugin-mocha": "^6.1.1",
"typescript": "~3.6.3"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the loopback-connector-ibmi ODBC query using the shown NUMERIC(7,0) column and the inq filter containing 12345678. Trace how the connector builds and executes the filtered query, compare it with the direct SQL example, and verify that the resulting behavior for an out-of-range value is handled as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100