Skip to content

Feature: Add a method that checks if database is connected or not #80

Open
@ZeyoYT

Description

@ZeyoYT

Is your feature request related to a problem?

if somehow the connection dropped, there is no way to check if the driver is still connected or not, and you wont notice it until the application throws a exception

Describe the solution

a easy solution would be to add a method called checkConnetion or something that refers to checking the connection, the method would be a boolean and would return true if database is connected else false

Alternative methods

Yes, for now i am using a alternative way to check if its connected or not

public boolean checkConnection() {
        try {
            driver.ping();
        } catch (Exception e) {
            return false;
        }

        return true;
    }

SurrealDB version

1.0.0

Contact Details

[email protected]

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions