Synopsis

LoopBack makes it simple to create models from an existing relational database.This process is called discovery and is supported by the following connectors:

  • Cassandra
  • MySQL
  • Oracle
  • PostgreSQL
  • SQL Server
  • IBM DB2
  • IBM DashDB
  • IBM DB2 for z/OS
  • SAP HANA - Notofficially supported;

Overview

Models can be discovered from a supported datasource by running thelb4 discover command.

The LoopBack project must be built and contain the built datasource files inPROJECT_DIR/dist/datasources/*.js

Options

—dataSource: Put a valid datasource name here to skip the datasource prompt

—views: Choose whether to discover views. Default is true

—all: Skips the model prompt and discovers all of them

—outDir: Specify the directory into which the model.model.ts files will beplaced. Default is src/models

—schema: Specify the schema which the datasource will find the models todiscover