-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the init command #336
Fix the init command #336
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #336 +/- ##
==========================================
+ Coverage 83.70% 84.05% +0.35%
==========================================
Files 63 63
Lines 5690 5671 -19
Branches 743 737 -6
==========================================
+ Hits 4763 4767 +4
+ Misses 698 681 -17
+ Partials 229 223 -6 ☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,78 @@ | |||
/* | |||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. | |
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5a7297f
". but found '%s' datasource.%n", Arrays.toString(SUPPORTED_DB_PROVIDERS.toArray()), datastore); | ||
return; | ||
} | ||
|
||
if (Files.isDirectory(Paths.get(sourcePath, PERSIST_DIRECTORY, MIGRATIONS))) { | ||
errStream.println("ERROR: reinitializing persistence after executing the migrate command is not " + | ||
"permitted. please remove the migrations directory within the persist directory and try " + | ||
"executing the command again."); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we remove this too? As we are not adding any configuration, this validation is not valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5a7297f
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SYNOPSIS
bal persist generate [--module <module name>]
[--datastore <store type>]
[<-h> | <--help>]
OPTIONS
--module <module name>
The name of the module to initialize the persistence layer. If not specified, the default module will be used.
--datastore <store type>
The type of the datastore to be used for persistence.
The supported datastores are 'inmemory', 'mysql', 'mssql', 'postgresql', 'googlesheets', and redis.
-h, --help
Print the usage details of all commands.
We need to mention the options like above here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 48cc647
@@ -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. Used along with `bal build` command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add Initialize the package for persistence. Used along with `bal build` command. | |
add Initialize the package for persistence and integrate the client generation to the `bal build` command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed the suggestions in 103a302
Co-authored-by: Danesh Kuruppu <daneshk@users.noreply.github.com>
Quality Gate passedIssues Measures |
Purpose
Fixes:ballerina-platform/ballerina-library#6195
Examples
Checklist