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

Bug: queryBind causes premature termination in a exists method #98

Open
2 tasks done
047massi opened this issue Jan 11, 2025 · 1 comment
Open
2 tasks done

Bug: queryBind causes premature termination in a exists method #98

047massi opened this issue Jan 11, 2025 · 1 comment
Labels
bug Something isn't working triage

Comments

@047massi
Copy link

Describe the bug

In the exists method, the process terminates prematurely after the execution of queryBind. All subsequent code, including logging ("exist?: ...") and the return statement, is never executed. This issue only occurs when using .queryBind to execute the database query.

Steps to reproduce

public static boolean exists(String username, String email) {
    logger.info("step: 1");
    Response response = surreal().queryBind(
        "SELECT * FROM users WHERE username = $username AND email = $email;", 
        Map.of("username", username, "email", email)
    );
    logger.info("step: 2");

    boolean exist = response.take(User.class, 0) != null;
    logger.info("exist?: " + exist);

    return exist;
}

Expected behaviour

The .queryBind method should not block or terminate the process. The subsequent code should execute correctly, logging whether the user exists and returning a boolean value.

SurrealDB version

surreal 2.1.4

Contact Details

m46955611@gmail.com

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
@047massi 047massi added bug Something isn't working triage labels Jan 11, 2025
@047massi
Copy link
Author

CONSOLE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant