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

Function parse_attribute_definition

src/cosql/definition/mod.rs:36–44  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

34}
35
36pub fn parse_attribute_definition(input: &str) -> IResult<&str, AttributeDefinition> {
37 map(
38 tuple((ws(parse_identifier), ws(char(':')), ws(parse_data_type))),
39 |(name, _, data_type)| AttributeDefinition {
40 name: name.to_string(),
41 data_type,
42 },
43 )(input)
44}
45
46#[cfg(test)]
47mod tests {

Callers 1

Calls 1

wsFunction · 0.50

Tested by 1