alibaba / alibaba/funcraft

是不是应该把连接数据库单独写一个函数,然后需要连接数据库的地方引入这个公共方法?

Open
#646 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
931
Forks
128
PR merge metrics
No merged PRs in 30d

Description

每个函数计算初始化代码都写了连接了数据库,那这样每个函数是不是都连接了一个数据库?是不是应该把这种连接数据通用的方法单独写一个方法,并写为单列模式,其他函数计算引用这个通用方法?

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by locating the function initialization code that opens database connections and trace how each function manages its connection. Confirm the intended connection lifecycle and define done as a documented shared approach adopted by all relevant functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.