drizzle-team / drizzle-team/drizzle-orm

[DOCUMENTATION]: Types documentation of transactions

Open
#2,851 11 comments 13 reactions 0 assignees View on GitHub
docs docs/undocumented
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.32.0

### What version of `drizzle-kit` are you using?

0.23.0

### Describe the Bug

When working with drizzle in our project, we noticed that declaring the type of the transaction when passing it to a function was kind of unclear at first regarding what we needed to pass for the parameters:

`export abstract class MySqlTransaction<
TQueryResult extends MySqlQueryResultHKT,
TPreparedQueryHKT extends PreparedQueryHKTBase,
TFullSchema extends Record = Record,
TSchema extends TablesRelationalConfig = Record
`

I think adding a comment here that explains the parameters or an example how to use it could be helpful

### Expected behavior

_No response_

### Environment & setup

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the TypeScript declaration for MySqlTransaction and review its generic parameters. Add explanatory comments or a usage example for the transaction type, then verify that the resulting type documentation is clear; the issue does not name a specific file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.