Concourse provides several methods for retrieving data from
records. Each method is designed for a specific access pattern,
and most support optional ordering,
pagination, and
time travel.
The select method returns every value stored for a key (or all
keys) in a record. Because Concourse fields can hold multiple
values simultaneously, select returns a Set of values for
each key.
The get method returns the single most recently added value for
a key in a record. Use get when you only need the current value
and the field is expected to contain a single value.
The browse method returns an inverted view of a key’s data,
mapping each distinct value to the set of records that contain
it. This is useful for understanding the distribution of values
across records.
The describe method returns the set of keys that currently have
at least one value in a record. Use this to discover which fields
exist in a record without retrieving the actual data.
The holds method checks whether a record currently contains any
data. This is faster than calling describe when you only need
to know if a record exists.
Every record in Concourse has an implicit $id$ key that maps
to the record’s unique identifier. You can use $id$ in read
operations to include the record ID in results.
Navigation keys use dot-separated paths to traverse links and
read data from linked records. See Graph for full
documentation, including
transitive navigation for
recursive graph traversal.
123456789
// Java// Read the "name" of the record linked via "employer"Map<Long,Set<Object>>names=concourse.navigate("employer.name",Lists.newArrayList(1L,2L));// Read every descendant's name via transitive traversalSet<Object>descendants=concourse.select("children*.name",rootRecord);