Sha256: ab0e42df7663c115d14d68a6bfd4f3d09d6f419da04399a42eae9b0b0ecba6ff
Contents?: true
Size: 658 Bytes
Versions: 20
Compression:
Stored size: 658 Bytes
Contents
module CassandraObject module Scoping extend ActiveSupport::Concern included do singleton_class.class_eval do delegate :find, :find_by_id, :find_all_in_batches, :first, to: :scope delegate :select, :where, :where_ids, to: :scope delegate :cql_response, :columns, :limit, :per_page, to: :scope end end module ClassMethods def scope self.current_scope ||= Scope.new(self) end def current_scope Thread.current["#{self}_current_scope"] end def current_scope=(new_scope) Thread.current["#{self}_current_scope"] = new_scope end end end end
Version data entries
20 entries across 20 versions & 1 rubygems