File: unmodified_identifiers.rb

package info (click to toggle)
ruby-sequel 5.63.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,408 kB
  • sloc: ruby: 113,747; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 631 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen-string-literal: true

module Sequel
  module UnmodifiedIdentifiers
    module DatabaseMethods
      private

      # Databases that use this module for unquoted identifiers to lowercase.
      def folds_unquoted_identifiers_to_uppercase?
        false
      end
    end

    module DatasetMethods
      private

      # Turn the given symbol/string into a symbol, keeping the current case.
      def output_identifier(v)
        v == '' ? :untitled : v.to_sym
      end

      # Turn the given symbol/string into a string, keeping the current case.
      def input_identifier(v)
        v.to_s
      end
    end
  end
end