• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nepalez / rom-cassandra / 45
98%

Build:
DEFAULT BRANCH: master
Ran 09 Aug 2015 06:44PM UTC
Jobs 5
Files 16
Run time 32s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
45

push

travis-ci

nepalez
[FEATURE] Add counter incrementer and decrementer

In `Update#set` you can provide values for counters: `#increment(i)`,
and `#decrement(i)`:

    class UpdateCounter < ROM::Commands::Update[:cassandra]
      register_as :update_hits
      relation :hits

      def execute(value)
        super set(hits: increment(value)
      end
    end

    # ...
    rom = ROM.finalize.env

    update_hits = rom.command(:update_hits)
    update_hits.by_id(1).call(3)
    # to change { id: 1, hits: 1 } to { id: 1, hits: 4 }

== Added

* ROM::Cassandra::Operators (the namespace for included modules)
* ROM::Cassandra::Operators::Set (helper methods for SET clause)
* ROM::Cassandra::Operators::Set#increment
* ROM::Cassandra::Operators::Set#decrement

== Changed

* ROM::Cassandra::Commands::Update - includes ROM::Cassandra::Operators::Set
  to provide access to `#increment(i)` and `#decrement(i)` helpers.

192 of 196 relevant lines covered (97.96%)

49.18 hits per line

Jobs
ID Job ID Ran Files Coverage
1 45.1 (1.9.3) 09 Aug 2015 06:44PM UTC 0
97.96
Travis Job 45.1
2 45.2 (2.0) 09 Aug 2015 06:44PM UTC 0
97.96
Travis Job 45.2
3 45.3 (2.1) 09 Aug 2015 06:44PM UTC 0
97.96
Travis Job 45.3
4 45.4 (2.2) 09 Aug 2015 06:44PM UTC 0
97.96
Travis Job 45.4
5 45.5 (ruby-head) 09 Aug 2015 06:44PM UTC 0
97.96
Travis Job 45.5
Source Files on build 45
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #45
  • eba65936 on github
  • Prev Build on master (#44)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc