Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/site/Appsody-LoopBack.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ below.
```
? Please select the datasource DbDatasource
? Select the model(s) you want to generate a repository Todo
? Please select the repository base class DefaultCrudRepository (Legacy juggler bridge)
? Please select the repository base class DefaultCrudRepository (Juggler bridge)
create src/repositories/todo.repository.ts
update src/repositories/index.ts

Expand Down
5 changes: 2 additions & 3 deletions docs/site/Behind-the-scene.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ responsibilities for typical API and/or Microservice applications.
- [**Model**](Model.md): The definition of an object in respect to the
datasource juggler. The `@loopback/repository` module provides special
decorators for adding metadata to TypeScript/JavaScript classes to use them
with the legacy implementation of DataSource Juggler. In addition,
`@loopback/repository-json-schema` module uses the decorators' metadata to
build a matching JSON Schema.
with DataSource Juggler. In addition, `@loopback/repository-json-schema`
module uses the decorators' metadata to build a matching JSON Schema.

- [**DataSources**](DataSources.md): A named configuration for a Connector
instance that represents data in an external system.
Expand Down
2 changes: 1 addition & 1 deletion docs/site/Crafting-LoopBack-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Here are the stages we are marching through toward the final version of LoopBack
- Introduce repositories to represent data access patterns such as CRUD or
Key/Value stores
- Provide a reference implementation of CRUD and KV flavors of repository
interfaces using the legacy juggler and connectors
interfaces using juggler and connectors
- Refactor/rewrite the juggler into separate modules
- Typing system
- Model and relation definition
Expand Down
14 changes: 7 additions & 7 deletions docs/site/Repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ See more examples at:

## Installation

Legacy juggler support has been enabled in `loopback-next` and can be imported
from the `@loopback/repository` package. In order to do this, save
`@loopback/repository` as a dependency in your application.
Juggler support has been enabled in `loopback-next` and can be imported from the
`@loopback/repository` package. In order to do this, save `@loopback/repository`
as a dependency in your application.

You can then install your favorite connector by saving it as part of your
application dependencies.
Expand Down Expand Up @@ -98,7 +98,7 @@ INSERT statement, which can be executed through MySQL driver for Node.js.

When a `DataSource` is instantiated, the configuration properties will be used
to initialize the connector to connect to the backend system. You can define a
DataSource using legacy Juggler in your LoopBack 4 app as follows:
DataSource using Juggler in your LoopBack 4 app as follows:

{% include code-caption.html content="src/datsources/db.datasource.ts" %}

Expand Down Expand Up @@ -155,9 +155,9 @@ Account.definition = new ModelDefinition({

## Define repositories

Use `DefaultCrudRepository` class to create a repository leveraging the legacy
juggler bridge and binding your Entity-based class with a datasource you have
configured earlier. It's recommended that you use
Use `DefaultCrudRepository` class to create a repository leveraging juggler
bridge and binding your Entity-based class with a datasource you have configured
earlier. It's recommended that you use
[Dependency Injection](Dependency-injection.md) to retrieve your datasource.

TypeScript version:
Expand Down
2 changes: 1 addition & 1 deletion docs/site/Testing-your-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ describe('Person (unit)', () => {
```

Writing a unit test for custom repository methods is not as straightforward
because `CrudRepository` is based on legacy
because `CrudRepository` is based on
[loopback-datasource-juggler](https://github.com/strongloop/loopback-datasource-juggler)
which was not designed with dependency injection in mind. Instead, use
integration tests to verify the implementation of custom repository methods. For
Expand Down
2 changes: 1 addition & 1 deletion docs/site/migration/auth/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ cd myLB4App
$ lb4 repository
? Please select the datasource DbDatasource
? Select the model(s) you want to generate a repository User, UserCredentials
? Please select the repository base class DefaultCrudRepository (Legacy juggler bridge)
? Please select the repository base class DefaultCrudRepository (Juggler bridge)
```

Create the user controller for CRUD operations:
Expand Down
2 changes: 1 addition & 1 deletion docs/site/migration/auth/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ Create corresponding repositories:
$ lb4 repository
? Please select the datasource DbDatasource
? Select the model(s) you want to generate a repository Project, Team, UserCredentials, User
? Please select the repository base class DefaultCrudRepository (Legacy juggler bridge)
? Please select the repository base class DefaultCrudRepository (Juggler bridge)
```

Create relations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Using `lb4 repository`, let's create the repository:
lb4 repository
? Please select the datasource DbDatasource
? Select the model(s) you want to generate a repository TodoListImage
? Please select the repository base class DefaultCrudRepository (Legacy juggler bridge)
? Please select the repository base class DefaultCrudRepository (Juggler bridge)
create src/repositories/todo-list-image.repository.ts
update src/repositories/index.ts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ datasources.
lb4 repository
? Please select the datasource DbDatasource
? Select the model(s) you want to generate a repository TodoList
? Please select the repository base class DefaultCrudRepository (Legacy juggler
bridge)
? Please select the repository base class DefaultCrudRepository (Juggler bridge)
create src/repositories/todo-list.repository.ts
update src/repositories/index.ts

Expand Down
3 changes: 1 addition & 2 deletions docs/site/tutorials/todo/todo-tutorial-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ list of available datasources.
lb4 repository
? Please select the datasource DbDatasource
? Select the model(s) you want to generate a repository Todo
? Please select the repository base class DefaultCrudRepository (Legacy juggler
bridge)
? Please select the repository base class DefaultCrudRepository (Juggler bridge)

create src/repositories/todo.repository.ts
update src/repositories/index.ts
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/generators/repository/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const KEY_VALUE_REPOSITORY = 'DefaultKeyValueRepository';
const BASE_REPOSITORIES = [DEFAULT_CRUD_REPOSITORY, KEY_VALUE_REPOSITORY];
const CLI_BASE_CRUD_REPOSITORIES = [
{
name: `${DEFAULT_CRUD_REPOSITORY} ${chalk.gray('(Legacy juggler bridge)')}`,
name: `${DEFAULT_CRUD_REPOSITORY} ${chalk.gray('(Juggler bridge)')}`,
value: DEFAULT_CRUD_REPOSITORY,
},
];
Expand Down
8 changes: 2 additions & 6 deletions packages/repository/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

In `lb4`, we introduce the concept of
[`repository`](https://loopback.io/doc/en/lb4/Repositories.html). In order to
implement this new feature `repository`, we are using legacy juggler bridge as a
(temporary) solution. Each model has two **parallel classes**:
implement this new feature `repository`, we are using juggler bridge. Each model
has two **parallel classes**:

- The class defined by the app developers using decorators and
`class MyModel extends Entity` syntax.
Expand All @@ -30,8 +30,4 @@ Hope this example shows the idea that even they both use the `base model` from
Juggler, LB4 model doesn't use, or even have access to some fields/entries in
the Juggler model!

As mentioned before, we are using the legacy juggler bridge as a temporary
solution. This may change in the future since the Juggler is pretty.. you know,
legacy. However, it's important to realize how LB4 deals with models.

Happy coding :D
5 changes: 0 additions & 5 deletions packages/repository/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ This module provides a common set of interfaces for interacting with databases.

## Overview

**NOTE**: This module is experimental and evolving. It is likely going to be
refactored and decomposed into multiple modules as we refine the story based on
the legacy `loopback-datasource-juggler` and connector modules from LoopBack
3.x.

This module provides data access facilities to various databases and services as
well as the constructs for modeling and accessing those data.

Expand Down
6 changes: 0 additions & 6 deletions packages/repository/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
/**
* A common set of interfaces for interacting with databases.
*
* @remarks
* *NOTE:* This module is experimental and evolving. It is likely going to be
* refactored and decomposed into multiple modules as we refine the story based
* on the legacy loopback-datasource-juggler and connector modules from LoopBack
* 3.x.
*
* This module provides data access facilities to various databases and services
* as well as the constructs for modeling and accessing those data.
*
Expand Down