lib/arcade/base.rb
# update! returns the count of affected records
#
#  required parameter:  set:
#                     where:
#
update. returns the count of affected records
required parameter:  set:
where.
update . returns the count of affected records required parameter : set : where .
def update! **args
        if args.keys.include?(:set) && args.keys.include?(:where)
          args.merge!( updated: DateTime.now ) if timestamps
          query( **( { kind: :update! }.merge args ) ).execute{|y| y[:count] } &.first
        else
          raise "at least set: and where: are required to perform this operation"
        end
      end
def update! ** args if args . keys . include? ( :set ) && args . keys . include? ( :where ) args . merge! ( updated : DateTime . now ) if timestamps query ( ** ( { kind : :update! } . merge args ) ) . execute { | y | y [ :count ] } &. first else raise "at least set: and where: are required to perform this operation" end end
update!
update!
args