lib/duckdb/converter.rb in duckdb-1.0.0.2 vs lib/duckdb/converter.rb in duckdb-1.1.0.0

- old
+ new

@@ -1,9 +1,10 @@ # frozen_string_literal: true require 'date' require_relative 'interval' +require_relative 'converter/int_to_sym' module DuckDB QueryProgress = Struct.new(:percentage, :rows_processed, :total_rows_to_process) module Converter @@ -12,9 +13,17 @@ FLIP_HUGEINT = 1 << 63 EPOCH = Time.local(1970, 1, 1) EPOCH_UTC = Time.new(1970, 1, 1, 0, 0, 0, 0) module_function + + def _to_infinity(value) + if value.positive? + DuckDB::Infinity::POSITIVE + else + DuckDB::Infinity::NEGATIVE + end + end def _to_date(year, month, day) Date.new(year, month, day) end