Skip to content

LB4 discover Error after updating libraries to latest #748

Open
@ingpconci

Description

@ingpconci

Steps to reproduce

Updating loopback libraries

"@loopback/authentication": "^11.0.11", "@loopback/authentication-jwt": "^0.15.11", "@loopback/authorization": "^0.15.11", "@loopback/boot": "^7.0.11", "@loopback/context": "^7.0.11", "@loopback/core": "^6.1.8", "@loopback/openapi-v3": "^10.0.11", "@loopback/repository": "^7.0.11", "@loopback/rest": "^14.0.11", "@loopback/rest-explorer": "^7.0.11", "@loopback/service-proxy": "^7.0.11", "loopback-connector-rest": "^5.0.1",
and PostgreSQL connector
"loopback-connector-postgresql": "^7.1.10",

Current Behavior

The tool
lb4 discover --datasource db --schema appuser

failed with the Error:

Error: buildQueryUniqueKeys must be implemented by the connector at SQLConnector.buildQueryUniqueKeys (C:\Users\Paolo Conci\Documents\PROJECTS_LOCAL_WORKSPACE\L_FBK_MNFLims\APP_SERVER\fbk-fablims-server\node_modules\loopback-connector\lib\sql.js:2159:9) at SQLConnector.discoverUniqueKeys (C:\Users\Paolo Conci\Documents\PROJECTS_LOCAL_WORKSPACE\L_FBK_MNFLims\APP_SERVER\fbk-fablims-server\node_modules\loopback-connector\lib\sql.js:2180:20) at DataSource.discoverUniqueKeys (C:\Users\Paolo Conci\Documents\PROJECTS_LOCAL_WORKSPACE\L_FBK_MNFLims\APP_SERVER\fbk-fablims-server\node_modules\loopback-datasource-juggler\lib\datasource.js:1346:20)

Expected Behavior

With the previous libraries
"@loopback/authentication": "^11.0.8", "@loopback/authentication-jwt": "^0.15.8", "@loopback/authorization": "^0.15.8", "@loopback/boot": "^7.0.8", "@loopback/core": "^6.1.5", "@loopback/repository": "^7.0.8", "@loopback/rest": "^14.0.8", "@loopback/rest-explorer": "^7.0.8", "@loopback/service-proxy": "^7.0.8", "debug": "^4.3.7", "file-type": "^16.0.0", "jsonwebtoken": "^9.0.0", "loopback-connector-postgresql": "^7.1.5",
the tool extracts the DB information from Postgresql

lb4 discover --datasource db --schema appuser ? Select the models which to discover userTodo ? Select a convention to convert db column names(EXAMPLE_COLUMN) to model property names: (Use arrow keys) ? Select a convention to convert db column names(EXAMPLE_COLUMN) to model property names: Camel case (exampleColumn) (Recommended) create src\models\user-todo.model.ts

Link to reproduction sandbox

Additional information

Related Issues

See Reporting Issues for more tips on writing good issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions