libsql / libsql/hrana-client-ts

Keep alive connect to database

Open
#12 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
28
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/http/stream.ts#L363 and inspect how #baton closes or maintains the database connection. Reproduce the idle-connection behavior described for Turso, then determine the scope of an enable/disable option and verify that the selected setting changes connection handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite, typescript
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.