mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
Support jsonb, idle_timeout, connection_timeout, max_lifetime timeouts in bun:sql. Add onopen and onclose callbacks. Fix missing "code" property appearing in errors. Add error codes for postgres. (#16045)
This commit is contained in:
@@ -89,6 +89,12 @@ pub fn appendZ(this: *StringBuilder, slice: string) [:0]const u8 {
|
||||
return result;
|
||||
}
|
||||
|
||||
pub fn appendStr(this: *StringBuilder, str: bun.String) string {
|
||||
const slice = str.toUTF8(bun.default_allocator);
|
||||
defer slice.deinit();
|
||||
return this.append(slice.slice());
|
||||
}
|
||||
|
||||
pub fn append(this: *StringBuilder, slice: string) string {
|
||||
if (comptime Environment.allow_assert) {
|
||||
assert(this.len <= this.cap); // didn't count everything
|
||||
|
||||
Reference in New Issue
Block a user