Open agufagit opened 3 hours ago
RecordID parameter is not recognized in transaction block
following code returns: data: []
data: []
data, err := surrealdb.Query[any](conn, `BEGIN; CREATE t:1 SET name='test'; LET $i = SELECT * FROM $id; RETURN $i; COMMIT;`, map[string]any{ "id": models.RecordID{Table: "t", ID: "1"}, }) fmt.Printf("data: %v\n", data1)
expected returns: data: [map[id:{t 1} name:test]]
data: [map[id:{t 1} name:test]]
surreal 2.0.4
No response
confirmed it's not recognized inside begin; commit; block, but outside begin; commit; block, it's recognized, is this a bug for surrealdb itself?
begin; commit;
Describe the bug
RecordID parameter is not recognized in transaction block
Steps to reproduce
following code returns:
data: []
Expected behaviour
expected returns:
data: [map[id:{t 1} name:test]]
SurrealDB version
surreal 2.0.4
Contact Details
No response
Is there an existing issue for this?
Code of Conduct