Sha256: 6f9f54f803831f1cf42cf230decbb02331850508ef3dcc644613b83dd97a4f44

Contents?: true

Size: 979 Bytes

Versions: 135

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

135 entries across 130 versions & 10 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.4/lib/arel/visitors/sqlite.rb
activerecord-7.1.5.1 lib/arel/visitors/sqlite.rb
activerecord-7.0.8.7 lib/arel/visitors/sqlite.rb
activerecord-7.1.5 lib/arel/visitors/sqlite.rb
activerecord-7.2.1.2 lib/arel/visitors/sqlite.rb
activerecord-7.1.4.2 lib/arel/visitors/sqlite.rb
activerecord-7.0.8.6 lib/arel/visitors/sqlite.rb
activerecord-6.1.7.10 lib/arel/visitors/sqlite.rb
activerecord-6.1.7.9 lib/arel/visitors/sqlite.rb
activerecord-7.2.1.1 lib/arel/visitors/sqlite.rb
activerecord-7.1.4.1 lib/arel/visitors/sqlite.rb
activerecord-7.0.8.5 lib/arel/visitors/sqlite.rb
activerecord-8.0.0.beta1 lib/arel/visitors/sqlite.rb
omg-activerecord-8.0.0.alpha9 lib/arel/visitors/sqlite.rb
omg-activerecord-8.0.0.alpha8 lib/arel/visitors/sqlite.rb
omg-activerecord-8.0.0.alpha7 lib/arel/visitors/sqlite.rb
omg-activerecord-8.0.0.alpha4 lib/arel/visitors/sqlite.rb
omg-activerecord-8.0.0.alpha3 lib/arel/visitors/sqlite.rb
omg-activerecord-8.0.0.alpha2 lib/arel/visitors/sqlite.rb
omg-activerecord-8.0.0.alpha1 lib/arel/visitors/sqlite.rb