-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #313 from kaneeldias/x
- Loading branch information
Showing
22 changed files
with
676 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
persist-cli-tests/src/test/resources/test-src/input/tool_test_generate_65/Ballerina.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
org = "foo" | ||
name = "persist_generate_65" | ||
version = "0.1.0" | ||
distribution = "2201.3.0" | ||
|
||
[build-options] | ||
observabilityIncluded = false | ||
|
||
[persist] | ||
datastore = "mysql" | ||
module = "persist_generate_65" |
21 changes: 21 additions & 0 deletions
21
persist-cli-tests/src/test/resources/test-src/input/tool_test_generate_65/main.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org) All Rights Reserved. | ||
// | ||
// WSO2 LLC. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
import ballerina/io; | ||
|
||
public function main() { | ||
io:println("hello"); | ||
} |
50 changes: 50 additions & 0 deletions
50
persist-cli-tests/src/test/resources/test-src/input/tool_test_generate_65/persist/model.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org) All Rights Reserved. | ||
// | ||
// WSO2 LLC. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
import ballerina/persist as _; | ||
|
||
type Book record {| | ||
readonly string bookId; | ||
string title; | ||
string author; | ||
decimal price; | ||
int stock; | ||
OrderItem? orderitem; | ||
|}; | ||
|
||
type Order record {| | ||
readonly string orderId; | ||
string customerId; | ||
string createdAt; | ||
decimal totalPrice; | ||
OrderItem[] orderItems; | ||
Payment? payment; | ||
|}; | ||
|
||
type OrderItem record {| | ||
readonly string orderItemId; | ||
int quantity; | ||
decimal price; | ||
Book book; | ||
Order 'order; | ||
|}; | ||
|
||
type Payment record {| | ||
readonly string paymentId; | ||
decimal paymentAmount; | ||
string paymentDate; | ||
Order 'order; | ||
|}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
persist-cli-tests/src/test/resources/test-src/output/tool_test_generate_65/Ballerina.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
org = "foo" | ||
name = "persist_generate_65" | ||
version = "0.1.0" | ||
distribution = "2201.3.0" | ||
|
||
[build-options] | ||
observabilityIncluded = false | ||
|
||
[persist] | ||
datastore = "mysql" | ||
module = "persist_generate_65" |
7 changes: 7 additions & 0 deletions
7
persist-cli-tests/src/test/resources/test-src/output/tool_test_generate_65/Config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[persist_generate_65] | ||
host = "localhost" | ||
port = 3306 | ||
user = "root" | ||
password = "" | ||
database = "" | ||
|
Oops, something went wrong.