3.0.4 • Published 6 months ago

@types/tarantool-driver v3.0.4

Weekly downloads
19
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for tarantool-driver 3.0
// Project: https://github.com/tarantool/node-tarantool-driver
// Definitions by: Evgeni Zharkov <https://github.com/zharkov-eu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Fri, 02 Jul 2021 21:32:12 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Evgeni Zharkov.

3.0.4

6 months ago

3.0.3

7 months ago

3.0.2

8 months ago

3.0.1

3 years ago

3.0.0

5 years ago