Class: MergeRequestContextCommitDiffFile
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- MergeRequestContextCommitDiffFile
- Extended by:
- SuppressCompositePrimaryKeyWarning
- Includes:
- DiffFile, Gitlab::EncodingHelper, ShaAttribute
- Defined in:
- app/models/merge_request_context_commit_diff_file.rb
Constant Summary
Constants included from Gitlab::EncodingHelper
Gitlab::EncodingHelper::BOM_UTF8, Gitlab::EncodingHelper::ENCODING_CONFIDENCE_THRESHOLD, Gitlab::EncodingHelper::ESCAPED_CHARS, Gitlab::EncodingHelper::UNICODE_REPLACEMENT_CHARACTER
Constants inherited from ApplicationRecord
Constants included from HasCheckConstraints
HasCheckConstraints::NOT_NULL_CHECK_PATTERN
Constants included from ResetOnColumnErrors
ResetOnColumnErrors::MAX_RESET_PERIOD
Class Method Summary collapse
-
.bulk_insert(*args) ⇒ Object
create MergeRequestContextCommitDiffFile by given diff file record(s).
Instance Method Summary collapse
Methods included from DiffFile
Methods included from Gitlab::EncodingHelper
#binary_io, #detect_binary?, #detect_encoding, #detect_libgit2_binary?, #encode!, #encode_binary, #encode_utf8, #encode_utf8_no_detect, #encode_utf8_with_escaping!, #encode_utf8_with_replacement_character, #force_encode_utf8, #strip_bom, #unquote_path
Methods inherited from ApplicationRecord
===, cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, nullable_column?, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
Methods included from ResetOnColumnErrors
#reset_on_union_error, #reset_on_unknown_attribute_error
Methods included from Gitlab::SensitiveSerializableHash
Class Method Details
.bulk_insert(*args) ⇒ Object
create MergeRequestContextCommitDiffFile by given diff file record(s)
15 16 17 |
# File 'app/models/merge_request_context_commit_diff_file.rb', line 15 def self.bulk_insert(*args) ApplicationRecord.legacy_bulk_insert('merge_request_context_commit_diff_files', *args) # rubocop:disable Gitlab/BulkInsert end |
Instance Method Details
#path ⇒ Object
19 20 21 |
# File 'app/models/merge_request_context_commit_diff_file.rb', line 19 def path new_path.presence || old_path end |