@types/tarantool-driver
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

Installation

npm install --save @types/tarantool-driver

Summary

This package contains type definitions for tarantool-driver (https://github.com/tarantool/node-tarantool-driver).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tarantool-driver.

index.d.ts

/// <reference types="node" />
import { EventEmitter } from "events";

declare namespace TarantoolConnection {
    interface TarantoolOptions {
        host?: string | undefined;
        port?: number | undefined;
        username?: string | undefined;
        password?: string | undefined;
        reserveHosts?: string[] | undefined;
        beforeReserve?: number | undefined;
        timeout?: number | undefined;
        retryStrategy?: ((times: number) => number) | undefined;
        lazyConnect?: boolean | undefined;
    }
}

declare class TarantoolConnection extends EventEmitter {
    constructor(options: TarantoolConnection.TarantoolOptions);

    /* Connection */

    connect(): Promise<void>;

    flushQueue(cb: (err: Error) => void): void;

    destroy(): void;

    disconnect(reconnect?: boolean): void;

    /* Commands */

    select(
        spaceId: number | string,
        indexId: number | string,
        limit: number,
        offset: number,
        iterator: string,
        key: any[],
    ): Promise<any>;

    delete(spaceId: number | string, indexId: number | string, key: any[]): Promise<any>;

    update(spaceId: number | string, indexId: number | string, key: any[], ops: any[]): Promise<any>;

    upsert(spaceId: number | string, ops: any[], tuple: any[]): Promise<any>;

    eval(expression: string, ...args: any[]): Promise<any>;

    call(functionName: string, ...args: any[]): Promise<any>;

    insert(spaceId: number | string, tuple: any[]): Promise<any>;

    replace(spaceId: number | string, tuple: any[]): Promise<any>;
}

export = TarantoolConnection;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Evgeni Zharkov.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/tarantool-driver

Weekly Downloads

41

Version

3.0.4

License

MIT

Unpacked Size

5.9 kB

Total Files

5

Last publish

Collaborators

  • types