Fork me on GitHub

What would cause this error, using fulcro-sql? [fulcro-sql.core:148] - Unable to create Hikari Datasource: Cannot open <nil> as a Reader. Is there a repo with example usage of fulcro-sql?


Ok, fixed that. Now I'm getting java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource


You have to add the postgres driver to your project file. It's not a hard dependency of fulcro sql


Database libraries rarely have the actual drivers in transitive dependencies…what if you’re using H2? You would not want a postgresql driver in your app making it bigger.


@U0CKQ19AQ You're right. I'm just a bit ignorant on the topic. Also not very comfortable in the java ecosystem/config yet. Wanted to try clojure on a fullstack clojure app... previously just clojurescript. Fulcro seems perfect for this scenario.


Cool. good luck. It is a lot to learn 🙂


If you look at the project.clj file for fulcro-sql you’ll see the :provided dep for postgres


just copy that over, and drop the provided marker


Yup, it works now. Thanks


So there have been a few people asking about running mutations in response to a result of server interactions. At the moment, the mutation-merge handling of Fulcro 1.0 is the way to do this. Technically, you can have a global atom that track your app (and thus the reconciler) so that you could transact from there if you had to. Ideally, you would trigger such a transact from setTimeout to avoid running a transact from within a running swap!. In general the Fulcro model is this: Run your mutation, follow it with a read if you really need to know something additional (or implement mutation merge). The read can have a post-mutation that further evolves the UI. I can see that from an abstract standpoint one might want to do more than react in the UI (e.g. the read might want you to trigger an additional mutation). Personally, I think you’re asking for trouble when you make your design that complex. Things get messy when you start making callbacks part of the model again, and I’ve been resistant to doing so, preferring to encourage us to be different and (hopefully) keep things simpler. However, I do get occasional requests from people to allow callbacks, and I do worry that I’m being too restrictive in this opinion. I’m open to the discussion, but I can tell you that it is going to take a compelling argument for callbacks to enter the API in any significant form. “Because that’s what I’m used to” isn’t good enough. I’m interested in Fulcro being general purpose. But I’m also very interested in it not degrading to the mess that a lot of other libraries make.


I’d very much appreciate discussion of the form “use-case XYZ…here’s how I am used to doing it. Here’s how I have to do it in Fulcro (or I don’t see how).” Then discuss the pros/cons of the alternatives.