Skip to content

Commit d4ba36b

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents c06718c + 6f9908f commit d4ba36b

File tree

8 files changed

+19
-22
lines changed

8 files changed

+19
-22
lines changed

README.md

+15-18
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,45 @@
22

33
# D3 ORM
44

5-
D3 is golang ORM and DataMapper. This project was design with respect to such
6-
ORM's like hibernate and doctrine. Main task - give an instrument for create
7-
nice domain layer. If your business code not expressive enough, or if you want unit
8-
tests without a database, or if in your application, for some reason, you need aggregates,
9-
repositories, entities and value objects - d3 can be a good choice.
5+
D3 is a golang ORM and DataMapper. This project was designed with respect to such
6+
ORM's like hibernate and doctrine. The main task - give an instrument to create a nice domain layer. If your business code not expressive enough, or if you want unit tests without a database, or if in your application, for some reason, you need aggregates,
7+
repositories, entities, and value objects - d3 can be a good choice.
108

119
## Motivation. Why another ORM?
1210

13-
In my opinion in GO have a lot of good ORM's. They are pretty fast and
14-
may save the developer from a lot of boilerplate code. But, if you want to write code
11+
In my opinion in GO have a lot of good ORM's. They are pretty fast and may save the developer from a lot of boilerplate code. But, if you want to write code
1512
in DDD style (using DDD patterns and philosophy) it's not enough,
1613
because DDD approach imposes certain requirements. Main requirement -
17-
persistence ignorance. Current GO ORM's do not provide sufficient level of abstraction for this.
18-
Other words, we need keep business logic free of data access code. That's why D3 created.
14+
persistence ignorance. Current GO ORM's do not provide a sufficient level of abstraction for this.
15+
In other words, we need to keep business logic free of data access code. That's why D3 created.
1916

2017
## Main futures
2118

2219
- code generation instead of reflection
23-
- db schema auto generation
24-
- one-to-one, one-to-many and many-to-many relations
20+
- DB schema auto-generation
21+
- one-to-one, one-to-many, and many-to-many relations
2522
- lazy and eager relation loading
2623
- query builder
2724
- relation fetch strategies (eager/lazy as above or extract relation in one query with join)
2825
- fetched entity cache (first level cache)
2926
- cascade remove and update of related entities
30-
- application level transaction (UnitOfWork)
31-
- db transactions support
32-
- smart persist layer don't generate redundant queries on entity updates
27+
- application-level transaction (UnitOfWork)
28+
- DB transactions support
29+
- smart persist layer doesn't generate redundant queries on entity updates
3330
- UUID support
3431

3532
## Documentation
3633

37-
All documentation is on project [wiki](https://github.com/godzie44/d3/wiki/Table-of-contents).
34+
All documentation is on the project [wiki](https://github.com/godzie44/d3/wiki).
3835

3936
## Example of usage
4037

41-
Full example of usage you can see in [this](https://github.com/godzie44/last-wish) project. Note, that is it is a test project
42-
with main responsibility show d3 orm in action.
38+
A full example of usage you can see in [this](https://github.com/godzie44/last-wish) project. Note, that is it is a test project
39+
with main responsibility show d3 ORM in action.
4340

4441
## Tests
4542

46-
D3 integration tests require a postgreSQL database. Connect to the database specified in the D3_PG_TEST_DB environment variable.
43+
D3 integration tests require a PostgreSQL database. Connect to the database specified in the D3_PG_TEST_DB environment variable.
4744

4845
## Roadmap
4946

cmd/d3/main.go d3/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"flag"
55
"fmt"
6-
d3parser "github.com/godzie44/d3/cmd/d3/parser"
6+
d3parser "github.com/godzie44/d3/d3/parser"
77
"github.com/godzie44/d3/orm/gen/bootstrap"
88
"golang.org/x/sync/errgroup"
99
"os"
File renamed without changes.
File renamed without changes.
File renamed without changes.

cmd/d3/parser/parser_test.go d3/parser/parser_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestParser(t *testing.T) {
1717
err := p.Parse("./parser_test.go")
1818
assert.NoError(t, err)
1919

20-
assert.Equal(t, "github.com/godzie44/d3/cmd/d3/parser", p.PkgPath)
20+
assert.Equal(t, "github.com/godzie44/d3/d3/parser", p.PkgPath)
2121
assert.Equal(t, "parser", p.PkgName)
2222
assert.Equal(t, []EntityMeta{{Name: "parsedStruct"}}, p.Metas)
2323
}

orm/gen/bootstrap/boot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package bootstrap
22

33
import (
44
"bytes"
5-
"github.com/godzie44/d3/cmd/d3/parser"
5+
"github.com/godzie44/d3/d3/parser"
66
"go/format"
77
"html/template"
88
"io"

orm/gen/bootstrap/boot_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package bootstrap
22

33
import (
44
"bytes"
5-
"github.com/godzie44/d3/cmd/d3/parser"
5+
"github.com/godzie44/d3/d3/parser"
66
"github.com/stretchr/testify/assert"
77
"strings"
88
"testing"

0 commit comments

Comments
 (0)