mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
Add --sql-preconnect CLI flag for PostgreSQL startup connections (#21035)
Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: jarred-sumner-bot <220441119+jarred-sumner-bot@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
70ebe75e6c
commit
e9ccc81e03
@@ -106,6 +106,7 @@ pub const runtime_params_ = [_]ParamType{
|
||||
clap.parseParam("--title <STR> Set the process title") catch unreachable,
|
||||
clap.parseParam("--zero-fill-buffers Boolean to force Buffer.allocUnsafe(size) to be zero-filled.") catch unreachable,
|
||||
clap.parseParam("--redis-preconnect Preconnect to $REDIS_URL at startup") catch unreachable,
|
||||
clap.parseParam("--sql-preconnect Preconnect to PostgreSQL at startup") catch unreachable,
|
||||
clap.parseParam("--no-addons Throw an error if process.dlopen is called, and disable export condition \"node-addons\"") catch unreachable,
|
||||
clap.parseParam("--unhandled-rejections <STR> One of \"strict\", \"throw\", \"warn\", \"none\", or \"warn-with-error-code\"") catch unreachable,
|
||||
clap.parseParam("--console-depth <NUMBER> Set the default depth for console.log object inspection (default: 2)") catch unreachable,
|
||||
@@ -589,6 +590,10 @@ pub fn parse(allocator: std.mem.Allocator, ctx: Command.Context, comptime cmd: C
|
||||
ctx.runtime_options.redis_preconnect = true;
|
||||
}
|
||||
|
||||
if (args.flag("--sql-preconnect")) {
|
||||
ctx.runtime_options.sql_preconnect = true;
|
||||
}
|
||||
|
||||
if (args.flag("--no-addons")) {
|
||||
// used for disabling process.dlopen and
|
||||
// for disabling export condition "node-addons"
|
||||
|
||||
Reference in New Issue
Block a user