Skip to content

Commit

Permalink
doc: modified README.md (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
sttk committed Oct 1, 2023
1 parent e3e8aa4 commit 8b2abcd
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ Furthermore these `Dax` structs are integrated into a single new `DaxBase`.

A `Dax` struct can be created at any unit, but it is clearer to create it at
the unit of the data source.
By doing so, the definition of a new DaxBase also serves as a list of the data
By doing so, the definition of a new `DaxBase` also serves as a list of the
data
sources being used.


Expand Down Expand Up @@ -158,8 +159,6 @@ class MapGreetDax extends DaxBase implements GreetDax {
And the following code is an example of a test case.

```
public class ReadmeTest {
@Test void testGreetLogic_morning() {
var base = new MapGreetDaxBase();
base.m.put("username", "everyone");
Expand All @@ -173,7 +172,6 @@ public class ReadmeTest {
assertEquals(base.m.get("greeting"), "Good morning, everyone.\n");
}
}
```

### Data accesses for actual use
Expand All @@ -183,8 +181,8 @@ In this example, an user name and the hour are input as an environment
variable, and greeting is output to console.
Therefore, two dax struct are created and they are integrated into a new
struct based on `DaxBase`.
Since Golang is structural typing language, this new DaxBase can be casted to
GreetDax.
Since Golang is structural typing language, this new `DaxBase` can be casted
to `GreetDax`.

The following code is an example of a dax struct which inputs an user name and
the hour from an environment variable.
Expand Down Expand Up @@ -239,14 +237,14 @@ The following code executes the above `GreetLogic` in a transaction process.
public class GreetApp {
public static void main(String[] args) {
try (var ac = Sabi.startApp()) {
executeApp();
app();
} catch (Err e) {
System.err.println(e.toString());
System.exit(1);
}
}
static void executeApp() throws Err {
static void app() throws Err {
try (var base = new GreetDaxBase()) {
base.txn(new GreetLogic());
}
Expand Down Expand Up @@ -426,7 +424,7 @@ This framework supports JDK 21 or later.

### Actually checked JDK versions:

- GraalVM CE 22.3.0 (OpenJDK 11.0.0)
- GraalVM CE 21+35.1


## License
Expand Down

0 comments on commit 8b2abcd

Please sign in to comment.