Class: ActiveRecord::ConnectionAdapters::Duckdb::SchemaDumper

Inherits:
ConnectionAdapters::SchemaDumper
  • Object
show all
Defined in:
lib/active_record/connection_adapters/duckdb/schema_dumper.rb

Overview

DuckDB-specific schema dumper class for generating schema.rb files Extends Rails' ConnectionAdapters::SchemaDumper to handle DuckDB-specific column types, constraints, and DuckLake features like partitioning

Constant Summary collapse

SETTABLE_DUCKLAKE_OPTIONS =

Valid DuckLake options that can be set via set_option

%w[parquet_version parquet_compression].freeze

Instance Method Summary collapse

Instance Method Details

#table(table, stream) ⇒ void

This method returns an undefined value.

Override table dumping to include DuckLake-specific features

Parameters:

  • table (String)

    The table name

  • stream (IO)

    The output stream



17
18
19
20
21
22
23
24
25
26
# File 'lib/active_record/connection_adapters/duckdb/schema_dumper.rb', line 17

def table(table, stream)
  # Call the parent implementation first
  super

  # Add DuckLake partitioning if present
  dump_partitioning(table, stream)

  # Add DuckLake table-level options if present
  dump_table_options(table, stream)
end