Комментарии:
winner is one and only eye : look for what you need manually
ОтветитьDigitally Transmitted Diseases 😂😂😂😂😂
ОтветитьIts a bit idiotic that we replace sql language with pseudo sql ceamped into function calls and make ourselves learn an extra framework
ОтветитьThere is nothing nicer than having someone with your same mindset that has already made the homework in the topics you're interested at. Great
ОтветитьTypeORM does not guarantee any kind of type safety if you use the query builder to make some joins, add computed properties, etc. It always just returns the entity type, no matter the query configuration you've made. That can make it even worse than having no typings at all. You oculd use a raw query which accepts a generic, but then what's the point of it.
ОтветитьI hate orm
ОтветитьSQL aint no relational database... it's a primitive type table database. You may as well claim C is object oriented cause you got all the tools you need to build some object system with it.
ОтветитьJust use a type-safe query-builder like Kysely and avoid all the ORM issues.
Ответитьthis is the reason some time i hate node js too many options what ooo for god shake just tell me one what sould i use
ОтветитьI'll save all typescript developers some time here. Don't even consider using Sequelize. You're welcome
ОтветитьOh no. Don't use serial for your pk!
ОтветитьFunny how ORM's are rarely used though. Companies love rawdogging SQL queries
ОтветитьPrisma's schema DSL IS the dealbreaker for me. It's so bad. It's really not a good DX...=
ОтветитьI wonder if this ORM works with Recktor as well 🤔
ОтветитьI worked extensively in one of the ORM that’s Eloquent which Laravel uses which is a PHP framework
ОтветитьHey Knex, Eloquent says "Hi" .👋
Ответитьwhat about question marks?
ОтветитьORMs are one of those things that aren't worth the trouble in the long run.
They can be nice in a quick prototype, but for an app that lives for at least a few years, you'll inevitably start bumping into performance issues or weird ORM behaviour that costs a lot of time to resolve.
The first time I encountered an ORM I thought it was magic, but after 15+ years in the business, I no longer find them worth the trouble. Writing raw SQL isn't that hard and as long as you use parameterized statements, much less likely to bite you in the end.
Save your future self the headache and start with a low level library.
Prisma is the worst of all, I agree they provide the best developer experience. But once you start get production workload you will notice the bad performance. Bro they don't use joins in their generated queries
Ответитьthis is gonna be very useful for my typescript api, living and leaning...
Ответитьclearly prisma and typeorm are the best ones. I'd go with prisma because... rust.
ОтветитьWhat I found after long switching between frameworks is that php is enough for most uses. React, Vue etc. is made for large scale one site applications like Facebook, Twitter, Spotify. Same thing goes for optimising databases, just using basics is better most of the time.
ОтветитьI use my ORM to map database queries to objects. I know crazy.
ОтветитьI cannot begin to say how awful TypeORM is. DO NOT USE IT, PLEASE!
ОтветитьJeff And Ozzyman are my most favourite Australians ❤️
ОтветитьTrust me, you don't want to bother with sequelize if you're using typescript. It just causes so many weird bugs, is not documented as well as it looks at first glance (many options objects are not specified in the api documentation, at least when i last used it), and forget it if you want to write a complicated query.
ОтветитьEntity Framework is the best
ОтветитьHi! I just wanted to add another perspective regarding ORMs. My experience is that they should be considered anti-pattern and I can outline the reasons why:
1. they won't excuse developers from having to understand good database design and proper querying and, most often, introduce N+1 problem through that naivete
2. they encourage direct table access with what amounts to adhoc SQL which ties the hands of database developers when the need arises to reorganize data for scale and performance
3. most relational databases offer things like functions, stored-procs and prepared statements which parameterize queries to solve things like:
a. combating sql injection
b. providing an access layer tier above base tables which:
i. provides API-like access and
ii. grants the freedom to re-org base tables as needed
iii. simplified access-level authorization
Those are the main points (there are others). Whether an ORM is used or not, there is no escape from getting to know your serialization (storage) layer well. You should be using functions or stored-procs as access points to your database regardless. Which then begs the question, why do you even need an ORM?
I kinda prefer Knex because it gives me control and everything still looks and feels like SQL. Very transparent in its use. No need to figure out how joins work in an ORM or if it does expensive sub-queries. I'm responsible for optimizing it, and... ChatGPT is also familiar with it.
Ответить“joist-ts” is an awesome option for graphql + Postgres - has dataloader built in so any graph queries are N+1 safe. Reminds me a lot of ActiveRecord for Rails
ОтветитьIf it's an mvp, do yourself a favor and just use sqlite.
ОтветитьEh. I did not expect you to skip Bookshelf...
ОтветитьI swear people will do anything to not write squeel
Ответитьas far as i know django orm is really good
ОтветитьFor Postgres PgTyped is an awesome project. You write bare SQL and it typeschecks agains the databse and generates query methods that are comletely typesafe, even with complex joins or recursive queries.
ОтветитьWhat's drizzle:p because drizzle looks slower than all the rest.
ОтветитьI always hated the word "migrations". Its not leaving its just changing.
ОтветитьOh, I had to use knex, I liked it, it reminded me of Eloquent
However I sucked on JS so back to PHP lol
Nice to have Eloquent ORM baked right in the Laravel Framework providing all of these and more features out of the box.
ОтветитьI jsut wanted to create a simple Website! Why is the developer community torturing me with new ways every few days😢
ОтветитьORMs are shit.
You constrain your database's potential to the level of the ORM which is usually a 90% loss, if your database is postgres.
Just came here after watching the codedamn video on prisma 😂😂😂😂😂
ОтветитьHAHAHA! PG the OG, TOP G and my DO Double G Got me so bad...
ОтветитьPrisma doesn't support Joins.
Use with caution.
Objection js must be here!
Ответить