Class DuckDBConnection

A thin helper to bind the connection id and talk record batches

Hierarchy

  • DuckDBConnection

Constructors

Methods

  • Cancel a query that was sent earlier

    Returns boolean

  • Close a connection

    Returns void

  • Create a scalar function

    Parameters

    • name: string
    • returns: DataType<Type, any>
    • func: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Get table names

    Parameters

    • query: string

    Returns string[]

  • Insert an arrow table from an ipc stream

    Parameters

    Returns void

  • Insert an arrow table

    Parameters

    Returns void

  • Inesrt csv file from path

    Parameters

    Returns void

  • Insert json file from path

    Parameters

    Returns void

  • Create a prepared statement

    Type Parameters

    • T extends {
          [key: string]: arrow.DataType;
      } = any

    Parameters

    • text: string

    Returns PreparedStatement<any>

  • Run a query

    Type Parameters

    • T extends {
          [key: string]: arrow.DataType;
      } = any

    Parameters

    • text: string

    Returns Table<T>

  • Send a query

    Type Parameters

    • T extends {
          [key: string]: arrow.DataType;
      } = any

    Parameters

    • text: string

    Returns Promise<RecordBatchStreamReader<T>>

  • Brave souls may use this function to consume the underlying connection id

    Type Parameters

    • R

    Parameters

    Returns R

Generated using TypeDoc