Sha256: a6b9ea6f1f37a15540d69f62690ff6457ac995cd00563a79d1606ac1c5895407

Contents?: true

Size: 1.24 KB

Versions: 33

Compression:

Stored size: 1.24 KB

Contents

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

module PG
	module TextDecoder
		# 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}", category: :deprecated) 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}", category: :deprecated) 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}", category: :deprecated) unless hash.empty?
				super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_LOCAL | PG::Coder::TIMESTAMP_APP_LOCAL)
			end
		end

		# For backward compatibility:
		TimestampWithoutTimeZone = TimestampLocal
		TimestampWithTimeZone = Timestamp
	end
end # module PG

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
pg-1.6.0.rc1-x86_64-linux lib/pg/text_decoder/timestamp.rb
pg-1.6.0.rc1-x86-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.6.0.rc1-x64-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.6.0.rc1-x64-mingw-ucrt lib/pg/text_decoder/timestamp.rb
pg-1.6.0.rc1 lib/pg/text_decoder/timestamp.rb
pg-1.5.9-x86-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.5.9-x64-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.5.9-x64-mingw-ucrt lib/pg/text_decoder/timestamp.rb
pg-1.5.9 lib/pg/text_decoder/timestamp.rb
pg-1.5.8-x64-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.5.8-x64-mingw-ucrt lib/pg/text_decoder/timestamp.rb
pg-1.5.8-x86-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.5.8 lib/pg/text_decoder/timestamp.rb
pg-1.5.7-x86-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.5.7-x64-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.5.7-x64-mingw-ucrt lib/pg/text_decoder/timestamp.rb
pg-1.5.7 lib/pg/text_decoder/timestamp.rb
pg-1.5.6-x64-mingw-ucrt lib/pg/text_decoder/timestamp.rb
pg-1.5.6-x64-mingw32 lib/pg/text_decoder/timestamp.rb
pg-1.5.6-x86-mingw32 lib/pg/text_decoder/timestamp.rb