Skip to content

Commit 8e9bfbf

Browse files
committed
rename index Docs -> TargetDocs
1 parent d4e2af5 commit 8e9bfbf

File tree

19 files changed

+1352
-1348
lines changed

19 files changed

+1352
-1348
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.12.1
2+
current_version = 0.13.0
33
commit = False
44
tag = False
55

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version := "0.12.1"
1+
version := "0.13.0"
22

33
.DEFAULT_GOAL := help
44

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ https://graphikdb.github.io/graphik/
77

88
`git clone git@github.com:graphikDB/graphik.git`
99

10-
`docker pull graphikdb/graphik:v0.12.1`
10+
`docker pull graphikdb/graphik:v0.13.0`
1111

1212
Graphik is a Backend as a Service implemented as an identity-aware, permissioned, persistant document/graph database & pubsub server written in Go.
1313

@@ -903,7 +903,7 @@ add this docker-compose.yml to ${pwd}:
903903
version: '3.7'
904904
services:
905905
graphik:
906-
image: graphikdb/graphik:v0.12.1
906+
image: graphikdb/graphik:v0.13.0
907907
env_file:
908908
- .env
909909
ports:

database/db.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ func (g *Graph) setIndex(ctx context.Context, tx *bbolt.Tx, i *apipb.Index) (*ap
202202
if err != nil {
203203
return nil, err
204204
}
205-
current.Connections = i.Connections
206-
current.Docs = i.Docs
205+
current.TargetConnections = i.TargetConnections
206+
current.TargetDocs = i.TargetDocs
207207
current.Gtype = i.Gtype
208208
current.Expression = i.Expression
209209
bits, err := proto.Marshal(current)
@@ -223,10 +223,10 @@ func (g *Graph) setIndex(ctx context.Context, tx *bbolt.Tx, i *apipb.Index) (*ap
223223
if err := indexBucket.Put([]byte(i.GetName()), bits); err != nil {
224224
return nil, err
225225
}
226-
if i.Connections {
226+
if i.TargetConnections {
227227
tx.Bucket(dbIndexConnections).CreateBucketIfNotExists([]byte(i.GetName()))
228228
}
229-
if i.Docs {
229+
if i.TargetDocs {
230230
tx.Bucket(dbIndexDocs).CreateBucketIfNotExists([]byte(i.GetName()))
231231
}
232232
return i, nil
@@ -432,7 +432,7 @@ func (g *Graph) setDoc(ctx context.Context, tx *bbolt.Tx, doc *apipb.Doc) (*apip
432432
return nil, err
433433
}
434434
g.rangeIndexes(func(i *index) bool {
435-
if i.index.GetDocs() && i.index.GetGtype() == doc.GetRef().GetGtype() {
435+
if i.index.GetTargetDocs() && i.index.GetGtype() == doc.GetRef().GetGtype() {
436436
if err := i.decision.Eval(docMap); err == nil {
437437
err = g.setIndexedDoc(ctx, tx, i.index.Name, []byte(doc.GetRef().GetGid()), bits)
438438
if err != nil {
@@ -538,7 +538,7 @@ func (g *Graph) setConnection(ctx context.Context, tx *bbolt.Tx, connection *api
538538
g.connectionsFrom[connection.GetTo().String()][refstr] = struct{}{}
539539
}
540540
g.rangeIndexes(func(i *index) bool {
541-
if i.index.Connections && i.index.GetGtype() == connection.GetRef().GetGtype() {
541+
if i.index.GetTargetConnections() && i.index.GetGtype() == connection.GetRef().GetGtype() {
542542
if err := i.decision.Eval(connMap); err == nil {
543543
err = g.setIndexedConnection(ctx, tx, []byte(i.index.Name), []byte(connection.GetRef().GetGid()), bits)
544544
if err != nil {
@@ -764,7 +764,7 @@ func (g *Graph) delDoc(ctx context.Context, tx *bbolt.Tx, path *apipb.Ref) error
764764
return true
765765
})
766766
g.rangeIndexes(func(index *index) bool {
767-
if index.index.Docs && index.index.GetGtype() == doc.GetRef().GetGtype() {
767+
if index.index.GetTargetDocs() && index.index.GetGtype() == doc.GetRef().GetGtype() {
768768
g.delIndexedDoc(ctx, tx, []byte(index.index.Name), []byte(path.GetGid()))
769769
}
770770
return true
@@ -798,7 +798,7 @@ func (g *Graph) delConnection(ctx context.Context, tx *bbolt.Tx, path *apipb.Ref
798798
}
799799
g.mu.Unlock()
800800
g.rangeIndexes(func(index *index) bool {
801-
if index.index.Connections && index.index.GetGtype() == path.GetGtype() {
801+
if index.index.GetTargetConnections() && index.index.GetGtype() == path.GetGtype() {
802802
g.delIndexedConnection(ctx, tx, []byte(index.index.Name), []byte(path.GetGid()))
803803
}
804804
return true

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.7'
22
services:
33
graphik:
4-
image: graphikdb/graphik:v0.12.1
4+
image: graphikdb/graphik:v0.13.0
55
env_file:
66
- .env
77
ports:

gen/grpc/csharp/Graphik.cs

Lines changed: 204 additions & 203 deletions
Large diffs are not rendered by default.

gen/grpc/docs/index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,17 +1939,17 @@ <h3 id="api.Index">Index</h3>
19391939
</tr>
19401940

19411941
<tr>
1942-
<td>docs</td>
1942+
<td>target_docs</td>
19431943
<td><a href="#bool">bool</a></td>
19441944
<td></td>
1945-
<td><p>if docs is true, this index will be applied to documents. Either docs or connections may be true, but not both. </p></td>
1945+
<td><p>if target_docs is true, this index will be applied to documents. </p></td>
19461946
</tr>
19471947

19481948
<tr>
1949-
<td>connections</td>
1949+
<td>target_connections</td>
19501950
<td><a href="#bool">bool</a></td>
19511951
<td></td>
1952-
<td><p>if docs is true, this index will be applied to connections. Either docs or connections may be true, but not both. </p></td>
1952+
<td><p>if target_connections is true, this index will be applied to connections. </p></td>
19531953
</tr>
19541954

19551955
</tbody>
@@ -2040,17 +2040,17 @@ <h3 id="api.IndexConstructor">IndexConstructor</h3>
20402040
</tr>
20412041

20422042
<tr>
2043-
<td>docs</td>
2043+
<td>target_docs</td>
20442044
<td><a href="#bool">bool</a></td>
20452045
<td></td>
2046-
<td><p>if docs is true, this index will be applied to documents. Either docs or connections may be true, but not both. </p></td>
2046+
<td><p>if target_docs is true, this index will be applied to documents. </p></td>
20472047
</tr>
20482048

20492049
<tr>
2050-
<td>connections</td>
2050+
<td>target_connections</td>
20512051
<td><a href="#bool">bool</a></td>
20522052
<td></td>
2053-
<td><p>if docs is true, this index will be applied to connections. Either docs or connections may be true, but not both. </p></td>
2053+
<td><p>if target_connections is true, this index will be applied to connections. </p></td>
20542054
</tr>
20552055

20562056
</tbody>

0 commit comments

Comments
 (0)