You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had been running on circles about why I would suddenly only have 1 statement returned when testing in the sdk when in the surrealist test I would get more than a single statement.
Is there an existing issue for this?
I have searched the existing issues
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Adding RETURN behaviour to those two pages is a good idea. Can you give an example though of the different behaviour you are seeing in an SDK vs. Surrealist?
-- Possible common cases people will find:-- Read from some record, and store the content
let $from_foo =select id from foo:1;
-- Use the stored variableselect name from baz where some_field == $from_foo.other_field;
// Hypothethical case:let response = db.query("let $from_foo = select id from foo:1;select name from baz where some_field == $from_foo.other_field;").await?;let my_type :Vec<MyType> = response.take(1)?;
Everything is fine so far, but once you use it in a transaction
BEGIN;
let $from_foo =select id from foo:1;
select name from baz where some_field == $from_foo.other_field;
return $from_foo;
create baz:2; -- Won't execute as per Return's documentation-- THROW "Don't Commit"; -- Throws won't cancel the transaction eitherCOMMIT;
Not getting executed is documented on the RETURN statement, However, not having a single mention inside BEGIN's documentation (or transactions related statements) could cause confusion.
Description
I had been running on circles about why I would suddenly only have 1 statement returned when testing in the sdk when in the surrealist test I would get more than a single statement.
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: