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

Function relationship_definition

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

Source from the content-addressed store, hash-verified

154}
155
156fn relationship_definition(input: &str) -> IResult<&str, RelationshipDefinition> {
157 map(
158 tuple((
159 ws(identifier),
160 ws(tag("as")),
161 delimited(
162 ws(char('(')),
163 separated_list1(ws(char(',')), role),
164 ws(char(')')),
165 ),
166 opt(preceded(
167 ws(char(',')),
168 separated_list0(ws(char(',')), attribute),
169 )),
170 ws(char(';')),
171 )),
172 |(name, _, roles, attributes, _)| RelationshipDefinition {
173 name: name.to_string(),
174 roles,
175 attributes: attributes.unwrap_or_default(),
176 },
177 )(input)
178}
179
180// DML Parsers
181

Callers

nothing calls this directly

Calls 1

wsFunction · 0.70

Tested by

no test coverage detected