Creating a Go API using an ORM - Tutorial

preview_player
Показать описание

● SUBSCRIBE to see more of my Videos & hit that LIKE button to support the channel!

Hi Everyone, In this tutorial, we'll be creating a simple REST API that interfaces with a sqlite3 database using an ORM.

‎--------------

🎥 Recording Setup

Рекомендации по теме
Комментарии
Автор

Hey - cool video! Just a small note - you should just be opening your database once in your program, not every single time a method gets called. Once you've connected to the database in the InitialMigration method, you can use the same global db reference in other methods. Put the single defer close call in the same method as your HTTP router so that the database remains open as long as the web server is running.

farazfazli
Автор

I've honestly been pretty "ORM is for people who can't be bothered to learn SQL" but damn is that a lot faster on projects where you don't need finely tuned SQL wizardry.

Definitely going to be investing some time into GORM. Great tut! Thanks.

_JS
Автор

Will have to say, this tutorial is really clear and to the point. I love it!

aryanshmahato
Автор

Hey, just dropping in to say great job with this video! There are some things, as Rafael mentioned, but I totally understand why you wanted to be explicit and make things really simple. Kudos, and keep it up!

JosipCodes
Автор

15:00: In order to see data in postman you can insert some dummy data like this one : " insert into users values(1, time('now'), null, null, "foo", "foo mail"), (2, time('now'), null, null, "bar", "bar mail");
"
after typing sqlite3 test.db

rabhisalim
Автор

very good. Learning quickly with you!
I am brazilian!

antonioguilherme
Автор

Great tutorial. But if you are using Windows you can't use 'go run *.go'. With Windows you should use 'go build && go-orm-tutorial.exe' (Change 'go-orm-tutorial' for your folder)

letslearnabout
Автор

Things that I still confused: How do I organize Table Model, DAO, and other logic into separate .go files and directory? Is that possible? Thanks!

KangJangkrik
Автор

which is the golang best ide ..I need to learn this language.please suggest

shubhamrade
Автор

Another great video! I'm learning go, your channel has helped a lot.

abubelal
Автор

Hello, sorry it's maybe late.
But why do you declare a global Var err ?
Why dont keep it in local scope ?

pmartin
Автор

Thanks for this video. very nice explanation

achantas
Автор

HI, great job on the video :) . the explanation is very clear and easy to understand.

igniz
Автор

How can I get the current schema from gorm? Normally it is "SHOW search_path" and is an exec. Same with setting the current search_path normally "set search_path to newschema"

donaldfrench
Автор

Thanks for this great tutorial. Love your accent!

kamrannazir
Автор

Where did you define the SQLite table? I see the definition when is open the table in SQLite but didn't see where it was defined in this tutorial.

champfisk
Автор

Thank You, this tutorial was awesome. :)

kristofmarsi
Автор

ORM = object relational mapper (nitpick: you said managers)

abslol
Автор

HI, great job!!! how create Longtext in sqlite if i want save big text data to database ?

naeimwtg
Автор

That triggers me all the noises of your keyboard and your breathing, but the content is good.

ricardoferreirasoares
visit shbcf.ru