Added REMOVE and REMOVEAT test
This commit is contained in:
parent
8c6a6188dd
commit
b2d05edbee
19
src/test.zig
19
src/test.zig
@ -114,11 +114,15 @@ test "UPDATE APPEND" { // OK
|
||||
try testParsing(db, "GRAB User {name IN ['Bob', 'Bobibou']}");
|
||||
}
|
||||
|
||||
// FIXME: Look like it never call updateData, to investigate
|
||||
test "UPDATE POP" { // OK
|
||||
const db = DB{ .path = "test1", .schema = "schema/test" };
|
||||
try testParsing(db, "UPDATE User {name IN ['Bob', 'Bobibou']} TO (scores POP)");
|
||||
try testParsing(db, "GRAB User {name IN ['Bob', 'Bobibou']}");
|
||||
try testParsing(db, "UPDATE User {name IN ['Bob', 'Bobibou']} TO (scores POP)");
|
||||
try testParsing(db, "UPDATE User {name IN ['Bob', 'Bobibou']} TO (scores POP)");
|
||||
try testParsing(db, "UPDATE User {name IN ['Bob', 'Bobibou']} TO (scores POP)");
|
||||
try testParsing(db, "UPDATE User {name IN ['Bob', 'Bobibou']} TO (scores POP)");
|
||||
try testParsing(db, "GRAB User {name IN ['Bob', 'Bobibou']}");
|
||||
}
|
||||
|
||||
test "UPDATE CLEAR" { // OK
|
||||
@ -127,6 +131,19 @@ test "UPDATE CLEAR" { // OK
|
||||
try testParsing(db, "GRAB User {name IN ['Bob', 'Bobibou']}");
|
||||
}
|
||||
|
||||
test "UPDATE REMOVE" { // OK
|
||||
const db = DB{ .path = "test1", .schema = "schema/test" };
|
||||
try testParsing(db, "UPDATE User {name = 'Bob'} TO (scores APPEND [69, 123, 123, 11, 22, 44, 51235])");
|
||||
try testParsing(db, "UPDATE User {name = 'Bob'} TO (scores REMOVE [11, 44])");
|
||||
try testParsing(db, "GRAB User {name = 'Bob'}");
|
||||
}
|
||||
|
||||
test "UPDATE REMOVEAT" { // OK
|
||||
const db = DB{ .path = "test1", .schema = "schema/test" };
|
||||
try testParsing(db, "UPDATE User {name = 'Bob'} TO (scores REMOVEAT [1, 4, 5000])");
|
||||
try testParsing(db, "GRAB User {name = 'Bob'}");
|
||||
}
|
||||
|
||||
// Single Struct Relationship
|
||||
// ===============================================================
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user