SQLc is the perfect tool for those who don't like ORMs

  Рет қаралды 118,876

Dreams of Code

Dreams of Code

Күн бұрын

Пікірлер: 301
@dreamsofcode
@dreamsofcode 3 ай бұрын
Click this link sponsr.is/bootdev_dreamsofcode and use my code DREAMSOFCODE to get 25% off your first payment for boot.dev. That’s 25% off your first month or your first year, depending on the subscription you choose.
@NickTheCodeMechanic
@NickTheCodeMechanic 3 ай бұрын
I NEVER use protection.
@CppExpedition
@CppExpedition 3 ай бұрын
please wait a little bit longer for us to read code instead switching to your face xD
@edhahaz
@edhahaz 3 ай бұрын
the ORM/SQL guy's laptop of choice is inverted for engagement baiting.
@r0ny539
@r0ny539 3 ай бұрын
i wanted to say same thing
@astronemir
@astronemir 3 ай бұрын
No just admit you’re an SQL normie. Embrace the label 🐑. 😂😂😂
@devOnHoliday
@devOnHoliday 3 ай бұрын
missed the banana cursor
@endalk200
@endalk200 3 ай бұрын
Very interested in seeing your go backend development stack
@fresonn
@fresonn 3 ай бұрын
I have been using sqlc for two years now. It is definitely one of the best tools for interacting with a database.
@AbegazNap
@AbegazNap 3 ай бұрын
was not friendly with arguments inside case statements so I switched to go jet, but yes one of the best in the biz as they say
@jefferymuter4659
@jefferymuter4659 3 ай бұрын
Damn this is perfect! I've heard of sqlc, but didn't understand it. I've also been writing all my own code for this, and its been making me feel super sluggish. Thank you for showing me this!
@timo_b3
@timo_b3 3 ай бұрын
this looks extremely interesting, thanks for showing this
@couch9416
@couch9416 3 ай бұрын
I am on vacation and wanted to look into sqlc for a project when I am back, so this is perfect timing
@HierImNorden
@HierImNorden 3 ай бұрын
We decided to use sqlc a couple months ago and it is the best tool we have found, but I have two gripes with it: 1. You cannot easily create a drop in replacement interface for two different engines. We wanted to use PG in production and SQlite for testing. Even though the generated types etc are entirely identical they are, at the end of the day, different types. So what we did was write a hacky python script that copies all the parameters and models into a common package and updates the references in the subpackages. It works, but a native way for this would be nice. 2. It bleeds sql types. Every nullable column turns into a sql.NullXXX field instead of, say, a *string. If I wrote the repository myself, I would convert that to normal types before passing it along, but I have not found a way to do that with sqlc so far.
@eyob7232
@eyob7232 3 ай бұрын
You can add a `emit_pointers_for_null_types:true` property to solve your second issue, not sure for your first one though,
@benwoodward3446
@benwoodward3446 3 ай бұрын
Why not use pglite? Or postgres via testcontainers?
@じょえさん
@じょえさん 3 ай бұрын
Bro, To quote from The Twelve-factor App, the development and production environments should match as much as possible.
@Asdayasman
@Asdayasman 5 күн бұрын
@@じょえさん Let's see you run VS code in AWS lambda. PaaS makes 12 factor impossible to follow.
@ericwanyoike-h9l
@ericwanyoike-h9l 3 ай бұрын
sqlc is just a must use tool to use with databases
@mantovani96
@mantovani96 3 ай бұрын
The only thing missing is a better way to handle queries with dynamic parameters.
@sarabwt
@sarabwt 3 ай бұрын
to-many joins?
@RumenNikiforov
@RumenNikiforov 3 ай бұрын
Exactly, i'd like to see how you can have one func that supports conditional filtering e.g. find all players based on their class, or have particular item, or have gold above or below certain value. And full text search with ordering based on query relevance e.g. in postgres column 'value'
@TheNamakool
@TheNamakool 3 ай бұрын
Yep this hurts the most for endpoints that need to apply lots of optional filters
@AbegazNap
@AbegazNap 3 ай бұрын
@@TheNamakool you can try case when statements with associated booleans to check if the filters are provided since zero values might be a problem
@meni181818
@meni181818 3 ай бұрын
you can mock it with weird sql case.. conditions etc.
@L0wPressure
@L0wPressure 3 ай бұрын
Amazing :) We were just talking with a colleague, how we hate codegen, but this tool actually looks nice!
@NatanStreppel
@NatanStreppel 9 күн бұрын
I was responsible for adding Postgres support for sqlc. I really wanted to used it, but the company I work at only uses Postgres, which wasn't supported at the time. The project is very well written, and adding Postgres support was a breeze. Kudos to the project maintainers for keeping a consistent codebase and being open to new contributors.
@ErmandDurro
@ErmandDurro 3 ай бұрын
Great video. I didn't know about sqlc, but I am definitely going to try it now. Thanks a lot for such great quality content. And yes, I would love to have that video about your backend stack :) Thanks once again!
@GreyDeathVaccine
@GreyDeathVaccine Ай бұрын
Very high quality video. I like simple tools. That's why I am using RedBeanPHP. RedBeanPHP is an on-the-fly object-relational mapper, this means there is no upfront configuration. The system relies on conventions entirely and adapts the database schema to fit the needs of the program. So it's different approach to basic operations, but I still like to combine RedBean with repository pattern 🙂
@Darthtrooper14
@Darthtrooper14 3 ай бұрын
You convinced me to try sqlc. Thanks for showing us this!!
@erikslorenz
@erikslorenz 3 ай бұрын
If you spend 5 years having to almost exclusively use 3rd party APIs (poorly documented) instead of traditional DBs, any opportunity to use SQL directly is a dream.
3 ай бұрын
Again, thank you for your work! I've tried to convince some people on my team to use sqlc, they were not fully convinced despite my fantastic persuasion techniques. Guess I'll just share this video so they can finally understand what I extremely articulately tried to say/show at the time xD
@spartan_j117
@spartan_j117 3 ай бұрын
Take a look into go-jet/jet. It is really fantastic, true type safe way to write sql. The thing that author shows in this video is just as retarded as any other. Jet is the future.
@recarsion
@recarsion 3 ай бұрын
The BTW part really got me 💀Very relevant video as well, I'm using something called SQLBoiler right now which is one of the better ORMs I've used but I'm still feeling the limitations on a day to day basis especially any time joins are needed so I either end up writing a raw query anyway or querying each table one by one and joining manually, at which point why even use an ORM, or a relational database for that matter... luckily I'm at the point where I can still make a big change like this so I'm fairly sure I'll be converting to sqlc. Edit: and I did it already in a couple hours, it went pretty smooth actually (not surprising for a small application like mine) and I'm finding this really easy to use and elegant so far
@cg219
@cg219 3 ай бұрын
Also I love sqlc. It was the first option I chose when switching to Go. Great choice I see
@MadsterV
@MadsterV 3 ай бұрын
Problem achieved! you've replaced boilerplate with even more boilerplate in two different uncommon languages!
@TheRykung
@TheRykung 3 ай бұрын
perfect timing video lol I was looking into sqlc last night. wasn't sure if I wanted to just go with the standard go database/sql package or use sqlc
@tkg__
@tkg__ 3 ай бұрын
The only gripe I have with it is that it creates a non-standard SQL. The sqlc.embed() for example makes the SQL query not actually SQL, which was the whole point of using sqlc and not an ORM.
@AK-vx4dy
@AK-vx4dy 3 ай бұрын
Those queries templates not literal queries. I know most libraries for SQLs provide replacing $1 or :amount with provided parameters but it this any diffrent ? But you are right is should be orthogonal and specfics about arguments shoud be done like comment $1/*amount::bigint*/.
@dealloc
@dealloc 3 ай бұрын
It's valid SQL syntax which is important to note. Just as valid as using different SQL flavor depending on which SQL engine you use. This engine just happens to go through sqlc before being passed onto your database directly. Consider the SQL being executed within a runtime that has a preprocessor that simply replaces those calls during execution. This is why they are called macros, because they are exactly that.
@31redorange08
@31redorange08 3 ай бұрын
Yeah, kind of defeats its purpose.
@theseangle
@theseangle 3 ай бұрын
Bro it's a macro, it produces the same SQL you would've written without it. That's the whole point. And you aren't even forced to use it, nobody's stopping you from raw dogging the conflicting column names and writing boilerplate. It's just QoL. The main purpose of SQLc is to strike a balance between DX and control, and it does hit the spot quite well. You also aren't forced to opt in fully, you can use it for part of your queries, it doesn't affect the schema (unlike ORMs), you can still use regular SQL or other tools with it.
@31redorange08
@31redorange08 3 ай бұрын
@@theseangle What so you mean by "produces"? If I can't take the string literally and execute it directly, it's not valid SQL.
@05xpeter
@05xpeter 3 ай бұрын
As a developer that constantly have to stop my self from writing raw sql queries, this look amazing. We have a cross language platfrom Python and Typescript maaaaaybe I could sneak it in make our code base a little dry'er.
@SaltCatcher
@SaltCatcher 3 ай бұрын
I want to see a video about your complete go stack!
@ad-coding-gh1lm
@ad-coding-gh1lm 3 ай бұрын
Thanks
@ad-coding-gh1lm
@ad-coding-gh1lm 3 ай бұрын
I really loved this tutorial. I saw sqlc tutorial before but was scared to use and I didnt get much out of it. but with this I really find it easy and have already started working on a personal project with this. Please also make a full backend app tutorial would love to learn more about golang thanks again
@dreamsofcode
@dreamsofcode 3 ай бұрын
Thank you so much for the support! I'm glad you found value in the video!! I absolutely will make a full backend app tutorial. 😁
@mikaeels2691
@mikaeels2691 3 ай бұрын
this is what the squirrel library for Gleam does which is pretty cool, except that one only supports postgres for now
@esra_erimez
@esra_erimez 3 ай бұрын
The company I work for tried sqlc, they contributed to the project both with code and funding. Its missing a lot of features. For example, dynamic quueries. Its been an open issue on the issue tracker for *years* now. We moved on to xo.
@lambertm9837
@lambertm9837 3 ай бұрын
I second this
@kompila
@kompila Ай бұрын
Thanks for sharing. A lot of people in the comment are talking about dynamic queries.
@TheKastellan
@TheKastellan 3 ай бұрын
7:30 *Woosh. Woosh. Woosh. Woosh*
@MichaelCampbell01
@MichaelCampbell01 3 ай бұрын
For real; quite distracting. Otherwise great content, too.
@ViktorKrejcir
@ViktorKrejcir 3 ай бұрын
That looks cool :) I'll try it tonight before I Hibernate :)
@lifelover69
@lifelover69 3 ай бұрын
i learned a lot and i'm going to try sqlc now, thanks! squeal ftw
@michawhite7613
@michawhite7613 3 ай бұрын
There's a Rust library called sqlx, which uses the language's macro system to verify SQL commands against your local database at compile-time, and it generates a compiler error if it fails.
@tekipeps
@tekipeps 3 ай бұрын
@@michawhite7613 yeah the original library is sqlx from golang
@dreamsofcode
@dreamsofcode 3 ай бұрын
I have a video on sqlx! I'm a big fan of it.
@flameinthedark
@flameinthedark 3 ай бұрын
There are also some inconvenience with this tool, it's impossible to make some filtering requests. For example if you have a search route in your API and you have to insert some WHERE statements in the SQL request. Like, select rows with "active = true" when user set that checkbox, and other filters. But yeah, in general this tool is very cool, and I've used it in the production, but had to switch to plain SQL or something like squirrel to be able to build more flexible requests
@AK-vx4dy
@AK-vx4dy 3 ай бұрын
Are you sure ? You can add WHERE in query with parameted $1 like "WHERE active=$1"
@someoneunknown6894
@someoneunknown6894 3 ай бұрын
​@@AK-vx4dyI think he means that unless the checkbox is set, you are ok with both active being true and active being false, otherwise you only want to get the active entires
@dealloc
@dealloc 3 ай бұрын
First, you know the filters that may or may not be applied, so build the query with those in mind up front. Don't concatenate query strings to form a query dynamically, instead encode the filters into the query itself: For example `SELECT * FROM table WHERE (@name IS NULL OR name LIKE @name) AND (@age IS NULL OR age = @age) AND (@active IS NULL OR active = @active) ...` This gives you the freedom to choose how filters are applied in compound. The benefit of this is that the execution plan can be cached and re-used no matter what inputs are, so there's practically zero overhead unlike stitching random queries together which may be different each time
@orterves
@orterves 3 ай бұрын
​@dealloc you beat me to it - this is correct, and the other style of code that tacks on extra sql is harder to maintain. An alternative to doing it this way would be to make multiple queries with different where clauses and choosing which one conditionally in the code
@AK-vx4dy
@AK-vx4dy 3 ай бұрын
@@orterves If you need to be so elastic (user provided filtering), indeed good(!) orm can be a better choice. But.. I'm not sure but maybe is possible to add sql.embbed(whole_where_section) and bulit this part in code ?
@committedcoder3352
@committedcoder3352 3 ай бұрын
Would love to see you talking about the migrations.
@herbertpimentel
@herbertpimentel 3 ай бұрын
I would love to see more about it.
@distinctdipole
@distinctdipole 3 ай бұрын
Thank you... for clearly explaining this helpful tool and for the moments that made me chuckle 🤭
@Metruzanca
@Metruzanca 3 ай бұрын
Oh shit, hopefully a Gleam plugin gets made. Maybe I'll give it a shot.
@youssefgamal4625
@youssefgamal4625 3 ай бұрын
In Java Spring Boot there is a solution for db first called JOOQ, it's impressive for any spring boot development
@tienslabien
@tienslabien 3 ай бұрын
I went with querydsl, which is a similarly-minded api. Way lighter and clearer code than jpa/hibernate, whilst also having access to the full sql spec and db-specific dialect operations (try writing a dynamic join or an INSERT SELECT ... query with jpa ... lmao)
@SteveKuznetsov
@SteveKuznetsov 3 ай бұрын
Consider using bingo to declaratively manage the version of SQL binary you're using at a project level. This is very nice to make the build time environment reproducible for anyone cloning the repair and also to manage the version of the tools in git.
@sagarrout007
@sagarrout007 3 ай бұрын
I am not sure for go but for Java developers, Jdbi brings this thing with more nicer abstraction as well
@tienslabien
@tienslabien 3 ай бұрын
oh good catch, I didn't know about JDBI, thanks for sharing
@temperkan3727
@temperkan3727 3 ай бұрын
Very useful video!
@anothercrappypianist
@anothercrappypianist 3 ай бұрын
I'm definitely won over by the prospect of less boilerplate, but my first thought was "how does it deal with transient db failures?" After looking through the GitHub issues, unfortunately the answer seems to be be "not very well." There's no explicit retry mechanism, and there's currently no means of adding custom middleware through which to implement common retry logic. So AFAICT implementing retries means wrapping calls, which replaces one kind of boilerplate with another.
3 ай бұрын
Without dynamic queries it was of no use... at least for my projects: p Nice video btw.
@christopherkim133
@christopherkim133 3 ай бұрын
Could we get a look at that go stack?
@felizadoxi
@felizadoxi 3 ай бұрын
Yes, please show us your full stack
@Bennevisie
@Bennevisie 14 күн бұрын
There’s two types of developers: those who prefer raw sql; and imposters .
@DerTim
@DerTim 3 ай бұрын
Im using sqlx and go migrator embedded into my app rn and I'm thinking about moving to sqlc + atlas. But there is one important feature missing to me: how can I migrate default data to my backend? E.g. I have a permissions table and I have certain base permissions. How can I migrate them? Should I use two different migration tools 🤔
@dreamsofcode
@dreamsofcode 3 ай бұрын
You can add default data into your migrations if you are guaranteed to need it!
@charleschen4093
@charleschen4093 3 ай бұрын
love your sharing!
@EduardKhiaev
@EduardKhiaev 3 ай бұрын
I really would like to see your tech stack and the reason why you are using certain tools instead of other tools, for example migrate and goose
@VardanPogosyan
@VardanPogosyan 3 ай бұрын
Which browser on 3:55 do you use?
@NarantsatsraltGanchuluun
@NarantsatsraltGanchuluun 2 ай бұрын
Hi, what is the theme you are using?
@MehrshadGolesorkhi
@MehrshadGolesorkhi Ай бұрын
Does it have a plugin to convert from/to proto models? or use proto models instead of generating its own models?
@dotcom1517
@dotcom1517 2 ай бұрын
Can anyone tell me what theme and font he is using?
@dansouza1623
@dansouza1623 3 ай бұрын
It would be interesting to see how well this plays with instrumentation (opentelemetry). Can sqlc generate instrumented boilerplate?
@tawandagamedevs
@tawandagamedevs 3 ай бұрын
Dreams of code video ❤
@RedPsyched
@RedPsyched 3 ай бұрын
We have the same cursor! All hail the banana cursor 🙇
@johnnydenver-m8r
@johnnydenver-m8r 3 ай бұрын
Every orm allows for raw sql queries which are mostly protected by default.
@iatomic_1
@iatomic_1 2 ай бұрын
how do u handle validation if its setup this way? i don't wanna rewrite the structs just to add the bindings
@dreamsofcode
@dreamsofcode 2 ай бұрын
I usually handle validation above this layer, typically during the http handler.
@SriTejaChilakapati
@SriTejaChilakapati 3 ай бұрын
Hey, great video! However I seem to be facing an issue while overriding types of UUID columns that are a foreign key reference to another table. The primary key field is `uuid.UUID`, but the foreign key field is still `pgtype.UUID`. Any idea where I might be missing something?
@SriTejaChilakapati
@SriTejaChilakapati 3 ай бұрын
Btw I understand that I don't really need foreign keys if everything is a raw query and I can write joins myself, but I'm working with an existing schema here
@dreamsofcode
@dreamsofcode 3 ай бұрын
If you jump on my discord and drop me a message I can take a look! Will need to see what your schema and query look like otherwise. I've managed to get a FK reference to work fine with my join table before.
@litfill54
@litfill54 3 ай бұрын
the banana cursor
@dreamsofcode
@dreamsofcode 3 ай бұрын
Coming soon!
@giorgioripani8469
@giorgioripani8469 3 ай бұрын
How is this better than Spring JPA Repository named queries?
@duongphuhiep
@duongphuhiep 3 ай бұрын
skeptical! not sure if it makes things easier to debug and to maintain
@johnbauer9907
@johnbauer9907 3 ай бұрын
Very well done video... Thanks.
@thestarks685
@thestarks685 3 ай бұрын
Quick question what font and color scheme are you using ?
@deckardcain9012
@deckardcain9012 3 ай бұрын
Does anybody know what the Browser used in the B-Roll is called?
@M3MYS3LF1979
@M3MYS3LF1979 3 ай бұрын
Think some other comments said it was zen browser. Which wildly enough, I hadn't heard of until today when watching the fireship video on the firefox zero day
@CoolestPossibleName
@CoolestPossibleName 3 ай бұрын
Finnally someone mentioned sqlc
@Jafeth636
@Jafeth636 3 ай бұрын
Did I see Zen Browser? LET'S GO!
@bichkhebk
@bichkhebk 3 ай бұрын
How about join query in sqlc
@yash1152
@yash1152 3 ай бұрын
0:03 framework systems for the win yayy!!
@someshkarmakar47
@someshkarmakar47 3 ай бұрын
we would love to know your GO full-stack.. please make a video on it
@anarchymatt
@anarchymatt 29 күн бұрын
Persistent + Esqueleto 😀
@FlaviusAspra
@FlaviusAspra 3 ай бұрын
SQLc sounds great, but it's missing a lot of things. I'm afraid they don't see enough of the picture to empower users to do a clean separation of concerns.
@rign_
@rign_ 3 ай бұрын
I wrote code in Javascript. I usually use Kysely. It's query builder, I don't know if it's considered ORM or not...
@igalklebanov921
@igalklebanov921 3 ай бұрын
not an ORM.. :)
@RJRobinsonX
@RJRobinsonX 3 ай бұрын
Whats the font?
@theyioel
@theyioel 3 ай бұрын
What are your thoughts about SQLx and Turso/libSqlite if they come to the ecuation?
@jonutoftnielsen2655
@jonutoftnielsen2655 2 ай бұрын
Please make a video about your full dev stack.
@JaJDoo
@JaJDoo 3 ай бұрын
just a heads up here, sqlc is real nice and its future looks promising but still has issues with more complex queries and things like dynamic filters make sure you check the kinds of queries you have are possible in sqlc before committing to it
@coolaj86
@coolaj86 3 ай бұрын
Note: ossp-uuid should NOT be used for secure uuidv4 (the implementation details do not guarantee security). Instead gen_random_uuid() (from pgcrypto) should be used. HOWEVER, there are performance issues with all uuidv4 varations, and uuidv7 should be preferred (typically generated by the application on insert, but also available as a postgres function if default values are needed).
@guerra_dos_bichos
@guerra_dos_bichos 3 ай бұрын
But for me the main advantage of writing your own SQL code is being able to use your preferred database specifics , like postgres jsonc etc
@kodedart2311
@kodedart2311 2 ай бұрын
Works amazingly for TODO applications. No thanks.
@bjo004
@bjo004 3 ай бұрын
What about flyway and liquibase?
@herbert9039
@herbert9039 3 ай бұрын
nice video, thanks! subscribed
@nomadtrails
@nomadtrails 3 ай бұрын
100% sold
@djkim24601
@djkim24601 3 ай бұрын
Thank you so much
@PreetimanMisra
@PreetimanMisra 3 ай бұрын
Bananas near anything related to code/coding always remind me of Joy of Code
@abdulrahmanmohamed8298
@abdulrahmanmohamed8298 3 ай бұрын
great vid. SQLc was the first time I learned about SQL code-gen stuffs p.s. does anyone know what is the color theme he's using?
@AK-vx4dy
@AK-vx4dy 3 ай бұрын
select * is generally bad practice but in this case when total control of database is asssumed, i can grant absolution ;)
@Zero-oq1jk
@Zero-oq1jk 3 ай бұрын
What is that keyboard is? I mean, I now what split keyboard is and low profile. I ask for exact model. Because I hunt for one like those.
@dreamsofcode
@dreamsofcode 3 ай бұрын
Should be in the description! It's the ZSA Voyager!
@Zero-oq1jk
@Zero-oq1jk 3 ай бұрын
@@dreamsofcode Oh thanks!
@sitedel
@sitedel 3 ай бұрын
ORM libraries have several advantages over sqlc. It is easier to use a different target (in-memory) database to speed up integration tests. They include several levels of caching to avoid running the same queries at high rates when data is not changing so often. They manage relationships quite well, especially when caching is enabled: data is loaded only when needed. They facilitate the integration of data encryption and decryption with a column based approach. They may include a validation step which prevent storing incoherent data like an off limit value. They can manage the update and validation of database schema, which is useful for A/B deployments where two releases of the same application can coexist for some time before discarding one of them.
@kianyanglee4618
@kianyanglee4618 3 ай бұрын
Any ORM you would recommend?
@sitedel
@sitedel 3 ай бұрын
@@kianyanglee4618 Hibernate is the de-fscto standard and includes all features, Eclipselink is a strong contender too if your main use is to provide REST of Web services to access a database. ORM is considered overkill for mobile applications.
@ankitsanghi
@ankitsanghi 3 ай бұрын
How would database migrations work with this?
@orterves
@orterves 3 ай бұрын
It seems like db migrations are expected by the sdk, I assume the code generation will fail if migrations are added that break the queries
@MrCatgroove
@MrCatgroove 3 ай бұрын
I'm sold on sqlc, but I don't think it's a 1:1 replacement for a repository/storage/db/whatever-layer. If you have pure domain models, you'd want to map to those inside of the db-layer before returning. The same goes if you have many-to-many relationships. It's simply not feasible to do all of that with just sqlc. The same goes for if you have dynamic queries. It's not really supported by sqlc in a good way and you will probably have to use something like strings.Builder allow for such queries,. You would want this code to live next to your other db-code. This approach also avoids macros (mostly) and keeps your queries very simple and straightforward.
@AntonGalitsyn
@AntonGalitsyn 3 ай бұрын
Looks nice, it can save some time. But I personally don't want to use it. 1st reason - I came in Go for simple setup, but now I forced to dive into code generation logic of 3-rd party tool and use yaml config, sql macroses ant etc. I would rather ask chatgpt/claude generate repository methods and provide it Go structs and SQL schemas I made, and keep it as non-generated code. 2nd reason - tests, I usually split storage layer into multiple EntityRepository parts and test them separately against DB in docker container. It's easier to modify code manually than try to find exact config combination needed for code gen tool. 3rd reason - Go structs not always repeat table columns. These "models" generated by sqlc is not models at all, it's more like helper mapping structs for DB driver. Models, if we use this term in paradigm of clean code, should be free of `db`, `json` tags and don''t have sql field types because this is abstraction leak. If we use pgx, we may have case when you need pgxtype fields for proper mapping, but it's not often. In many cases you can reuse your app level models with small addition of private (storage level) structs for mapping to specific type. Sqlc rely on generated models, not on models defined on app level by developer.
@tkg__
@tkg__ 3 ай бұрын
Go is and always was very heavily leaning into code generation. So it's not really out of its idiomatic approach. I'd prefer to configure it in Go rather than a YAML file, but that's all.
@kodedart2311
@kodedart2311 2 ай бұрын
Slam dunk
@dougsaylor6442
@dougsaylor6442 Ай бұрын
@@AntonGalitsyn so you'd rather generate code to avoid generating code?
@dewigesrek5651
@dewigesrek5651 3 ай бұрын
after seeing the docs, i’d rather create my own
@dewigesrek5651
@dewigesrek5651 3 ай бұрын
but again, this is my case not urs
@Fran-kc2gu
@Fran-kc2gu 3 ай бұрын
waiting for your github repo link :)
@stephensumpter5311
@stephensumpter5311 3 ай бұрын
Gave this a try just for funsies - overrides don't seem to actually work lol
@Sunpy_Emily
@Sunpy_Emily 3 ай бұрын
I can't focus on the video with the sound effect that is used on almost every zoom and underline edit.
@JohanStrandOne
@JohanStrandOne 3 ай бұрын
ok you win You got me curious. What's your go dev stack?
@LongLiveEmrys
@LongLiveEmrys 3 ай бұрын
FYI the plugins for other languages are missing features and most of them don't appear to be active. I don't think you could feasibly use this tool for anything other than Go, unfortunately.
@cg219
@cg219 3 ай бұрын
What browser are you using?? 🤔
@tkg__
@tkg__ 3 ай бұрын
Zen Browser, a Firefox fork.
@aunjaffery31
@aunjaffery31 3 ай бұрын
The real project will always have multiple joins between tables. how well can SQLC handle these, and map the nested data to struct. you just created a beginner 'hello world' project. go-jet/jet handle these complex data very well...
@dreamsofcode
@dreamsofcode 3 ай бұрын
I showed this in the video my guy...
@aunjaffery31
@aunjaffery31 3 ай бұрын
@@dreamsofcode Sorry for misunderstanding. I meant, to produce nested struct. Suppose a user --[hasmany]--products--[hasmany]--images. User struct should have nested product [slice of struct] and each product slice should have nested image slice.
@dejanduh2645
@dejanduh2645 3 ай бұрын
Do you have any golang projects that use the repository pattern? Not just a tutorial, a relatively mid size
@dreamsofcode
@dreamsofcode 3 ай бұрын
My guestbook project uses it! Although it's a very small project!
@AK-vx4dy
@AK-vx4dy 3 ай бұрын
"Strong raction" epic ;)
How Slow Is JavaScript? | Prime Reacts
15:34
ThePrimeTime
Рет қаралды 187 М.
Setting up a production ready VPS is a lot easier than I thought.
29:50
요즘유행 찍는법
0:34
오마이비키 OMV
Рет қаралды 12 МЛН
24 Часа в БОУЛИНГЕ !
27:03
A4
Рет қаралды 7 МЛН
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
10 things I learnt in 2024 to increase my developer productivity.
18:46
DONT USE AN ORM | Prime Reacts
25:46
ThePrimeTime
Рет қаралды 249 М.
Валентин Хомутенко / «что не так с ORM в Go»
32:29
Inside the V3 Nazi Super Gun
19:52
Blue Paw Print
Рет қаралды 2,8 МЛН
This weird keyboard technique has improved the way I type.
17:04
Dreams of Code
Рет қаралды 75 М.
The standard library now has all you need for advanced routing in Go.
13:52
The Secret Language Scaling WhatsApp and Discord
28:32
Theo - t3․gg
Рет қаралды 190 М.
I loaded 100,000,000 rows into MySQL (fast)
18:27
PlanetScale
Рет қаралды 181 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,3 МЛН
요즘유행 찍는법
0:34
오마이비키 OMV
Рет қаралды 12 МЛН