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

1.0.6 • Public • Published

Installation

npm install --save @types/sqlanywhere

Summary

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

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sqlanywhere.

index.d.ts

export function createConnection(): SybaseConnection;

export interface SybaseConnection {
    connect(
        params: ConnectionParameters,
        cb: (err: Error | undefined) => void,
    ): void;
    close(cb: (err?: Error) => void): void;
    disconnect(cb: (err?: Error) => void): void;
    connected(): boolean;
    exec(query: string, cb: (err: Error | undefined, result: any) => void): void;
    exec(
        query: string,
        placeholders: any[],
        cb: (err: Error | undefined, result: any) => void,
    ): void;
    prepare(
        query: string,
        cb: (err: Error | undefined, stmt: Statement) => void,
    ): void;
    prepare(query: string): Statement;
    commit(cb: (err: Error | undefined) => void): void;
    rollback(cb: (err: Error | undefined) => void): void;
}

export interface ConnectionParameters {
    Server: string;
    UserId: string;
    DatabaseFile?: string | undefined;
    AutoStart?: string | undefined;
    Password: string;
    Host?: string | undefined;
}

export interface Statement {
    exec(args: any[], cb: (err: Error | undefined, rows: any[]) => void): void;
    exec(args: any[]): any[];
    getMoreResults(): any[];
    drop(cb: (err: Error | undefined) => void): void;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Peter Keuter.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/sqlanywhere

Weekly Downloads

92

Version

1.0.6

License

MIT

Unpacked Size

5.03 kB

Total Files

5

Last publish

Collaborators

  • types