Skip to content
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

feat: implement fragment marker and select for query #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ language itself. For further information, please refer to the
- Currently, the focus is on structured and deterministic data.
- Might be added in the future though.

## Knowhow

- https://www.appdynamics.com/blog/product/common-application-problems-and-how-to-fix-them-the-select-n-1-problem/
- https://www.sitepoint.com/silver-bullet-n1-problem/
- https://nhibernate.info/doc/howto/various/lazy-loading-eager-loading.html
- https://github.com/mindstand/gogm


## Maintainers & Contributors

- Marc Binz (Author/Owner)
Expand Down
18 changes: 17 additions & 1 deletion som.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
type Record = Node // TODO: should we use this?

type Node struct {
tableRef

// include query info into each node resulting from a query?:
// status string
// time string
Expand All @@ -15,7 +17,9 @@ type Node struct {

// Edge describes an edge between two Node elements.
// It may have its own fields.
type Edge struct{}
type Edge struct {
tableRef
}

type Timestamps struct {
CreatedAt time.Time
Expand All @@ -36,3 +40,15 @@ type Password string
// Applying this struct to a type within your model package will ensure
// that this type is never considered for the generated layer.
type Meta struct{}

type tableRef struct {
fragment bool
}

func IsFragment(ref tableRef) bool {
return ref.fragment
}

func MarkFragment(ref *tableRef) {
ref.fragment = true
}