Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request hangs if query is multine in backticks #1

Open
dector opened this issue Sep 12, 2022 · 4 comments
Open

Request hangs if query is multine in backticks #1

dector opened this issue Sep 12, 2022 · 4 comments

Comments

@dector
Copy link

dector commented Sep 12, 2022

STR:

surreal start --user root --pass root
deno run --allow-net https://gist.githubusercontent.com/dector/849c1f1baf9e5929fae6f4c395ea388c/raw/b92efa5eb00f0cdad4098b4bfd2b173eaf1a76c9/surreal-deno-issue.ts

ER: Process finished
AR: Process freezes


I have issue with request like (it's hanging):

await db.query(
  `select *
   from posts`
)

but single-line version works (executed immediately):

await db.query(`select * from posts`)

Deno: 1.25.2
library: https://deno.land/x/[email protected]

@dector dector changed the title Request hangs if query is in multine in backticks Request hangs if query is multine in backticks Sep 12, 2022
@FrostyTheSouthernSnowman

Interesting. Got some similar issues running with the nodejs package. Multiline queries would hang forever.

@dector
Copy link
Author

dector commented Sep 13, 2022

Updated with STR

@tobiemh
Copy link
Member

tobiemh commented Sep 13, 2022

Hi @dector and @FrostyTheSouthernSnowman thanks for submitting this issue 👍!

I have a feeling that this is to do with surrealdb/surrealdb#90, where the query string is submitted with \n characters, and is therefore failing to be parsed correctly. This should be fixed in the next beta release, very soon!

I'll check back here when that's released, and hopefully this will be fixed!

@dector
Copy link
Author

dector commented Sep 13, 2022

@tobiemh I'm preparing PR now. I'm not sure that it'll be accepted but at least we can start discussion.

dector added a commit to dector/surrealdb.deno that referenced this issue Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants