Questions tagged [sqlboiler]
23 questions
0
votes
0 answers
Getting More than 1 push notification using go lang cron
I am creating GO rest APIs. We are using AWS server.
I want to send push notification to mobile. Then I used
https://pkg.go.dev/github.com/robfig/cron (https://github.com/robfig/cron )
for creating cron job.
We are using 2 version of API, V1(old…

Mia Mia
- 143
- 12
0
votes
1 answer
Golang SQLBoiler append queries dynamically
I'm trying to dynamically run queries against my Postgres database, but can't fully wrap my head around it.
The solution I'm looking for is one where I can set the query dynamically, perhaps by appending parameters to the final query throughout the…

Riverans
- 336
- 1
- 12
0
votes
1 answer
Like operation MYSQL using SQLBoiler and golang
I want to Perform LIKE operation in MYSQL using SQL boiler and golang
I am using
github.com/volatiletech/sqlboiler/v4/queries/qm
.
clause = qm.Where(fmt.Sprintf("post.deleted_at is null"))
queryMods := []qm.QueryMod{
clause,
…

Mia Mia
- 143
- 12
0
votes
1 answer
Data binding in go using sqlBoiler
I am fetching some data from MYSQL database.. Using query data is getting correclty (eg 10 rows)
I want to bind into a list of model for displaying.
But panic error displaying
type UserDetails []UserDetail
type UserDetail struct {
id …

Mia Mia
- 143
- 12
0
votes
0 answers
Golang SQLBoiler converts bit(1) to string instead of bool or int
I am trying to use sqlboiler (using version 4.5.0) to generate my database-models in Golang.
I have a lot of tables with columns of type tinyint(1) or bit(1) which were mapped to booleans in my java spring code.
Now when I generate the sqlboiler…

Juliette
- 966
- 16
- 35
0
votes
1 answer
SQLBoiler select from another table in `AndIn`
I am trying to follow the examples in sqlboiler (https://github.com/volatiletech/sqlboiler). But, I can't find a way to add another table in AndIn clause, since any Where leads to return two values.
users, err := models.Users(
Select("id",…

Coder
- 1,415
- 2
- 23
- 49
0
votes
1 answer
SQLBoiler get table name for Join
I am trying to follow the examples in sqlboiler (https://github.com/volatiletech/sqlboiler). But, I can't find a way to get the table name used in the Inner join query.
users, err := models.Users(
Select("id", "name"),
InnerJoin("credit_cards c…

Coder
- 1,415
- 2
- 23
- 49
-1
votes
1 answer
Fetching data from sqlboiler in golang
I am using sqlboiler and golang
using this code I fetch all details from the database.
userDemo, erro := dbmodels.UserDemographics().All(ctx, m.db)
UserDemographic table contain 2 columns, userId and count
how can I fetch the data the userId=1 from…

Mia Mia
- 143
- 12