Skip to content

Keep alive connect to database #12

@hieuht-htv

Description

@hieuht-htv

https://github.com/libsql/hrana-client-ts/blob/main/src/http/stream.ts#L363

I am using the turso.tech database (sqlite3) with NestJS TypeORM.

I've created DI for Repository to make it easier to use, specifically for master and slave (readonly) connections.
I understand that turso only maintains the connection to the database for 10 seconds, which causes issues with my DI usage. Every 10 seconds, the connection will be closed. I hope the development team of hrana-client-ts will take notice of this issue. I have a small suggestion, which is to add an option to enable/disable configuration for using #baton to close the connection.

Thank you!

my code:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions