Skip to content

Commit 8828b69

Browse files
fixed documentation for new branch (#107)
Signed-off-by: NeelParihar <[email protected]>
1 parent fef0f31 commit 8828b69

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/api/woqlClient.js.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ client.clonedb({remote_url: "https://my.terminusdb.com/myorg/mydb", label "Clone
165165
```
166166

167167
### Branch
168-
#### woqlClient.branch(newBranchId, [sourceFree]) ⇒ <code>Promise</code>
168+
#### woqlClient.branch(newBranchId, [isEmpty]) ⇒ <code>Promise</code>
169169
Creates a new branch with a TerminusDB database, starting from the current context of the client (branch / ref)
170170

171171
**Returns**: <code>Promise</code> - A promise that returns the call response object, or an Error if rejected.
172172

173173
| Param | Type | Description |
174174
| --- | --- | --- |
175175
| newBranchId | <code>string</code> | local identifier of the new branch the ID of the new branch to be created |
176-
| [sourceFree] | <code>boolean</code> | if the query contains any updates, it should include a textual message describing the reason for the update |
176+
| [isEmpty] | <code>boolean</code> | if isEmpty is true it will create a empty branch. |
177177

178178
**Example**
179179
```js

lib/woqlClient.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,20 +549,20 @@ WOQLClient.prototype.query = function(woql, commitMsg, allWitnesses) {
549549
/**
550550
* Creates a new branch with a TerminusDB database, starting from the current context of the client (branch / ref)
551551
* @param {string} newBranchId - local identifier of the new branch the ID of the new branch to be created
552-
* @param {boolean} [sourceFree] - if the query contains any updates, it should include a textual message describing the reason for the update
552+
* @param {boolean} [isEmpty] - if isEmpty is true it will create a empty branch.
553553
* @returns {Promise} A promise that returns the call response object, or an Error if rejected.
554554
* @example
555555
* client.branch("dev")
556556
*/
557-
WOQLClient.prototype.branch = function(newBranchId, sourceFree) {
557+
WOQLClient.prototype.branch = function(newBranchId, isEmpty) {
558558
if (newBranchId) {
559559
let source = this.ref()
560560
? {origin: `${this.organization()}/${this.db()}/${this.repo()}/commit/${this.ref()}`}
561561
: {
562562
origin: `${this.organization()}/${this.db()}/${this.repo()}/branch/${this.checkout()}`,
563563
}
564564

565-
if (sourceFree && sourceFree === true) {
565+
if (isEmpty && isEmpty === true) {
566566
// @ts-ignore
567567
source = {}
568568
}

0 commit comments

Comments
 (0)