#gorm — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #gorm, aggregated by home.social.
-
Learn to build a functional web API with Go 1.26, covering RESTful endpoints, database persistence with PostgreSQL and GORM, and testing best practices in under an hour.
#Go programming #Web API #RESTful API #PostgreSQL #GORM
https://dasroot.net/posts/2026/02/build-web-api-go-under-an-hour/
-
A question for the #Golang crowd! I'm building an API for configuring e-mail hosting. I want a simple #REST #API, and I'd like to build a #kubectl like command line client too. Backend will probably be #GORM and #PostgreSQL with a lot of different entities. What would you recommend for keeping the server and client models in sync? I'm thinking some sort of code generation, but I'm unsure about the direction to go in - #OAPI #Codegen or #Swaggo? Annotations in code or a definition in Yaml? Perhaps with the generated models in a separate module for easy sharing between #client and #server? How do the clever people do it? :-)
-
Today we learn that gorm’s
many2manyassociation is (technically) broken if you use it with the embeddedgorm.Modelbecause that creates an artificialidsequence primary key field that obviously doesn’t conflict when you have multiple of the same, e.g.,rolebut settingindex:,uniqueon the field you need to be unique causes insert errors (at least usingsqlite.)(Not hugely traumatic because I don’t need a sequence
idanyway, I just wanted the metadata fields ingorm.Modelwhich can just be copied into my own meta-model.)This post brought to you by 80 minutes of confusion and England being suprisingly not rubbish at cricket.
-
Психанул на неудобный драйвер pgx и написал свою библиотеку. Все как по канонам гошников ) — Golang
После месяцев рутинного сканирования строк в структуры я решил: "Хватит это терпеть!" и психанув, создал обертку, которая: ✔ Автоматизирует скан — никаких rows.Scan(), просто передаете структуру ✔ Работает с любыми вложенностями — даже сложные JSON-поля парсятся без боли ✔ Не тормозит — минимальные накладные расходы, вся мощь pgx сохраняется ✔ Подходит для любого проекта — можно внедрять постепенно 👉 Это не просто библиотека — это мой ответ на боль всех gopher'ов!
https://habr.com/ru/articles/931248/
#go #golang #orm #postgres #postgresql #pgx #gorm #opensource #software #sql
-
pgxWrappy — потому что жизнь слишком коротка для ручного сканирования в Go! �
Если вы устали от бесконечного rows.Scan(), ручного разбора вложенных структур и километрового boilerplate-кода — pgxWrappy создан для вас! 🚀 Делаем неудобное удобным! Жить с удобством
https://habr.com/ru/articles/931242/
#Go #golang #pgx #sql #gorm #orm #postgres #pgsql #database #opensource
-
Как построить оценку качества контакт-центра с помощью Speech Analytics API
Привет, Хабр! Контакт-центры — это важная линия взаимодействия бизнеса с клиентами. Клиенты могут быть разными: кто-то жалуется на задержки, кто-то хочет вернуть товар, а кто-то просто звонит выразить благодарность. Но для бизнеса важно понять одно: насколько хорошо оператор решил проблему клиента? И ушел ли клиент довольным? В этой статье создадим систему для анализа качества работы операторов. Будем извлекать данные о звонках, сохранять их в базе данных и автоматизируем процесс с помощью webhook. В конце концов, контакт-центр — это не только про разговоры, это про цифры.
https://habr.com/ru/companies/exolve/articles/866244/
#kpi_колцентра #оценка_качества #Speech_Analytics_API #sqlite #gorm #webhook #контактцентр #анализ_звонков
-
Version 0.2.11 of my Mishos TV tracking app has been released.
Another small update. I redesigned the main menu to be collapsable with text descriptions. I also redesigned the top header menus a bit.
https://github.com/bljohnsondev/mishos/releases/tag/v0.2.11
#mishos #webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
Как подружить Gorm и PostGIS, решение промышленного уровня
GORM Фантастическая ORM для Golang. PostGIS расширяет возможности реляционной базы данных PostgreSQL , добавляя поддержку хранения, индексирования и запросов геопространственных данных. В этой статье поделимся своим опытом интеграции GORM и PostGIS, сложностями при попытке использования gorm для работы с геометрическими данными и конечно предлагаем готовое решение. Изначально эта статья была опубликована здесь .
-
Version 0.2.10 of my Mishos TV tracking app has been released.
This is a small update. Someone added a good issue asking if there is a way to test the notification URL. Now there is! I added a "Send Test" button that will trigger a notification test.
https://github.com/bljohnsondev/mishos/releases/tag/v0.2.10
#mishos #webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
Version 0.2.9 of my Mishos TV tracking app has been released.
I found an issue where TVMaze added incorrect episodes to a show and then removed them but the local show refresh process didn't pick up the removed episodes.
- Fixed an issue when refreshing show data if the provider removed episodes.
https://github.com/bljohnsondev/mishos/releases/tag/v0.2.9
#mishos #webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
Version 0.2.8 of my Mishos TV tracking app has been released.
- Added multi-user support
- Added user roles for admin and user
- Adding admin functionality for adding, editing and removing usershttps://github.com/bljohnsondev/mishos/releases/tag/v0.2.8
#mishos #webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
Forgot to add hashtags to this Mishos 0.2.7 release post. Adding here! See previous post for release details.
Version 0.2.7 of my Mishos TV tracking app has been released.
https://github.com/bljohnsondev/mishos/releases/tag/v0.2.7
#mishos #webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
Version 0.2.7 of my Mishos TV tracking app has been released.
- Added show completion percentage to show details
- Added unwatched count to the watch list
- Added "Show Spoiler" option to user settings
- Changed episode descriptions to use spoiler style "Show Description" buttonSee release links for full details:
https://github.com/bljohnsondev/mishos/releases/tag/v0.2.7
#mishos #webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
Version 0.2.5 of my Mishos TV tracking app has been released.
Are there a lot of new features in this release? Sorry, no. Is it an important release? I think so!
I've combined the Mishos images into a single image. Previously you had to run a frontend and backend image. No more!
A single image also means less configuration.
https://github.com/bljohnsondev/mishos/releases/tag/v0.2.5
#mishos #webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
Version 0.2.3 of my Mishos TV app has been released.
I've added an export utility to get your TV watching data out in a JSON format. I've also added an "Ended" badge on the shows page so you know which of your shows have ended.
For full release details see the following:
https://github.com/bljohnsondev/mishos/releases/tag/v0.2.3
#webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
Another update of my Mishos self hosted web app for tracking TV shows!
I've ripped out the NestJS backend and it's been rewritten in Go with Gin/Gorm. There has been a major performance increase with this rewrite. Marking previous watched episodes for long running shows has gone from taking minutes down to milliseconds.
https://github.com/bljohnsondev/mishos
#webdev #selfhosted #selfhosting #foss #html #css #javascript #lit #webcomponents #golang #gin #gorm
-
A strange error in #golang #gorm
I am connecting to a postgresql hosted on a server.
When I use
`DB, err := gorm.Open(postgres.Open(Config.DBUrl), &gorm.Config{})`
I get an error saying " password authentication failed"
But when I hard code the values
`DB, err := gorm.Open(postgres.Open("user=s password=p host=h dbname=d"), &gorm.Config{})`
it works.
Any clue how to solve this?
-
Object-Relational Mapping (ORM) в Golang
Одна из самых важных задач ЯП`s это эффективное взаимодействие с базами данных и Go не исключение. В Go есть парадигма Object-Relational Mapping (ORM), позволяет работать с реляционными базами данных в терминах объектно-ориентированного программирования. Это очень сильно упрощает работу с базами данных, позволяя сосредоточиться на бизнес-логике приложения, а не на нюансах SQL-запросов. GORM (Go Object-Relational Mapping) предоставляет удобный интерфейс для взаимодействия с различными базами данных, сохраняя при этом идиоматичность и фичу конкуретности в Go.
-
@gozes @kassner Gorm’s best methods are db.Raw().Scan() and db.Exec()
For new projects please use sqlx it is able to clump arrays for example when using (“… IN ?”, arr) Instead of (“… IN (?, ?)”, arr[0], arr[1])
-
@jakehamilton @geekgonecrazy Implicitly setting variables is something I do as well and where necessary using make (looking at you #gorm ) after you realize that arrays & slices can be nil without a pointer, var is almost a bug in the making
-
-
@garritfra #golang ( #gin + #gorm + #gohtml ) is worth a look is you need a MPA
-
Was der Langzeittest gibt, wird man sehen.
Mein Hacker-❤️ habe ich natürlich an #GNUstep verloren: Die super durchdachte und offene API (#OpenStep), .apps/Bundles, sinnvolle Integrationen, Objective C und #Gorm (http://www.aiei.ch/gnustep/), Spalten-Filemanager mit #GWorkspace.
Aber ich muss ja auch noch arbeiten… 😉
#FLOSS #desktop