loopbackio / loopbackio/loopback-connector-postgresql

LB4 discover Error after updating libraries to latest

Offen
#748 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
JavaScript
Sterne
118
Forks
184
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
5

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, lb4 discover --datasource db --schema appuser mit den aufgeführten PostgreSQL- und LoopBack-Bibliotheksversionen zu reproduzieren. Untersuche die Positionen des Stack-Traces in node_modules/loopback-connector/lib/sql.js und loopback-datasource-juggler/lib/datasource.js und vergleiche sie anschließend mit dem vorherigen Abhängigkeitssatz; fertig ist die Aufgabe, wenn die Discovery das PostgreSQL-Schema extrahiert und das Modell wie gezeigt erstellt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, nodejs, postgresql
Bereich
database
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.