File tree Expand file tree Collapse file tree 7 files changed +257
-399
lines changed Expand file tree Collapse file tree 7 files changed +257
-399
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## [ v20.03.0] - 2020-04-01
9
+
10
+ ### Changed
11
+
12
+ - Synced proto files to latest version to support background indexing ([ #110 ] [ ] )
13
+
14
+ [ #110 ] : https://github.com/dgraph-io/dgraph-js/issues/110
15
+
8
16
## [ v2.1.0] - 2020-01-30
9
17
10
18
### Fixed
@@ -138,6 +146,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
138
146
### Added
139
147
- Full compatibility with Dgraph v1.0.0
140
148
149
+ [ v20.03.0 ] : https://github.com/dgraph-io/dgraph-js/compare/v2.1.0...v20.03.0
141
150
[ v2.1.0 ] : https://github.com/dgraph-io/dgraph-js/compare/v2.0.2...v2.1.0
142
151
[ v2.0.2 ] : https://github.com/dgraph-io/dgraph-js/compare/v2.0.1...v2.0.2
143
152
[ v2.0.1 ] : https://github.com/dgraph-io/dgraph-js/compare/v2.0.0...v2.0.1
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ use a different version of this client.
65
65
| :--------------:| :-----------------:|
66
66
| 1.0.X | * 1.X.Y* |
67
67
| 1.1.X | * 2.X.Y* |
68
+ | 20.03.0 | * 20.03.0* |
68
69
69
70
Note: Only API breakage from * v1.X.Y* to * v2.X.Y* is in
70
71
the function ` DgraphClient.newTxn().mutate() ` . This function returns a ` messages.Assigned `
@@ -113,6 +114,19 @@ op.setSchema(schema);
113
114
await dgraphClient .alter (op);
114
115
```
115
116
117
+ Starting Dgraph version 20.03.0, indexes can be computed in the background.
118
+ You can set ` setRunInBackground ` field of the ` Operation ` object to ` true `
119
+ before passing it to the ` DgraphClient#alter(Operation) ` method. You can find more details
120
+ [ here] ( https://docs.dgraph.io/master/query-language/#indexes-in-background ) .
121
+
122
+ ``` js
123
+ const schema = " name: string @index(exact) ." ;
124
+ const op = new dgraph.Operation ();
125
+ op .setSchema (schema);
126
+ op .setRunInBackground (true );
127
+ await dgraphClient .alter (op);
128
+ ```
129
+
116
130
> NOTE: Many of the examples here use the ` await ` keyword which requires
117
131
> ` async/await ` support which is available on Node.js >= v7.6.0. For prior versions,
118
132
> the expressions following ` await ` can be used just like normal ` Promise ` :
@@ -420,3 +434,4 @@ Make sure you have a Dgraph server running on localhost before you run this task
420
434
``` sh
421
435
npm test
422
436
```
437
+
Original file line number Diff line number Diff line change @@ -189,6 +189,9 @@ export class Operation extends jspb.Message {
189
189
getDropValue ( ) : string ;
190
190
setDropValue ( value : string ) : void ;
191
191
192
+ getRunInBackground ( ) : boolean ;
193
+ setRunInBackground ( value : boolean ) : void ;
194
+
192
195
serializeBinary ( ) : Uint8Array ;
193
196
toObject ( includeInstance ?: boolean ) : Operation . AsObject ;
194
197
static toObject ( includeInstance : boolean , msg : Operation ) : Operation . AsObject ;
@@ -206,6 +209,7 @@ export namespace Operation {
206
209
dropAll : boolean ,
207
210
dropOp : Operation . DropOpMap [ keyof Operation . DropOpMap ] ,
208
211
dropValue : string ,
212
+ runInBackground : boolean ,
209
213
}
210
214
211
215
export interface DropOpMap {
You can’t perform that action at this time.
0 commit comments