MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / insert_statement

Function insert_statement

graphlite/src/ast/parser.rs:4065–4076  ·  view source on GitHub ↗

Parse INSERT statement: INSERT graph_pattern

(tokens: &[Token])

Source from the content-addressed store, hash-verified

4063
4064/// Parse INSERT statement: INSERT graph_pattern
4065fn insert_statement(tokens: &[Token]) -> IResult<&[Token], InsertStatement> {
4066 map(
4067 tuple((
4068 alt((expect_token(Token::Insert), expect_token(Token::Create))),
4069 separated_list1(expect_token(Token::Comma), graph_pattern),
4070 )),
4071 |(_, graph_patterns)| InsertStatement {
4072 graph_patterns,
4073 location: Location::default(),
4074 },
4075 )(tokens)
4076}
4077
4078/// Parse graph pattern - a single node or path pattern for INSERT
4079fn graph_pattern(tokens: &[Token]) -> IResult<&[Token], PathPattern> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected