Skip to content

Relax error to warning for "getting the Oracle Client version" for Knex #1582

@robmcguinness

Description

@robmcguinness

First, thanks for thin client. Really improves the developer experience when leveraging node-oracledb in Nodejs.

Problem Statement

Trying to leverage node-oracledb thin mode with knex and running into issues with migrations. Knex makes a clone of the Oracle client during the migration initialization phase which leverages lodash merge underneath. Lodash merge iterates through the Oracle client properties which eventually triggers a call to the getter for oracleClientVersion

get oracleClientVersion() {

Feature Request

Can this error be converted to a warning instead for lib compatibility? Knex is one of the few query builders in the Nodejs ecosystem that supports Oracle. Fixing the upstream lib would take more work.

Commenting lines below resolves issue with Knex migrations.

get oracleClientVersion() {
  if (_initOracleClientArgs === undefined) {
    // errors.throwNotImplemented("getting the Oracle Client version");
  }
  return settings.oracleClientVersion;
},

get oracleClientVersionString() {
  if (_initOracleClientArgs === undefined) {
    // errors.throwNotImplemented("getting the Oracle Client version");
  }
  return settings.oracleClientVersionString;
},

Besides this issue, thin mode appears to work with current version of Knex. For reference, Knex feature request for node-oracledb v6.0 compatibility knex/knex#5615

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions