Oracle Coherence Chinese Tutorial 26: Using the coherence query language

Source: Internet
Author: User

UseCoherence Querylanguage

This chapter describes how to use a consistent query language (cohql) Interactive and consistent cache. cohqlis a light weight grammar (SQLLegacy) for performing a coherent cluster on cache operations. Languages can be used programmatically or from a command-line tool.

This chapter contains the following sections:

Understanding the consistency of query language syntax

Using command-line toolscohql

Building filters inJavaprogram

Other examples of coherent query languages

Precautions:

Although there may becohqlsyntax is similar toSQL, it's important to remember that it's notSQLThe syntax that is actually more context-sensitiveJavaPersistent Query Language (JPQL) standard.

CQL(continuous Query language) is a query language that involves complex event processing (CEP), should not be confused withcohql.

26.1UnderstandingCoherence Query Language syntax

The features described in the following sections are provided by cohql " Examples of additional coherent query languages "

Considerations:
Cohql subqueries are not supported.

includes the following topics in this section:

     query Syntax Basics
     retrieving data
      lifecycle Management for cache
     using cached data
     using Indexes
      issue multiple query statements
     view query cost and Benefit

for reference only, table 26-1 Lists the consistency of query statements, terms, alphabetical expressions.

Table 26-1 consistency Query Language report

For this statement, clause, or expression ...

See this section

BACKUP CACHE

"Writing a serialized representation of a Cache to a File"

Bind variables

"Using Bind Variables"

CREATE CACHE

"Creating a Cache"

CREATE INDEX

"Creating an Index on the Cache"

DELETE

"Deleting Entries in the Cache"

DROP CACHE

"Removing a Cache from the Cluster"

DROP INDEX

"Removing an Index from the Cache"

Ensure CACHE

"Creating a Cache"

Ensure INDEX

"Creating an Index on the Cache"

GROUP by

"Aggregating Query Results"

INSERT

"Inserting Entries in the Cache"

Key () pseudo-function

"Using Key and Value pseudo-functions"

Path-expressions

"Using path-expressions"

RESTORE CACHE

"Loading Cache Contents from a File"

SELECT

"Retrieving Data from the Cache"

SOURCE

"Processing Query statements in Batch Mode"

UPDATE

"Changing Existing Values"

Value () pseudo-function

"Using Key and Value pseudo-functions"

WHERE

"Filtering Entries in a Result Set"

26.1.1Query Syntax Basics

This section describes some basic syntax, such as path expressions, binding variables, and the syntax of pseudo-function blocks.

26.1.1.1 using path Expressions

COHQL is an expression of the main build path, and the path expression is an object instance used to navigate the graph. An identifier in a path expression is used to represent a property in the Java Bean meaning . Behind it is a reflectionextractor created by the front plus a get and first letter capitalization. by "Dot" (.) character that represents the object traversal element separation. For example, the following path expression is used to navigate the structure of an object:

A.b.c

It calls these methods in reflection:

Geta (). GETB (). GetC ()

26.1.1.2 using bound variables

Oracle Coherence Chinese Tutorial 26: Using the coherence query language

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.