Module: Sequel::DuckDB

Defined in:
lib/sequel/duckdb.rb,
lib/sequel/duckdb/version.rb,
lib/sequel/adapters/duckdb.rb,
lib/sequel/adapters/shared/duckdb.rb

Overview

DuckDB adapter module for Sequel

This module provides complete integration between Sequel and DuckDB, including:

  • Connection management for file-based and in-memory databases
  • SQL generation optimized for DuckDB's analytical capabilities
  • Schema introspection and metadata access
  • Data type mapping between Ruby and DuckDB types
  • Transaction support with proper error handling
  • Performance optimizations for analytical workloads

Examples:

Creating tables

db.create_table :users do
  primary_key :id
  String :name, null: false
  String :email, unique: true
  Integer :age
  Boolean :active, default: true
  DateTime :created_at
end

Analytical queries

sales_summary = db[:sales]
  .select(
    :product_category,
    Sequel.function(:sum, :amount).as(:total_sales),
    Sequel.function(:avg, :amount).as(:avg_sale)
  )
  .group(:product_category)
  .order(Sequel.desc(:total_sales))

Since:

  • 0.1.0

Defined Under Namespace

Modules: DatabaseMethods, DatasetMethods Classes: Database, Dataset, Error

Constant Summary collapse

VERSION =

Version information for the sequel-duckdb gem

This constant contains the current version of the sequel-duckdb adapter. It follows semantic versioning (SemVer) conventions.

Examples:

Getting the version

puts Sequel::DuckDB::VERSION  # => "0.1.0"

Since:

  • 0.1.0

"0.1.0"