Commits
https://github.com/karlseguin/pg.zig/issues/114
Swap allocator, io order. Seems like maybe people are settling on io first.
* update to zig 0.16.0
* fix test_runner
* fetch metrics from github
* return error from t.connect
* move @cImport to build system
* move to translate-c external package
- https://codeberg.org/ziglang/zig/pulls/31892
* fix: update test_runner.zig and fix Pool, testListener and Reconnector issues
- Update test_runner.zig from https://gist.githubusercontent.com/karlseguin/c6bea5b35e4e8d26af6f81c22cb5d76b/raw/8e82642093d2f4341fb870d18d1fe5b213b2fd11/test_runner.zig
- Fix Pool.initUri
- Fix testListener BADF error (file descriptor used after closed)
- Make Reconnector.run mutex uncancellable
- Make mapColumn StructField field a comptime pointer
---------
Co-authored-by: pm <pm@local>
* Add `Conn.execIgnoringState`
There's currently no good way to execute a `ROLLBACK SAVEPOINT`
statement while in a failing transaction.
This change adds a new `Conn.execIgnoringState` method, which has the
same behavior as `Conn.rollback`, in that they both ignore the current
state of the connection. This allows either to work at any time, even
when in a failing transaction.
I've tested this manually in my own codebase, but I haven't written any
test cases. Happy to add tests or make any kind of changes if this
doesn't feel like a good idea!
* restore accidentally deleted testing const
* fix bug
* custom parsing improvements
* move function
A Row/QueryRow/Iterator/Record can now either be "safe" or "unsafe". When safe,
fetching operations (e.g. row.get() will return an error on type failure, e.g.
requesting a bool when the underlying column is an int).
By default, operations return "safe" variants.
In unsafe-mode, these methods log + unreachable. Unsafe types can be fetched
via "Unsafe" variatns, e.g pool.row() -> pool.rowUnsafe().
This is a huge breaking change. Before this, everything was unsafe by default.
Migration means either
1 - switching to unsafe methods, row -> rowUnsafe
2 - handling the fail-case on any get row.get(bool, 0) -> try row.get(bool, 0)
https://github.com/karlseguin/pg.zig/issues/99
https://github.com/karlseguin/pg.zig/issues/97#issuecomment-3370143556
Drops the `unix_socket` option, and infers the use of unix socket from the host
starting with '/'
https://github.com/karlseguin/pg.zig/issues/95
https://github.com/karlseguin/pg.zig/issues/89
https://github.com/karlseguin/pg.zig/issues/85
Allows developers of other libraries to implement this function
without depending directly on pg.zig.
Allows developers to optionally execute all queries as if the
`column_names` option was set to true.
Closes https://github.com/karlseguin/pg.zig/issues/73
This is supported by libpq and other PostgresSQL drivers.
https://github.com/karlseguin/pg.zig/issues/70
https://github.com/karlseguin/pg.zig/issues/65
https://github.com/karlseguin/pg.zig/issues/64
https://github.com/karlseguin/pg.zig/issues/63
This reverts commit 8583e06d89ad6bfd719ff4eba217223483ab8974.
If `Pool.acquire()` errors (e.g. due to a connection timeout) the pool's
mutex is never unlocked which results in deadlocks. Unlocking the mutex
with `errdefer` resolves the deadlock.
* update to zig 0.16.0
* fix test_runner
* fetch metrics from github
* return error from t.connect
* move @cImport to build system
* move to translate-c external package
- https://codeberg.org/ziglang/zig/pulls/31892
* fix: update test_runner.zig and fix Pool, testListener and Reconnector issues
- Update test_runner.zig from https://gist.githubusercontent.com/karlseguin/c6bea5b35e4e8d26af6f81c22cb5d76b/raw/8e82642093d2f4341fb870d18d1fe5b213b2fd11/test_runner.zig
- Fix Pool.initUri
- Fix testListener BADF error (file descriptor used after closed)
- Make Reconnector.run mutex uncancellable
- Make mapColumn StructField field a comptime pointer
---------
Co-authored-by: pm <pm@local>
* Add `Conn.execIgnoringState`
There's currently no good way to execute a `ROLLBACK SAVEPOINT`
statement while in a failing transaction.
This change adds a new `Conn.execIgnoringState` method, which has the
same behavior as `Conn.rollback`, in that they both ignore the current
state of the connection. This allows either to work at any time, even
when in a failing transaction.
I've tested this manually in my own codebase, but I haven't written any
test cases. Happy to add tests or make any kind of changes if this
doesn't feel like a good idea!
* restore accidentally deleted testing const
A Row/QueryRow/Iterator/Record can now either be "safe" or "unsafe". When safe,
fetching operations (e.g. row.get() will return an error on type failure, e.g.
requesting a bool when the underlying column is an int).
By default, operations return "safe" variants.
In unsafe-mode, these methods log + unreachable. Unsafe types can be fetched
via "Unsafe" variatns, e.g pool.row() -> pool.rowUnsafe().
This is a huge breaking change. Before this, everything was unsafe by default.
Migration means either
1 - switching to unsafe methods, row -> rowUnsafe
2 - handling the fail-case on any get row.get(bool, 0) -> try row.get(bool, 0)