Class: DuckDB::ClientContext

Inherits:
Object
  • Object
show all
Defined in:
lib/duckdb/client_context.rb,
ext/duckdb/client_context.c

Overview

DuckDB::ClientContext represents a DuckDB client context object.

Instances are returned by DuckDB::ScalarFunction::BindInfo#client_context during the bind phase of a scalar function.

Instance Method Summary collapse

Instance Method Details

#connection_idInteger

Returns the connection id of the client context.

Returns:

  • (Integer)


57
58
59
60
61
# File 'ext/duckdb/client_context.c', line 57

static VALUE rbduckdb_client_context_connection_id(VALUE self) {
    rubyDuckDBClientContext *ctx;
    TypedData_Get_Struct(self, rubyDuckDBClientContext, &client_context_data_type, ctx);
    return ULL2NUM(duckdb_client_context_get_connection_id(ctx->client_context));
}