Sha256: 6f9f54f803831f1cf42cf230decbb02331850508ef3dcc644613b83dd97a4f44

Contents?: true

Size: 979 Bytes

Versions: 136

Compression:

Stored size: 979 Bytes

Contents

# frozen_string_literal: true

module Arel # :nodoc: all
  module Visitors
    class SQLite < Arel::Visitors::ToSql
      private
        # Locks are not supported in SQLite
        def visit_Arel_Nodes_Lock(o, collector)
          collector
        end

        def visit_Arel_Nodes_SelectStatement(o, collector)
          o.limit = Arel::Nodes::Limit.new(-1) if o.offset && !o.limit
          super
        end

        def visit_Arel_Nodes_True(o, collector)
          collector << "1"
        end

        def visit_Arel_Nodes_False(o, collector)
          collector << "0"
        end

        def visit_Arel_Nodes_IsNotDistinctFrom(o, collector)
          collector = visit o.left, collector
          collector << " IS "
          visit o.right, collector
        end

        def visit_Arel_Nodes_IsDistinctFrom(o, collector)
          collector = visit o.left, collector
          collector << " IS NOT "
          visit o.right, collector
        end
    end
  end
end

Version data entries

136 entries across 131 versions & 11 rubygems

Version Path
activerecord-6.1.4.4 lib/arel/visitors/sqlite.rb
activerecord-6.0.4.4 lib/arel/visitors/sqlite.rb
activerecord-7.0.0.rc3 lib/arel/visitors/sqlite.rb
activerecord-6.1.4.3 lib/arel/visitors/sqlite.rb
activerecord-6.0.4.3 lib/arel/visitors/sqlite.rb
activerecord-6.0.4.2 lib/arel/visitors/sqlite.rb
activerecord-6.1.4.2 lib/arel/visitors/sqlite.rb
activerecord-7.0.0.rc2 lib/arel/visitors/sqlite.rb
activerecord-7.0.0.rc1 lib/arel/visitors/sqlite.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/activerecord-6.1.4.1/lib/arel/visitors/sqlite.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/activerecord-6.1.4.1/lib/arel/visitors/sqlite.rb
activerecord-7.0.0.alpha2 lib/arel/visitors/sqlite.rb
activerecord-7.0.0.alpha1 lib/arel/visitors/sqlite.rb
activerecord-6.1.4.1 lib/arel/visitors/sqlite.rb
activerecord-6.0.4.1 lib/arel/visitors/sqlite.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4/lib/arel/visitors/sqlite.rb
activerecord-6.1.4 lib/arel/visitors/sqlite.rb
activerecord-6.0.4 lib/arel/visitors/sqlite.rb
activerecord-6.0.3.7 lib/arel/visitors/sqlite.rb
activerecord-6.1.3.2 lib/arel/visitors/sqlite.rb