<commit_before># Common methods for handling TSQL databases.
module TSqlMethods

  def modify_types(tp) #:nodoc:
    tp[:primary_key] = "int NOT NULL IDENTITY(1, 1) PRIMARY KEY"
    tp[:integer][:limit] = nil
    tp[:boolean] = {:name => "bit"}
    tp[:binary] = { :name => "image"}
    tp
  end

  def type_to_sql(type, limit = nil, precision = nil, scale = nil) #:nodoc:
    return super unless type.to_s == 'integer'
    
    if limit.nil? || limit == 4
      'int'
    elsif limit == 2
      'smallint'
    elsif limit == 1
      'tinyint'
    else
      'bigint'
    end
  end<commit_msg>add support for MSSQL uniqueidentifier datatype<commit_after># Common methods for handling TSQL databases.
module TSqlMethods

  def modify_types(tp) #:nodoc:
    tp[:primary_key] = "int NOT NULL IDENTITY(1, 1) PRIMARY KEY"
    tp[:integer][:limit] = nil
    tp[:boolean] = {:name => "bit"}
    tp[:binary] = { :name => "image"}
    tp
  end

  def type_to_sql(type, limit = nil, precision = nil, scale = nil) #:nodoc:
    return 'uniqueidentifier' if (type.to_s == 'uniqueidentifier')
    return super unless type.to_s == 'integer'
    
    if limit.nil? || limit == 4
      'int'
    elsif limit == 2
      'smallint'
    elsif limit == 1
      'tinyint'
    else
      'bigint'
    end
  end
{'fraction_non_alphanumeric': 0.13442113442113443, 'fraction_numerical': 0.00777000777000777, 'mean_word_length': 2.799410029498525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3722133', 'n_tokens_mistral': 459, 'n_tokens_neox': 441, 'n_words': 131}