muhlemmer / pbpgx Goto Github PK
View Code? Open in Web Editor NEWPackage pbpgx provides a toolkit for easier Protocol Buffers interaction with PostgreSQL databases.
License: GNU Affero General Public License v3.0
Package pbpgx provides a toolkit for easier Protocol Buffers interaction with PostgreSQL databases.
License: GNU Affero General Public License v3.0
I have doubts to continue work on this library. To be honest, since I started pgx v5 came out which now features excellent mechanics to scan directly into struct types including nesting of rows etc. Hence, I don't see much value in regards to scanning into protobuffer messages specifically. Also the architecture at my current employer is mostly incompatible with what I tried to do here, so there is no incentive to support this work at the moment.
The query building part was nice to do and I spend quite some time optimizing it. So there arises my doubt :)
There are just 11 Github stars, for which I'm grateful. Please let me know if there are any real usecases out there already and I will make up my mind based on feedback. Cheers!
The selector interface puts too much limits on the callers. Instead, just use generic arguments for ID and columns.
Lines 32 to 46 in 0cde4e5
Line 106 in 38fe474
Executing the INSERT...RETURNING
query which fails to insert, the returned error is pgx.ErrNoRows
, while it should be the original error:
6:27PM ERR Query args=[{"ValueTranscoder":"muhlemmer"},{"ValueTranscoder":"[email protected]"}] err="ERROR: duplicate key value violates unique constraint \"users_email_key\" (SQLSTATE 23505)" module=pgx pid=373 sql="INSERT INTO \"account\".\"users\" (\"nickname\", \"email\") VALUES ($1, $2) RETURNING \"email\", \"nickname\", \"updated_at\", \"created_at\", \"id\";"
panic: Table "account"."users" Create[0]: no rows in result set
Seems some parts of the code are still throwing a panic, instead of returning error.
https://github.com/muhlemmer/pbpgx/runs/4570868206?check_suite_focus=true#step:6:24
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.