hiling_go/db/sqlc/news_events.sql.go
2023-10-11 16:31:52 +07:00

41 lines
826 B
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.20.0
// source: news_events.sql
package db
import (
"context"
"database/sql"
)
const createNewsEvents = `-- name: CreateNewsEvents :exec
INSERT INTO news_events(
title,
url,
source,
description,
submitted_by
) VALUES ( $1, $2, $3, $4, $5)
`
type CreateNewsEventsParams struct {
Title string `json:"title"`
Url string `json:"url"`
Source string `json:"source"`
Description sql.NullString `json:"description"`
SubmittedBy int32 `json:"submitted_by"`
}
func (q *Queries) CreateNewsEvents(ctx context.Context, arg CreateNewsEventsParams) error {
_, err := q.db.ExecContext(ctx, createNewsEvents,
arg.Title,
arg.Url,
arg.Source,
arg.Description,
arg.SubmittedBy,
)
return err
}