“should i use drizzle or prisma?”
Summary of results
Love Prisma. Been using this for a few side projects as well as on my company projects, and it worked out really well for us.
Prisma maybe? https://www.prisma.io/
It's mostly part of a JS/TS ORM, but it uses a declarative schema language, and there are libraries in other languages to parse and process it. E.g. https://prisma-client-py.readthedocs.io/en/stable/
How does PragmataPro vs Iosevka compare?
I use Iosevka, but am curious about PragmataPro
Prisma uses rust for two main reasons from what I understand. 1) to keep the engine portable and maximize code reuse, to make projects like this Python adapter possible for example 2) under the hood Primsa does not use joins. It does a waterfall of queries (but not n+1), then stitches the data together in memory, which happens in the rust engine for performance reasons
I use Prisma and it’s far from perfect but what I love about it is you can introspect a legacy database and generate a Prisma schema, and use the database as the source of truth. You’re not tied to a 1:1 relationship between classes and tables, and the correctness of the types do not depend on tediously annotating code correctly. Excited to see more languages supported!
This is extremely disappointing news coming from somebody who architectured a project based on the fact that Prisma is the perfect multi-language schema DSL.
The only edge for Prisma is now lost - I might as well just use Drizzle.
Can DRIZZLE help to achieve higher resolution? Though with hundreds of photos this will imply a lot of work:
Prisma is a nice product but I wouldn’t use it in production yet. It is prone to race conditions as it does not use native upserts, opting instead for Rails-style check-if-exists-insert-if-doesnt.
Haven’t used prisma but I think their query builder type checks (not just the results) which make composing and writing them quite a bit more convenient than the example shows.
using a prism, maybe?
Meanwhile, some companies are building products with Prisma and are enjoying their choice. I love Prisma with Postgresql and Typescript, it's a very productive tool.
My first opinion wasn't very far from yours, but then I adopted it. It has served me well after a year and multiple projects.
When I used prisma a few years ago I was not impressed and it couldn't do a lot of what I needed so I had to dump into raw sql queries anyway. It was easier for me to use knex and get the types mostly right.
Isn't Prisma just a SQL ORM that you use on the server?
Prisma does the heavy lifting on our project:
I don't have experience with Knex so I, unfortunately, don't have an answer to your question.
Completely off-topic, but do you like prisma, and how are you using it (scale, complexity, solo vs team, etc).
I toyed around with it a while back, and it looked potentially awesome, but different enough that I was worried about using it on a work project in case it failed in some use case.
Im so sick of the SQL ORM situation in Typescript, but Prisma might have an answer.
Well the question you saw coming (hopefully) - how does it compare to Prisma use cases?
One thing I really like about Prisma is only updating my schema and having migrations generated as the "diff".
As someone who uses both prisma and knex (so something like kysely):
Prisma is very very nice, it has maybe the best DX out there. My issue with it is performance. It is much slower than query builders or raw sql. It's also a huge black box, although I haven't had any issues, you're dealing with a complex beast.
Knex (and other query builders) is nicer than raw sql, has good performance, and it's fairly transparent (it's not a 800 pound gorilla like Prisma)
Photoprism might be worth a look
I'm using Prisma ORM over Drizzle (didn't exist when I started).
When I need to add new data to a table I have, I just put the "new_column Type" in my prisma.schema for table X. and run "npx prisma migrate dev." Then everywhere else in my code, I already have the updated type for my object X.new_column and can access it with the guardrails of not betraying what type it is.
I'd rather do that than ALTER TABLE to create and update my read queries, while making sure I don't make a mistake in the raw SQL.
A lot has changed in the past years of Prisma, it's a really great tool, to be honest, "raw sql" escape hatches to do anything raw when you need it, if you haven't tried it in years, I'd recommend you to try again since if you tried it years ago, it was a very different maturity level.
Photoprism?
How does this differ from Prisma? https://www.prisma.io/.
I do like the quick bootstrapping Remult offers via "JSON db" if one hasn't set up a DB yet. And entity classes defined as a .ts file is nice, as opposed to Prisma's DSL (e.g. schema.prisma file).
Prisma is also an interesting case as it used to be queried via GraphQL but now they use their own query language. It’s still quite useful to build GraphQL based APIs though.
I substantially regret using Prisma in production for this and very many other reasons.
At least the underlying data is well modeled, just need to rip out the JS library and replace it… but with what?
> Prisma, a next-generation ORM for TypeScript which means that the core query building and connection handling has been battle tested, getting around a potential concern with adopting a new ORM.
Can I suggest you put this at the top of your README.md file, as I had never heard of Prisma before and it would have helped.
> Prisma Python
Is your program called Prisma Python or Prisma Client Python? You seem to be inconsistent with naming.
It's a solo project, CRUD stuff, but having used pretty much all JavaScript/TypeScript ORMs in existence, I can say that Prisma is way ahead of the competition. I would personally recommend it. A traditionally cumbersome and annoying thing about trying a new ORM is that you basically have to re-learn a pseudolanguage for building SQL queries but that hasn't been an issue this time, thanks to ChatGPT. So overall, happy with Prisma and plan to keep using it.
Our Prisma schema resides in our "backend" (Prisma essentially governs our master API). So I'm not sure why you're concerned that the front-end might control the schema.
The nicest thing about Prisma is that it is a declarative single-source-of-truth for our data models. Everything resides in one schema, all changes to database models and all migrations run through Prisma, and, best of all, strong types are inherently built in.
The team is also building useful middleware like field-level encryption; all of this together makes Prisma a very complete package.
Of course, there is a price for this convenience — we sacrifice some higher-level DB-side features. But Prisma is such a competent tool that we don't miss them much.
I've been dabbling with Prisma after almost a decade of staying away from ORMs such as EJB3 / Hibernate / iBatis.
With Prisma I like the ability to generate migrations and the DB schema from a single schema definition file. I also like the autogenerated simple crud use cases.
It did not take long to have to go raw. A simple case of selecting the top most occurring unique columns from a table with a join to limit by user id is brutally trivial oneliner in SQL that just rolls off the keyboard. I took a good try to do the same with Prisma and I believe it can be done, but the complexity of what the DSL will look like is laughable.
So I still have the same opinion I've had for these past years, ORMs are okay for simple crud stuff but the moment you need something slightly beyond that bailing for the raw sql is the best thing that you can possibly do for the maintenance team that comes after you have changed projects.
Prisma is one of the runtime currently supported [1]. Metatype enables you to compose multiple runtimes together. Let's say you have model/struct product (id, name, similarProducts), the two first attributes may be stored in Prisma (like you would do it normally), the third one can come from another runtime such as an HTTP api and the engine will take care of resolving the data together. You can also add an authorization policy on any of the fields.
I really do appreciate Prisma's developer experience though. Recently I've been testing out Prisma for migrations and Kysely as the actual ORM.
Prisma is generating the Kysely type definitions automatically so it is still pretty hands off without the production overhead of prisma server/client.
I use Prisma typescript daily and love it. It's fast to write complex queries and readable joins. The type hints are well documented and custom generated for your models and relationships.
It would be great if Prisma could support yet more languages! It's a great product.
That said, I would not have two backends sharing the same database, even if one is the master that runs migrations. A component should only have one reason to change.
So which one do you use?
These are more akin to Dapper which is a thin layer on top of SQL. Currently I use Prisma for JS, it's a bit better, but if you haven't used EF then you probably don't know what you're missing.
I've tried both Chroma and Qdrant. I don't think Chroma lacks that much. Definitely newer, but is also a great product. I think cloud support coming Q3 2023
It might sound small, but pulling in more context can make a huge difference – I remember one time Cursor completely hallucinated Prisma as part of our tech stack and created a whole new schema for us, whereas Codebuff knew we were already hooked up to Drizzle and just modified our existing schema. But like James said, we do use more tokens to do this, so pros & cons.
Which one do you use?
Which one do you use?
Which one do you use?
Honestly, I hated Prisma for a while. I've tried to actively rip it out of multiple projects. But, typed queries + views being supported have rally started to change my mind. Prisma is great for basic CRUD operations, and those two features give me a really solid, type safe escape hatch for most of my complaints.
Dropping the rust client will solve another big complaint. I definitely feel the issues languishing problem. I've submitted a few confirmed reproducible bugs that have hung out for a couple years. Still, I'm happier with their recent direction than I would have expected.
Seems pretty different. Prisma is an ORM basically, while this generates HTTP REST endpoints for you.
Personally I like Drops.
I think I prefer the results from the other approaches listed in the examples, e.g. material blending: https://orikmcfly.artstation.com/projects/9zRna
Dall.e is much better at understanding what you want. And sometimes stable diffusion feels a bit overfitted on some prompt (especially with cars).
But Dall.e is often behind in terms of image quality. They are nice looking from far, but a bit more blurry or weird than stable diffusion if you look closely.
However you can use boths together. These days I tend to use stable diffusion first, but when a prompt is not going well I copy paste it in dall.e and get what I meant much easily. And then I import the dall.e generated image in stable diffusion to work it a bit more and get something a bit better looking.
Please remedy my ignorance if I might be wrong, but I thought Prisma was an ORM, not a true backend.
Thanks for sharing this. I haven't tried tRPC yet, but I do use Prisma. I am slightly curious/puzzled why I would need both in the same project. Doesn't Prisma get you most of the way there? Or, is this for creating a CRUD REST API that talks to the DB via Prisma, and to the Client via REST/tRPC? Seems heavy to me.
Prisma is pretty good, but the migrations system doesn't really compare. If your answer to many (any?) migrations is "blow away the existing database", that's not gonna work for me. Another thing that's not gonna work for me is generating each migration by hand with SQL specific to the dialect that youre using in development, now that I'm spoiled with Django's auto-migrations. I've had good success with Prisma by using Django to simply manage the schema and using `prisma pull db` (though Prisma unfortunately errors if you are using the default type for primary keys, AutoBigInteger because it can't handle BigNumber). Prisma is basically the ORM I had in mind when I said "there has been work in this space", FYI.
I have only used NextAuth a tiny bit, but it wasn't clear to me how to, for example, extend the user model to add fields to users. I would appreciate it if you have any resources you could point me to for an example or explanation on how to achieve that. I also did not find documentation about how to add my own authentication adapter (or plugin or whatever language they use).
Reminds me a bit of PhotoPrism
Tossing this one in here as it's a combination of Isoveska & PragmataPro: https://github.com/shytikov/pragmasevka
Been using it for a bit and I've really fallen in love with it.
I've had better luck with Stable Diffusion using impressionist/surrealist/etc. styles because you don't really expect the results to be "right" in a literal sense.
Be sure to also check out the Prism theme, i personally prefer it over Minimal;
Light: https://raw.githubusercontent.com/damiankorcz/Prism-Theme/ma...
Dark: https://raw.githubusercontent.com/damiankorcz/Prism-Theme/ma...
I use both, randomly.
How do these techniques handle transparent, translucent, mesh/gauge/hair like objects that interact with background.
Splashing water or Orange juice, spraying snow from skis, rain and snowfall, foliage, fences and meshes, veils etc.
Unless you like shimmer inks, which will clog your nice Metropolitan or Safari. A quill pen works just fine there, if you like taking the time to DIY. More people choose glass dip pens instead.
But me, yes I'll stick to my TWSBI Eco, Pilot Custom Urushi, and Lamy 2000, with a nice Blue-Black instead.
As someone who teaches both oil painting and digital painting, I find this project fascinating. They have certainly identified two of the key difference between digital and real paint:
- RYB mixing (e.g. yellow painting plus blue paint = green). I tested it on a mix of alizarin crimson plus hansa yellow to produce a cold orange (e.g. blood orange).
- Relative behavior of specific pigments. For example, a Prussian blue is almost black when applied thickly, but very chromatic when applied as thinly over white. A cerulean blue is pretty much the same in those two states. I tested this on a Prussian and the app performed well.
The app seems to make the assumption that the artist will always want the paint to mix. In a glaze, a thin transparent layer of paint is applied over dry paint. Effectively the result is a filter (the result will always be darker). To a degree, this can be faked using paint applied in a layer the blend mode of which has been set to multiply. It might be nice to add a drying brush to the tool set which selectively dries the paint to prevent mixing. Maybe also a mode switch to selectively different modes of physical application such as glazing, scumbling and dry brushing. While we are at it, why not add a Tonk mode using which thick paint can be lifted off the surface without smudging.
When I paint digitally, I mix the incredible nuance of real paint... even its smell. When I paint with oils I miss the incredible flexibility of the digital process (blend modes, compositing, even the humble undo). Never the twain...
On practical how to:
1. Keep two water reservoirs for cleaning your brushes. One for warm colors and one for cool. (This prevents muddiness in your palette).
2. Knowing when to let the layers on your paper dry before further progress is vital.
3. Carry pigment from the bricks to your palette, don't mix pigments in the bricks.
On technique:
1. Experiment adding water to a pigment on your palette (More water == thinner with less Saturation and vice-versa).
2. Experiment with how wet pigments interact with other wet pigments on the paper. (More water == better flow).
3. Experiment with the paper tilt direction (water flows under the force of gravity and this can be used to create a desired affect).
4. Know how to layer (i.e., 1st layer low saturation, broad areas with high water/flow, final layer is fine detail lines with low flow/higher saturation).
5. You must understand the color wheel and how pigments may mix.
I have beef with this guidance:
> let your palette and paint bricks get dirty
Keep your bricks clean: Let your palette get dirty (if you so choose).
The starting colors are actually identical. Try painting a 100% opaque color pool and then switch between Mixbox and Normal. You'll see that the colors are the same. The difference is their behavior in thinner layers - when the brush opacity is lower.
When you spread dark pigments over a white canvas, they usually turn very radiant, saturated colors. Phthalo Blue turns from dark purplish blue into turquoise for example. RGB mixing doesn't handle those saturation gains and that's why a brush stroke made in the 'Normal' mode looks way more dull than the brush stroke made in 'Mixbox' mode with the identical starting color.
This is actually an important point of pigment mixing. The saturation gains and hue shifts when pigments get spread or mixed with white are beautiful. RGB linear mixing (the 'normal' mode) doesn't capture them.
I have just been working with photoprism. Ente looks nice but going to stay with photoprism as I like the go binary and can build features I want.
Wow just one look at this issue was all I needed to see. https://github.com/prisma/prisma/discussions/12715
“Please open an issue if something really is unusable or breaks in any way so we have these concrete cases recorded. In our knowledge Prisma works just fine and returns the data that was requested, just using a different method.”
Good lord
Honestly, I hated Prisma for the longest time. Like, hated it. I tried to rip it out of projects multiple times. Why would you build a node library in Rust? (as one of many problems) But, I had a mental shift recently that helped me appreciate it more: I use Prisma only for features that fit neatly into an simple ORM (i.e. building a web page based on a bunch of joins). Anything else, I use raw SQL.
They released TypedSql (https://www.prisma.io/docs/orm/prisma-client/using-raw-sql/t...) which is heavily inspired by PgTyped. That lets me write raw Postgres SQL that's converted into TypeScript. The other things I do:
- If I want derived data, write views that encapsulate the transform. Prisma supports reading from views
- If I need something more complex, use DuckDB + python for analysis and write to the appropriate table.
- If I need to cache complex queries, just use a materialized view and read it as a prisma object
It's not perfect, but that let's me use prisma for what it's good at (Managing an ORM and deeply nested queries), then fall back into raw SQL for everything else.
Going straight to SQL has been a breath of fresh air, but, let's be honest, dealing with deeply nested joins really sucks when all you want to do is build a page that shows a company, all of it's people, and all of those people's relationships. ORMs are pretty handy for that last case, and I use SQL for everything else
We’re using Prisma (https://prisma.io) schemas for a particular data exchange project we’re doing so that we can generate JSON schemas, SQLite schemas, PostgreSQL schemas, etc. We have even found a generator to create basic Elixir code from the Prisma schemas.
We’re not using anything else from Prisma, but if we had to implement something else in JS to talk to a database, that would be a contender for our database interface layer (there are only a couple of others that are even remotely usable, having suffered through the disaster of a Sequelize implementation). We’re more likely to use Elixir and Ecto.