Skip to content

Commit

Permalink
Merge pull request #348 from skyflowapi/SK-1196-make-insert-and-delet…
Browse files Browse the repository at this point in the history
…e-options-parameter-optional-in-js-sdk

SK-1196 make insert and delete options parameter optional in js sdk
  • Loading branch information
skyflow-bharti authored Nov 7, 2023
2 parents 743d2d1 + 73b141e commit 65fb4fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/core/external/skyflow-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class SkyflowContainer {
});
}

insert(records, options:IInsertOptions): Promise<any> {
insert(records, options?:IInsertOptions): Promise<any> {
if (this.#isControllerFrameReady) {
return new Promise((resolve, reject) => {
validateInitConfig(this.#client.config);
Expand Down Expand Up @@ -370,7 +370,7 @@ class SkyflowContainer {
});
}

delete(records: IDeleteRecordInput, options: IDeleteOptions) {
delete(records: IDeleteRecordInput, options?: IDeleteOptions) {
if (this.#isControllerFrameReady) {
return new Promise((resolve, reject) => {
validateInitConfig(this.#client.config);
Expand Down
4 changes: 2 additions & 2 deletions src/skyflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class Skyflow {

insert(
records: IInsertRecordInput,
options: IInsertOptions,
options?: IInsertOptions,
) {
printLog(parameterizedString(logs.infoLogs.INSERT_TRIGGERED, CLASS_NAME), MessageType.LOG,
this.#logLevel);
Expand All @@ -228,7 +228,7 @@ class Skyflow {
return this.#skyflowContainer.get(getInput, options);
}

delete(records: IDeleteRecordInput, options: IDeleteOptions) {
delete(records: IDeleteRecordInput, options?: IDeleteOptions) {
printLog(parameterizedString(logs.infoLogs.DELETE_TRIGGERED, CLASS_NAME), MessageType.LOG,
this.#logLevel);
return this.#skyflowContainer.delete(records, options);
Expand Down

0 comments on commit 65fb4fc

Please sign in to comment.