Skip to content

Commit

Permalink
Gizmo: make methods lower case (#822)
Browse files Browse the repository at this point in the history
* Make gizmo methods lower case

* Fix tests

* Fix integration tests

* Fixed integration tests

* fixed integrations test

* Make constructors capitalised

* Use DecodeRuneInString

* Backwards compatibility

* Update docs

* Updated examples in code

* Update more examples

* Update more examples

* Remove CapitalizedNew methods
  • Loading branch information
iddan authored Sep 22, 2019
1 parent b61955a commit 39953e0
Show file tree
Hide file tree
Showing 9 changed files with 641 additions and 408 deletions.
30 changes: 15 additions & 15 deletions docs/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To select all vertices in the graph call, limit to 5 first results.
`g` and `V` are synonyms for `graph` and `Vertex` respectively, as they are quite common.

```javascript
g.V().GetLimit(5);
g.V().getLimit(5);
```

### Match a property of a vertex
Expand All @@ -58,25 +58,25 @@ Find vertex with property "Humphrey Bogart"

```javascript
g.V()
.Has("<name>", "Humphrey Bogart")
.All();
.has("<name>", "Humphrey Bogart")
.all();
```

You may start to notice a pattern here: with Gizmo, the query lines tend to:

Start somewhere in the graph | Follow a path | Run the query with "All" or "GetLimit"
Start somewhere in the graph | Follow a path | Run the query with "all" or "getLimit"

### Match a complex path

Get the list of actors in the film

```javascript
g.V()
.Has("<name>", "Casablanca")
.Out("</film/film/starring>")
.Out("</film/performance/actor>")
.Out("<name>")
.All();
.has("<name>", "Casablanca")
.out("</film/film/starring>")
.out("</film/performance/actor>")
.out("<name>")
.all();
```

### Match
Expand All @@ -86,14 +86,14 @@ This is starting to get long. Let's use a Morphism, a pre-defined path stored in
```javascript
var filmToActor = g
.Morphism()
.Out("</film/film/starring>")
.Out("</film/performance/actor>");
.out("</film/film/starring>")
.out("</film/performance/actor>");

g.V()
.Has("<name>", "Casablanca")
.Follow(filmToActor)
.Out("<name>")
.All();
.has("<name>", "Casablanca")
.follow(filmToActor)
.out("<name>")
.all();
```

To learn more about querying see [Gizmo Documentation](GizmoAPI.md)
Expand Down
Loading

0 comments on commit 39953e0

Please sign in to comment.