Matrix: insert Form C + update + delete coverage
34 new tests covering: - Form C bare-value-list (happy path + Form-A-recovery + type-unaware grammar limitation per handoff §2.2) - update with WHERE (column-narrowing invariant per handoff §1 bug E1; typed-slot prose for assignments and where filters) - update --all-rows (filter-clause requirement per ADR-0014) - delete with WHERE (column-narrowing; typed-slot prose for where filters) - delete --all-rows 859 baseline -> 931 passing. No bugs surfaced — the data-mutation command family was already well-shaped post-Phase-D.
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_all_rows.rs
|
||||
description: "input=\"delete from Customers --all-rows\" cursor=32"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Customers --all-rows",
|
||||
cursor: 32,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"Submit with Enter",
|
||||
),
|
||||
),
|
||||
completion: None,
|
||||
parse_result: Ok(
|
||||
"Delete",
|
||||
),
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_all_rows.rs
|
||||
description: "input=\"delete from Customers --all\" cursor=27"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Customers --all",
|
||||
cursor: 27,
|
||||
state: DefiniteErrorAt(
|
||||
22,
|
||||
),
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
24,
|
||||
27,
|
||||
),
|
||||
partial_prefix: "all",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(definite)",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_all_rows.rs
|
||||
description: "input=\"delete from Customers\" cursor=21"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Customers",
|
||||
cursor: 21,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Customers",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
12,
|
||||
21,
|
||||
),
|
||||
partial_prefix: "Customers",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Customers",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_with_where.rs
|
||||
description: "input=\"delete \" cursor=7"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete ",
|
||||
cursor: 7,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "from",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
7,
|
||||
7,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "from",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_with_where.rs
|
||||
description: "input=\"delete from \" cursor=12"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from ",
|
||||
cursor: 12,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Customers",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "Orders",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
12,
|
||||
12,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Customers",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "Orders",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_with_where.rs
|
||||
description: "input=\"delete from Customers \" cursor=22"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Customers ",
|
||||
cursor: 22,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "where",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
22,
|
||||
22,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "where",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_with_where.rs
|
||||
description: "input=\"delete from Customers where Email=\" cursor=34"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Customers where Email=",
|
||||
cursor: 34,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"for `Email`: Type a quoted string (e.g. 'Alice') or null",
|
||||
),
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
34,
|
||||
34,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "null",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_with_where.rs
|
||||
description: "input=\"delete from Customers where \" cursor=28"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Customers where ",
|
||||
cursor: 28,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
28,
|
||||
28,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_with_where.rs
|
||||
description: "input=\"delete from Customers where id=1\" cursor=32"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Customers where id=1",
|
||||
cursor: 32,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"Submit with Enter",
|
||||
),
|
||||
),
|
||||
completion: None,
|
||||
parse_result: Ok(
|
||||
"Delete",
|
||||
),
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
---
|
||||
source: tests/typing_surface/delete_with_where.rs
|
||||
description: "input=\"delete from Things where ts=\" cursor=28"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Things where ts=",
|
||||
cursor: 28,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"for `ts`: Type a quoted datetime as 'YYYY-MM-DD HH:MM:SS' or null",
|
||||
),
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
28,
|
||||
28,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "null",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
---
|
||||
source: tests/typing_surface/insert_form_c.rs
|
||||
description: "input=\"insert into Customers (1, \" cursor=26"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "insert into Customers (1, ",
|
||||
cursor: 26,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"Type a value: number, 'text', true/false, null (dates as 'YYYY-MM-DD', datetimes as 'YYYY-MM-DDTHH:MM:SS')",
|
||||
),
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
26,
|
||||
26,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "null",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "true",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "false",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "Email",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
---
|
||||
source: tests/typing_surface/insert_form_c.rs
|
||||
description: "input=\"insert into Customers (1, 'Alice'\" cursor=33"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "insert into Customers (1, 'Alice'",
|
||||
cursor: 33,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"Next: `)`",
|
||||
),
|
||||
),
|
||||
completion: None,
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/insert_form_c.rs
|
||||
description: "input=\"insert into Customers (3.14, 'Alice', 'a@b.c')\" cursor=46"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "insert into Customers (3.14, 'Alice', 'a@b.c')",
|
||||
cursor: 46,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
46,
|
||||
46,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Ok(
|
||||
"Insert",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/insert_form_c.rs
|
||||
description: "input=\"insert into Customers (Name)\" cursor=28"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "insert into Customers (Name)",
|
||||
cursor: 28,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
28,
|
||||
28,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/insert_form_c.rs
|
||||
description: "input=\"insert into Customers (1, 'Alice', 'a@b.c')\" cursor=43"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "insert into Customers (1, 'Alice', 'a@b.c')",
|
||||
cursor: 43,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
43,
|
||||
43,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Ok(
|
||||
"Insert",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/insert_form_c.rs
|
||||
description: "input=\"insert into Customers (null, 'Alice', 'a@b.c')\" cursor=46"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "insert into Customers (null, 'Alice', 'a@b.c')",
|
||||
cursor: 46,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
46,
|
||||
46,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Ok(
|
||||
"Insert",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/insert_form_c.rs
|
||||
description: "input=\"insert into Items ('SKU-1', 'Widget')\" cursor=37"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "insert into Items ('SKU-1', 'Widget')",
|
||||
cursor: 37,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
37,
|
||||
37,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Ok(
|
||||
"Insert",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/insert_form_c.rs
|
||||
description: "input=\"insert into Customers (Name, Email)\" cursor=35"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "insert into Customers (Name, Email)",
|
||||
cursor: 35,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
35,
|
||||
35,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "values",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/update_all_rows.rs
|
||||
description: "input=\"update Customers set Email='x' \" cursor=31"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email='x' ",
|
||||
cursor: 31,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "where",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
31,
|
||||
31,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "where",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
---
|
||||
source: tests/typing_surface/update_all_rows.rs
|
||||
description: "input=\"update Customers set Email='new@b.c' --all-rows\" cursor=47"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email='new@b.c' --all-rows",
|
||||
cursor: 47,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"Submit with Enter",
|
||||
),
|
||||
),
|
||||
completion: None,
|
||||
parse_result: Ok(
|
||||
"Update",
|
||||
),
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
---
|
||||
source: tests/typing_surface/update_all_rows.rs
|
||||
description: "input=\"update Customers set Email='x' --all\" cursor=36"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email='x' --all",
|
||||
cursor: 36,
|
||||
state: DefiniteErrorAt(
|
||||
31,
|
||||
),
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
33,
|
||||
36,
|
||||
),
|
||||
partial_prefix: "all",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(definite)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/update_all_rows.rs
|
||||
description: "input=\"update Customers set Email='new@b.c'\" cursor=36"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email='new@b.c'",
|
||||
cursor: 36,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "where",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
36,
|
||||
36,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "where",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set Email='new@b.c' \" cursor=37"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email='new@b.c' ",
|
||||
cursor: 37,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "where",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
37,
|
||||
37,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "where",
|
||||
kind: Keyword,
|
||||
},
|
||||
Candidate {
|
||||
text: "--all-rows",
|
||||
kind: Flag,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Things set dt=\" cursor=21"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Things set dt=",
|
||||
cursor: 21,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"for `dt`: Type a quoted date as 'YYYY-MM-DD' or null",
|
||||
),
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
21,
|
||||
21,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "null",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set Email=\" cursor=27"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email=",
|
||||
cursor: 27,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"for `Email`: Type a quoted string (e.g. 'Alice') or null",
|
||||
),
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
27,
|
||||
27,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "null",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set Email\" cursor=26"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email",
|
||||
cursor: 26,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Email",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
21,
|
||||
26,
|
||||
),
|
||||
partial_prefix: "Email",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Email",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set \" cursor=21"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set ",
|
||||
cursor: 21,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
21,
|
||||
21,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set \" cursor=21"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set ",
|
||||
cursor: 21,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Email",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
21,
|
||||
21,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Email",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers \" cursor=17"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers ",
|
||||
cursor: 17,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "set",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
17,
|
||||
17,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "set",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update \" cursor=7"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update ",
|
||||
cursor: 7,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Customers",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "Orders",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
7,
|
||||
7,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Customers",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "Orders",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set Email='x' where id=\" cursor=40"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email='x' where id=",
|
||||
cursor: 40,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"for `id`: Type null to auto-generate, or an explicit integer",
|
||||
),
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
40,
|
||||
40,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "null",
|
||||
kind: Keyword,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set Name='x' where \" cursor=36"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Name='x' where ",
|
||||
cursor: 36,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
36,
|
||||
36,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set Email='new@b.c' where id=1\" cursor=47"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Email='new@b.c' where id=1",
|
||||
cursor: 47,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"Submit with Enter",
|
||||
),
|
||||
),
|
||||
completion: None,
|
||||
parse_result: Ok(
|
||||
"Update",
|
||||
),
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source: tests/typing_surface/update_with_where.rs
|
||||
description: "input=\"update Customers set Name='x', \" cursor=31"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "update Customers set Name='x', ",
|
||||
cursor: 31,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Candidates {
|
||||
items: [
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
selected: None,
|
||||
},
|
||||
),
|
||||
completion: Some(
|
||||
Completion {
|
||||
replaced_range: (
|
||||
31,
|
||||
31,
|
||||
),
|
||||
partial_prefix: "",
|
||||
candidates: [
|
||||
Candidate {
|
||||
text: "Name",
|
||||
kind: Identifier,
|
||||
},
|
||||
Candidate {
|
||||
text: "id",
|
||||
kind: Identifier,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
parse_result: Err(
|
||||
"Invalid(at_eof)",
|
||||
),
|
||||
}
|
||||
Reference in New Issue
Block a user