Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sql) transactions, savepoints, connection pooling and reserve #16381

Merged
merged 35 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f6bbc40
wip
cirospaciari Jan 13, 2025
f11f674
make it work again
cirospaciari Jan 14, 2025
4802de3
release query
cirospaciari Jan 14, 2025
93c58c9
fix max
cirospaciari Jan 14, 2025
84088b2
dont allow 0 on max
cirospaciari Jan 14, 2025
dd12c0d
not TODO
cirospaciari Jan 14, 2025
7e80e40
more
cirospaciari Jan 14, 2025
dc008ae
reserve()
cirospaciari Jan 14, 2025
8a92882
dispose
cirospaciari Jan 14, 2025
2acbd82
check unsafe transactions
cirospaciari Jan 14, 2025
0cd41ec
change check order
cirospaciari Jan 14, 2025
40c24ae
check .zero
cirospaciari Jan 15, 2025
caa82a0
fix promise rejection
cirospaciari Jan 15, 2025
279d848
Promise.all
cirospaciari Jan 15, 2025
91a10aa
use START TRANSACTION instead of BEGIN
cirospaciari Jan 15, 2025
7fbb8ae
make transactions adapter independent
cirospaciari Jan 15, 2025
d8ba2cb
add distributed transactions
cirospaciari Jan 15, 2025
0425019
test
cirospaciari Jan 15, 2025
f27f3e3
more tests
cirospaciari Jan 15, 2025
09e6b35
wip
cirospaciari Jan 16, 2025
be7c841
wip
cirospaciari Jan 16, 2025
a06f824
wip
cirospaciari Jan 18, 2025
775632a
comments
cirospaciari Jan 18, 2025
ae5aa88
wip
cirospaciari Jan 18, 2025
69409d0
status as enum, replace booleans for flags
cirospaciari Jan 18, 2025
7387e12
more
cirospaciari Jan 18, 2025
a068077
wip
cirospaciari Jan 18, 2025
ddabf38
more
cirospaciari Jan 18, 2025
be9b5fe
fix transaction close and reserved close
cirospaciari Jan 18, 2025
9ccafa2
remove bun:sql wip types
cirospaciari Jan 18, 2025
aadf6e2
examples
cirospaciari Jan 18, 2025
bee20b6
constructor
cirospaciari Jan 18, 2025
8d7884f
more
cirospaciari Jan 18, 2025
d3861a3
types
cirospaciari Jan 18, 2025
66dd28e
SQL and sql
cirospaciari Jan 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/bun.js/bindings/ErrorCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ const errors: ErrorCodeMapping = [
["ERR_POSTGRES_IDLE_TIMEOUT", Error, "PostgresError"],
["ERR_POSTGRES_CONNECTION_TIMEOUT", Error, "PostgresError"],
["ERR_POSTGRES_LIFETIME_TIMEOUT", Error, "PostgresError"],
["ERR_POSTGRES_INVALID_TRANSACTION_STATE", Error, "PostgresError"],
["ERR_POSTGRES_QUERY_CANCELLED", Error, "PostgresError"],
["ERR_POSTGRES_UNSAFE_TRANSACTION", Error, "PostgresError"],

// S3
["ERR_S3_MISSING_CREDENTIALS", Error],
Expand Down
1 change: 0 additions & 1 deletion src/bun.js/event_loop.zig
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,6 @@ pub const EventLoop = struct {
pub fn runCallback(this: *EventLoop, callback: JSC.JSValue, globalObject: *JSC.JSGlobalObject, thisValue: JSC.JSValue, arguments: []const JSC.JSValue) void {
this.enter();
defer this.exit();

_ = callback.call(globalObject, thisValue, arguments) catch |err|
globalObject.reportActiveExceptionAsUnhandled(err);
}
Expand Down
Loading
Loading