lib/grumlin/repository/instance_methods.rb in grumlin-1.0.3.beta1 vs lib/grumlin/repository/instance_methods.rb in grumlin-1.0.3

- old
+ new

@@ -4,22 +4,22 @@ include Grumlin::Expressions extend Forwardable def_delegator "self.class", :shortcuts - def_delegator :self, :__, :g + def_delegator :shortcuts, :__ UPSERT_RETRY_PARAMS = { on: [Grumlin::AlreadyExistsError, Grumlin::ConcurrentModificationError], sleep_method: ->(n) { Async::Task.current.sleep(n) }, tries: 5, sleep: ->(n) { (n**2) + 1 + rand } }.freeze DEFAULT_ERROR_HANDLING_STRATEGY = Grumlin::Repository::ErrorHandlingStrategy.new(mode: :retry, **UPSERT_RETRY_PARAMS) - def __ - shortcuts.traversal_start_class.new(pool: Grumlin.default_pool, middlewares: self.class.middlewares) + def g + shortcuts.g(middlewares: self.class.middlewares) end def drop_vertex(id, start: g) start.V(id).drop.iterate end