MCPcopy Create free account
hub / github.com/cosdata/cosdata / entity_pattern

Function entity_pattern

org/src/cosql.rs:297–316  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

295}
296
297fn entity_pattern(input: &str) -> IResult<&str, Pattern> {
298 map(
299 tuple((
300 ws(char('$')),
301 ws(identifier),
302 ws(tag("isa")),
303 ws(identifier),
304 opt(delimited(
305 ws(char('(')),
306 separated_list0(ws(char(',')), attribute_value),
307 ws(char(')')),
308 )),
309 )),
310 |(_, variable, _, entity_type, attributes)| Pattern::EntityPattern {
311 variable: variable.to_string(),
312 entity_type: entity_type.to_string(),
313 attributes: attributes.unwrap_or_default(),
314 },
315 )(input)
316}
317
318fn relationship_pattern(input: &str) -> IResult<&str, Pattern> {
319 map(

Callers

nothing calls this directly

Calls 1

wsFunction · 0.70

Tested by

no test coverage detected