# Integer identifiers are values less than 2^30. UUIDs are RFC 4122 versio 5 SHA-1 hashes. def self.identify(label, column_type = :integer) if column_type == :uuid Digest::UUID.uuid_v5(Digest::UUID::OID_NAMESPACE, label.to_s) else Zlib.crc32(label.to_s) % MAX_ID end end
Time.now.utc : Time.now now = now.to_s(:db) ! if model_class.record_timestamps timestamp_column_names.each do |c_name| row[c_name] = now unless row.key?(c_name) end end
Time.now.utc : Time.now now = now.to_s(:db) ! if model_class.record_timestamps timestamp_column_names.each do |c_name| row[c_name] = now unless row.key?(c_name) end end