Skip to content

Commit

Permalink
Update the help content
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhashinee committed Mar 19, 2024
1 parent 4219da0 commit 3128b14
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ EXAMPLES
$ bal persist generate --help

Generate client objects for the model definition file inside persist directory.
$ bal persist generate
$ bal persist generate --module persist --datastore mysql

26 changes: 21 additions & 5 deletions persist-cli/src/main/resources/cli-help/ballerina-persist.help
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DESCRIPTION
data persistence in a Ballerina package. This step creates the required
directories and configuration files. For example:

$ bal persist init
$ bal persist add

Define the application's data model as the next step. Use the generated
definition file in the "persist" directory to define the data model
Expand All @@ -31,11 +31,25 @@ DESCRIPTION
Department department;
|};

Then, generate the client API based on the data model. Use the generated
API to query and manipulate the persistent data in the application.
Then, generate the client API based on the data model. You can use the build command to generate the client.
It will try to generate the client each time you build the project if you change the model.
Use the generated API to query and manipulate the persistent data in the application.
For example:

$ bal persist generate
$ bal build

Apart from the above commands, the following commands are also available:

$ bal persist init

This command initializes the package for persistence and used in one time generation of the clients.
This command will create a new directory named 'persist' in the project directory. The 'persist' directory will
contain empty model definition file which can be used to define the data model of the Ballerina project.

$ bal persist generate --module persist --datastore mysql

This command generates the client API based on the data model defined in the "persist" directory. Usually used
for one time generation of the client.

OPTIONS
-h, --help
Expand All @@ -44,7 +58,9 @@ OPTIONS
BALLERINA COMMANDS
The below is a list of available subcommands:

init Initialize the package for persistence
add Initialize the package for persistence
init Initialize the package for persistence for one time code generation. Used along with
`generate` command.
generate Generate the client API based on the data model defined in the "persist" directory

Use 'bal persist <command> --help' for more information on a specific command.

0 comments on commit 3128b14

Please sign in to comment.