Cgql for Oracle Coherence

Cgql (Coherence Groovy Query Language) console is replacement for Oracle Coherence CohQL console, which is included in Coherence itself, but is subject to many restrictions and limitations.

CohQL attempts to mimic syntax and behaviour of SQL, which helps newcomers familiar with SQL, but SQL was designed for relational databases while Coherence is key-value store, where both keys and values can be arbitrary object trees and SQL doesn’t suite well.

Cgql uses Groovy (Java-based scripting language) which offers natural way for accessing and manipulating objects in Coherence cache.

With Cgql console you can use full Coherence potential on command line without need to write and compile additional Java code and without changing anything in Coherence cluster nodes during runtime.

With Cgql you can:

  • fully access object trees stored in keys or values, including collections and nested collections (filtering, selecting, aggregating, …)
  • use arbitrary indexes defined on caches, including indexes defined on POF properties (CohQL doesn’t use index even if you use the where key()=xxx construct)
  • use existing Filter and execute existing EntryProcessor
  • define and use custom Filter and EntryProcessor on-the-fly without need to change anything in Coherence cluster nodes, but with full power as if they were written and compiled in Java
  • extract and aggregate values with custom EntryProcessor
  • change arbitrary object properties with custom EntryProcessor
  • save results in console and analyse them in console without querying the cluster again – can be used to correlate more queries
  • execute scripts from file or stdin

For more information see CGQL on GitHub. Released as an open source project.

Get price