Sha256: 9770674d0ad8d614964276a70f97f9d5b04df58c9d4e293ea89c7c90c7a20e1f
Contents?: true
Size: 734 Bytes
Versions: 22
Compression:
Stored size: 734 Bytes
Contents
module ActiveRecord module ConnectionAdapters module Sqlserver class Utils class << self def unquote_string(string) string.to_s.gsub(/\'\'/, "'") end def unqualify_table_name(table_name) table_name.to_s.split('.').last.tr('[]','') end def unqualify_table_schema(table_name) table_name.to_s.split('.')[-2].gsub(/[\[\]]/,'') rescue nil end def unqualify_db_name(table_name) table_names = table_name.to_s.split('.') table_names.length == 3 ? table_names.first.tr('[]','') : nil end end end end end end
Version data entries
22 entries across 22 versions & 2 rubygems