hiling_go/db/sqlc/news_events.sql.go

42 lines
823 B
Go
Raw Permalink Normal View History

2023-10-11 16:31:52 +07:00
// Code generated by sqlc. DO NOT EDIT.
// versions:
2024-08-19 07:40:01 +07:00
// sqlc v1.26.0
2023-10-11 16:31:52 +07:00
// source: news_events.sql
package db
import (
"context"
2024-02-06 11:55:25 +07:00
"github.com/jackc/pgx/v5/pgtype"
2023-10-11 16:31:52 +07:00
)
const createNewsEvents = `-- name: CreateNewsEvents :exec
INSERT INTO news_events(
title,
url,
source,
description,
submitted_by
) VALUES ( $1, $2, $3, $4, $5)
`
type CreateNewsEventsParams struct {
2024-02-06 11:55:25 +07:00
Title string `json:"title"`
Url string `json:"url"`
Source string `json:"source"`
Description pgtype.Text `json:"description"`
SubmittedBy int32 `json:"submitted_by"`
2023-10-11 16:31:52 +07:00
}
func (q *Queries) CreateNewsEvents(ctx context.Context, arg CreateNewsEventsParams) error {
2024-02-06 11:55:25 +07:00
_, err := q.db.Exec(ctx, createNewsEvents,
2023-10-11 16:31:52 +07:00
arg.Title,
arg.Url,
arg.Source,
arg.Description,
arg.SubmittedBy,
)
return err
}