Sha256: ac5f9c11511f1b66d3f783bcb6b591c7cb640ef90fbf223d05babe4c96c45f41
Contents?: true
Size: 651 Bytes
Versions: 7
Compression:
Stored size: 651 Bytes
Contents
# frozen_string_literal: true module DuckDB class Column # # returns column type symbol # `:unknown` means that the column type is unknown/unsupported by ruby-duckdb. # `:invalid` means that the column type is invalid in duckdb. # # require 'duckdb' # db = DuckDB::Database.open # con = db.connect # con.query('CREATE TABLE users (id INTEGER, name VARCHAR(30))') # # users = con.query('SELECT * FROM users') # columns = users.columns # columns.first.type #=> :integer # def type type_id = _type DuckDB::Converter::IntToSym.type_to_sym(type_id) end end end
Version data entries
7 entries across 7 versions & 1 rubygems