Skip to content

Commit

Permalink
Clean up, added some deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitawootten committed Jan 21, 2022
1 parent f6f3995 commit 2a0fc44
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/mindstand/gogm)](https://goreportcard.com/report/github.com/mindstand/gogm)
[![Go Report Card](https://goreportcard.com/badge/github.com/mindstand/gogm/v2)](https://goreportcard.com/report/github.com/mindstand/gogm/v2)
[![Actions Status](https://github.com/mindstand/gogm/workflows/Go/badge.svg)](https://github.com/mindstand/gogm/actions)
[![GoDoc](https://godoc.org/github.com/mindstand/gogm?status.svg)](https://godoc.org/github.com/mindstand/gogm)
[![GoDoc](https://godoc.org/github.com/mindstand/gogm/v2?status.svg)](https://godoc.org/github.com/mindstand/gogm/v2)
# GoGM Golang Object Graph Mapper v2

```
Expand All @@ -25,6 +25,7 @@ go get -u github.com/mindstand/gogm/v2
- Primary Key strategies to use any type of primary key. GoGM is no longer UUID only!
- TLS now supported

| Note: GoGM v1 has been deprecated.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion cmd/gogmcli/gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func Generate(directory string, debug bool) error {
}

if tplRel.OtherStructField == "" {
return fmt.Errorf("oposite side not found for node [%s] on relationship [%s] and field [%s]", rel.NodeName, rel.RelationshipName, rel.Field)
return fmt.Errorf("opposite side not found for node [%s] on relationship [%s] and field [%s]", rel.NodeName, rel.RelationshipName, rel.Field)
}

if debug {
Expand Down
8 changes: 5 additions & 3 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ type Edge interface {

//inspiration from -- https://github.com/neo4j/neo4j-ogm/blob/master/core/src/main/java/org/neo4j/ogm/session/Session.java

// deprecated
//session object for ogm interactions
// ISession: V1 session object for ogm interactions
// Deprecated: use SessionV2 instead
type ISession interface {
//transaction functions
ITransaction
Expand Down Expand Up @@ -74,7 +74,8 @@ type ISession interface {
//load all with depth, filter and pagination
LoadAllDepthFilterPagination(respObj interface{}, depth int, filter dsl.ConditionOperator, params map[string]interface{}, pagination *Pagination) error

//load all edge query
// load all edge query
// Deprecated: No equivalent function in SessionV2
LoadAllEdgeConstraint(respObj interface{}, endNodeType, endNodeField string, edgeConstraint interface{}, minJumps, maxJumps, depth int, filter dsl.ConditionOperator) error

//save object
Expand Down Expand Up @@ -103,6 +104,7 @@ type ISession interface {
}

// ITransaction specifies functions for Neo4j ACID transactions
// Deprecated: Use TransactionV2 instead
type ITransaction interface {
// Begin begins transaction
Begin() error
Expand Down
2 changes: 1 addition & 1 deletion load_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func expand(gogm *Gogm, variable, label string, rels []decoratorConfig, level, d
clause := ""

for i, rel := range rels {
// check if a seperator is needed
// check if a separator is needed
if i > 0 {
clause += ", "
}
Expand Down

0 comments on commit 2a0fc44

Please sign in to comment.