Sha256: 324df59a7512fdd00ada0c16c50323b4ce46cf2109b675a5b89456e4433e3455

Contents?: true

Size: 1.06 KB

Versions: 7

Compression:

Stored size: 1.06 KB

Contents

# -*- ruby -*-
# frozen_string_literal: true

module PG
	module BinaryDecoder
		# Convenience classes for timezone options
		class TimestampUtc < Timestamp
			def initialize(hash={}, **kwargs)
				warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
				super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_UTC | PG::Coder::TIMESTAMP_APP_UTC)
			end
		end
		class TimestampUtcToLocal < Timestamp
			def initialize(hash={}, **kwargs)
				warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
				super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_UTC | PG::Coder::TIMESTAMP_APP_LOCAL)
			end
		end
		class TimestampLocal < Timestamp
			def initialize(hash={}, **kwargs)
				warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
				super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_LOCAL | PG::Coder::TIMESTAMP_APP_LOCAL)
			end
		end
	end
end # module PG

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pg-1.5.2-x64-mingw32 lib/pg/binary_decoder/timestamp.rb
pg-1.5.2-x64-mingw-ucrt lib/pg/binary_decoder/timestamp.rb
pg-1.5.2 lib/pg/binary_decoder/timestamp.rb
pg-1.5.1-x86-mingw32 lib/pg/binary_decoder/timestamp.rb
pg-1.5.1-x64-mingw-ucrt lib/pg/binary_decoder/timestamp.rb
pg-1.5.1-x64-mingw32 lib/pg/binary_decoder/timestamp.rb
pg-1.5.1 lib/pg/binary_decoder/timestamp.rb