Settings

Theme

Show HN: Interact with your PostgreSQL DB like a spreadsheet

github.com

3 points by db-interface 2 years ago · 5 comments · 1 min read

Reader

A little program I wrote because I'm tired of writing the same Django admin code, maintaining complex SQL queries and JavaScript transformers in Retool, and working around the lack of writability in BI tools.

It's an early alpha, so I wouldn't use it in production, but I would appreciate any feedback on it and whether you find it useful.

potamic 2 years ago

You seem to be using htmx? Pretty impressive to get this much interactivity without much javascript. Would be very interested to learn more about how it's working out overall.

  • db-interfaceOP 2 years ago

    I am! It's my first HTMX project but I am liking it so far. HTMX has a few quirks which it took me a while to understand, but since then it has worked pretty well -- the amount of HTMX "code" I've had to write is quite small compared to the amount of JS I'd normally have to write.

    My main takeaways have been:

    - It mostly just works and simplifies things, but:

    - Working with page state (in my case, which sheet is loaded) in individual requests (like updating a cell) is a bit awkward -- you can either supply it via `hx-vals` or via setting a global hidden input which is specified via `hx-include`. I ended up going with the second approach due to https://github.com/bigskysoftware/htmx/issues/1119 but it's not perfect -- in particular you need to duplicate specifying the input if you want to include additional inputs for some node.

    - Error handling is also a bit awkward, but it's not too bad once you get used to the idea that you should return HTML elements in 400s. I found https://htmx.org/extensions/response-targets/ helpful as well. - Often HTML structure doesn't allow you to limit your request scope as much as you'd like. For me the big thing is I can't just replace one column since tables are row-major -- I have to replace the whole table if a column is modified.

mgummelt 2 years ago

Cool. You might give our app, Plato, a shot as well. It gives you an Airtable-like UI on your database.

https://plato.io

  • db-interfaceOP 2 years ago

    Thanks, I'll take a look! It didn't come up in my research a few months ago, which surprises me. How would you compare it with a product like Equals?

    • mgummelt 2 years ago

      Equals is an actual spreadsheet with read-only access to your warehouse. It's used for analytics and accounting.

      Plato is a visual database, similar to Airtable, with read-write (configurable) access to your production database. It's used for operations.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection