MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_insert_multi_row

Function parse_insert_multi_row

nodedb-sql/src/parser/array_stmt/parse.rs:128–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127 #[test]
128 fn parse_insert_multi_row() {
129 let sql = "INSERT INTO ARRAY g \
130 COORDS (1, 100) VALUES ('SNP', 99.5), \
131 COORDS (1, 200) VALUES ('INS', 88.0)";
132 let stmt = try_parse_array_statement(sql).unwrap().unwrap();
133 match stmt {
134 ArrayStatement::Insert(i) => {
135 assert_eq!(i.name, "g");
136 assert_eq!(i.rows.len(), 2);
137 assert_eq!(i.rows[0].coords.len(), 2);
138 assert_eq!(i.rows[0].attrs.len(), 2);
139 }
140 _ => panic!("wrong variant"),
141 }
142 }
143
144 #[test]
145 fn parse_delete_coords_in() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected