Skip to content

Column with type bigint not working properly with Oracle NUMBER #126

@jameschenjav

Description

@jameschenjav

oracledb version is 6.4.0

Table definition:

class Foo extends Table<DBConnection, 'Foo'> {
  id = this.column('id', 'bigint') // NUMBER
}

const tFoo = new Foo();

const bar = await connection
      .selectFrom(tFoo)
      .select({ id: tFoo.id })
      .where(tFoo.id.equals(1000n))
      .executeSelectOne();

It raises exception

ChainedError: NJS-044: bind object must contain one of the following attributes: "dir", "type", "maxSize", or "val"
    at .../node_modules/.pnpm/[email protected]/node_modules/ts-sql-query/queryBuilders/SelectQueryBuilder.js:119:60
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at main (.../app/main.ts:24:16)
Caused By: Error: NJS-044: bind object must contain one of the following attributes: "dir", "type", "maxSize", or "val"
    at Object.throwErr (.../node_modules/.pnpm/[email protected]/node_modules/oracledb/lib/errors.js:617:10)
    ... 5 lines matching cause stack trace ...
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Source: Error: Query executed at
    at SelectQueryBuilder.executeSelectOne (.../node_modules/.pnpm/[email protected]/node_modules/ts-sql-query/queryBuilders/SelectQueryBuilder.js:91:24)
    at main (.../app/main.ts:28:8)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions