File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ class GraphVertexCollection extends BaseCollection {
1515 _documentPath ( documentHandle ) {
1616 return `document/${ this . _documentHandle ( documentHandle ) } ` ;
1717 }
18+
19+ remove ( documentHandle , cb ) {
20+ const { promise, callback} = this . _connection . promisify ( cb ) ;
21+ this . _gharial . delete (
22+ documentHandle ,
23+ ( err , res ) => err ? callback ( err ) : callback ( null , res . body )
24+ ) ;
25+ return promise ;
26+ }
1827
1928 vertex ( documentHandle , cb ) {
2029 const { promise, callback} = this . _connection . promisify ( cb ) ;
@@ -43,6 +52,15 @@ class GraphEdgeCollection extends EdgeCollection {
4352 this . graph = graph ;
4453 this . _gharial = this . _api . route ( `gharial/${ this . graph . name } /edge/${ this . name } ` ) ;
4554 }
55+
56+ remove ( documentHandle , cb ) {
57+ const { promise, callback} = this . _connection . promisify ( cb ) ;
58+ this . _gharial . delete (
59+ documentHandle ,
60+ ( err , res ) => err ? callback ( err ) : callback ( null , res . body )
61+ ) ;
62+ return promise ;
63+ }
4664
4765 edge ( documentHandle , cb ) {
4866 const { promise, callback} = this . _connection . promisify ( cb ) ;
You can’t perform that action at this time.
0 commit comments