Skip to content

Commit

Permalink
Fix format issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ogzhanolguncu committed Jan 17, 2024
1 parent 86c38d2 commit 6eb6174
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
11 changes: 2 additions & 9 deletions src/commands/client/stats/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { afterAll, describe, expect, test } from "bun:test";
import { UpsertCommand } from "@commands/index";
import {
newHttpClient,
randomFloat,
randomID,
resetIndexes,
} from "@utils/test-utils";
import { newHttpClient, randomFloat, randomID, resetIndexes } from "@utils/test-utils";
import { sleep } from "bun";
import { StatsCommand } from ".";

Expand All @@ -21,9 +16,7 @@ describe("STATS", () => {
vector: [randomFloat(), randomFloat()],
}));

const payloads = randomizedData.map((data) =>
new UpsertCommand(data).exec(client)
);
const payloads = randomizedData.map((data) => new UpsertCommand(data).exec(client));
await Promise.all(payloads);
await sleep(2000);
const res = await new StatsCommand().exec(client);
Expand Down
15 changes: 5 additions & 10 deletions src/vector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ export class Index {
* @param id - List of ids or single id
* @returns A promise that resolves when the request to delete the index is completed.
*/
delete = (args: CommandArgs<typeof DeleteCommand>) =>
new DeleteCommand(args).exec(this.client);
delete = (args: CommandArgs<typeof DeleteCommand>) => new DeleteCommand(args).exec(this.client);

/**
* Queries an index with specified parameters.
Expand All @@ -65,8 +64,7 @@ export class Index {
*
* @returns A promise that resolves with an array of query result objects when the request to query the index is completed.
*/
query = (args: CommandArgs<typeof QueryCommand>) =>
new QueryCommand(args).exec(this.client);
query = (args: CommandArgs<typeof QueryCommand>) => new QueryCommand(args).exec(this.client);

/**
* Upserts (Updates and Inserts) specific items into the index.
Expand All @@ -90,8 +88,7 @@ export class Index {
*
* @returns {string} A promise that resolves with the result of the upsert operation after the command is executed.
*/
upsert = (args: CommandArgs<typeof UpsertCommand>) =>
new UpsertCommand(args).exec(this.client);
upsert = (args: CommandArgs<typeof UpsertCommand>) => new UpsertCommand(args).exec(this.client);

/**
* It's used for retrieving specific items from the index, optionally including
Expand All @@ -113,8 +110,7 @@ export class Index {
*
* @returns {Promise<FetchReturnResponse<TMetadata>[]>} A promise that resolves with an array of fetched items or null if not found, after the command is executed.
*/
fetch = (...args: CommandArgs<typeof FetchCommand>) =>
new FetchCommand(args).exec(this.client);
fetch = (...args: CommandArgs<typeof FetchCommand>) => new FetchCommand(args).exec(this.client);

/**
* It's used for wiping an entire index.
Expand Down Expand Up @@ -152,8 +148,7 @@ export class Index {
*
* @returns {Promise<RangeReturnResponse<TMetadata>>} A promise that resolves with the response containing the next cursor and an array of vectors, after the command is executed.
*/
range = (args: CommandArgs<typeof RangeCommand>) =>
new RangeCommand(args).exec(this.client);
range = (args: CommandArgs<typeof RangeCommand>) => new RangeCommand(args).exec(this.client);

/**
* Retrieves stats from the index.
Expand Down

0 comments on commit 6eb6174

Please sign in to comment.