IHP 1.1 is out now!
Create a new thread +
Upsert with the Query Builder
Gergely Szabo
In raw SQL it is possible to use INSERT ... ON CONFLICT ... query, to update the record, if it already exists. This feature would be a nice addition (I am currently using withTransaction, to delete conflicts) …
Add Response
Discriminating unions
Hi! I'm new to Haskell and I'm really impressed by the modelling power of discriminating unions. Fex a zapier clone might do something like this Zap = new Record {id, trigger, actions} data trigger = timerTrigger | httpTriger ... et…
Add Response
Pulling production data base into local instsance
Joachim Breitner
I’d like to pull the data from the IHPCloud deployed instance into my local database. I tried pg_dump "postgresql://…?host=database-cloud.cephcue7lnqe.eu-central-1.rds.amazonaws.com" | make psql but the output isn’t promising: SE…
Add Response
unrecognized configuration parameter "rls.ihp_user_id"
Hi everyone, I'm getting an issue when I try to create a post with a foreign key relationship to the users table. The user_id column has a default value of ihp_user_id(). I can create posts again when I remove the column. This is the…
Add Response
Dealing with really big db tables, any advice?
Lillo PRO
Any advice for dealing with very big tables in IHP? Product page here has gotten so dreadfully slow even when paginated and client-side loaded: https://dill.network/Products There is 2 million products in the DB, so big, but I guess it'…
Add Response
Is there a good way to do nested/threaded comments in IHP?
Lillo PRO
Has anyone done nested comments in IHP in a clean-ish way yet? I get the feeling that comment_id / parent_id inside the comments table is not a a good idea, but would be nice if I could just do that :) I'm a bit skeptical to nested sets…
Add Response
Any way to import fixtures/tables from production DB to dev DB?
Lillo PRO
Happy New Year everyone! I think I have overheard some different techniques for DB diffing to the IHP fixtures on Slack, so hope someone has some input. Does anyone know of a good way to import the database in production and hydrate the loc…
Add Response
Single-query replacement for collectionFetchRelated?
My understanding of the collectionFetchRelated method is that if I query for 100 posts, they will be returned in one query, and then if I want their comments the >>= collectionFetchRelated will then run 100 more queries to return each…
Add Response
Autorefresh as pubsub
I set up a websocket connection using this example https://ihp.digitallyinduced.com/Guide/websockets.html Would it be possible to track certain DB tables here as well? Like AutoRefresh is doing for actions. I want to push something over WS…
Add Response
Running Consecutive Tests From ghci with hspec
If I load and run a /Main/Test.hs module to ghci from an IHP app and run the test suite one I get expected behaviour. But if a test fails and then I try to run main again from ghci prompt I get a: # PENDING: exception in beforeAll-hook …
Add Response
Support for dGraph
Dgraph is an amazing database! It would be great to see support for this added. …
Add Response
MySQL support
We are a mid-tier Web development company. All our clients already use MySQL and it is nearly impossible to make them consider anything else. I may be wrong, but in my experience everyone in this market uses MySQL, it is ubiquitous (though …
Add Response
One-to-zero-or-one relationship
Hey y'all, Just posted this question to stackoverflow regarding modeling a one-to-zero-or-one relationship. Any suggestions (here or there) are welcome. Hopefully the answers can serve as a reference for folks needing to setup this sort…
Add Response
Feasibility of using with another DB backend
So, the necessary backstory is I have a big internal application I happen to support which is built on MSSQL, and it's at best infeasible to migrate it to PgSQL. I really would love to move away from the hodgepodge it is today, but rewr…
Add Response
Is it possible to change the "dev" database connection string.
I've seen previously that it isn't possible (from about 4-5 months ago), but I'm looking to see if it's on the roadmap. I've been doing quite a bit of devcontainer development these days, and like to keep my db in a sepa…
Add Response
Problems using composite primary keys
I'm trying to model a many-to-many relationship with containers containing items which can belong to multiple containers with the help of a container_items table defined like so: CREATE TABLE container_items ( container_id UUID NOT …
Add Response
Transaction scope
Michael Fliegner
What is the scope of database transactions? fetch-command ( my guess ), request, session? Is there any way of controling or will there be? …
Add Response
attaching to an existing database
I'm just starting to play with this and so far I like what I see, but is there a way to connect to an existing db? I'm not 100% through all the docs yet, so I may have missed it. …
Add Response