-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'revert-271-revert-268-main' of https://github.com/Bhash…
…inee/module-ballerina-persist into revert-271-revert-268-main
- Loading branch information
Showing
7 changed files
with
263 additions
and
37 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
9 changes: 9 additions & 0 deletions
9
compiler-plugin-test/src/test/resources/project_10/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,9 @@ | ||
[package] | ||
org = "root" | ||
name = "project_10" | ||
version = "0.1.0" | ||
|
||
[[tool.persist]] | ||
id = "project10" | ||
options.datastore = "redis" | ||
filePath = "persist/model.bal" |
85 changes: 85 additions & 0 deletions
85
compiler-plugin-test/src/test/resources/project_10/persist/field-types.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,85 @@ | ||
import ballerina/time; | ||
import ballerinax/redis; | ||
import ballerina/persist as _; | ||
|
||
public enum Gender { | ||
M, | ||
F | ||
} | ||
|
||
public type MedicalNeed record {| | ||
readonly int needId; | ||
readonly string stringNeedId?; | ||
|
||
boolean booleanType; | ||
int intType; | ||
float floatType; | ||
decimal decimalType; | ||
string stringType; | ||
string? stringNillableType; | ||
time:Date dateType; | ||
time:Date? dateNillableType; | ||
time:TimeOfDay timeOfDayType; | ||
time:Utc utcType; | ||
time:Civil civilType; | ||
Gender gender; | ||
redis:Client clientType; | ||
json jsonTest; | ||
error errorType; | ||
|
||
boolean booleanTypeOptional?; | ||
time:Civil|string unionType; | ||
|
||
Gender[] genderArray; | ||
byte[] beneficiaryIdByteArray; | ||
boolean[] booleanArray; | ||
json[] jsonArray; | ||
time:Civil[] periodArray; | ||
error[] errorArrayType; | ||
redis:Client[] clientArrayType; | ||
|}; | ||
|
||
type Employee record {| | ||
readonly string empNo; | ||
string firstName; | ||
string lastName; | ||
time:Date birthDate; | ||
Gender gender; | ||
time:Date hireDate; | ||
|
||
Department department; | ||
Workspace workspace; | ||
|}; | ||
|
||
type Workspace record {| | ||
readonly string workspaceId; | ||
string workspaceType; | ||
|
||
Building location; | ||
Employee[] employees; | ||
|}; | ||
|
||
type Building record {| | ||
readonly string buildingCode; | ||
string city; | ||
string state; | ||
string country; | ||
string postalCode; | ||
string 'type; | ||
|
||
Workspace[] workspaces; | ||
|}; | ||
|
||
type Department record {| | ||
readonly string deptNo; | ||
string deptName; | ||
|
||
Employee[] employees; | ||
|}; | ||
|
||
type OrderItem record {| | ||
readonly string orderId; | ||
readonly string itemId; | ||
int quantity; | ||
string notes; | ||
|}; |
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
Oops, something went wrong.