feat: update template
This commit is contained in:
48
internal/db/sqlc/file_image_metadata.sql.go
Normal file
48
internal/db/sqlc/file_image_metadata.sql.go
Normal file
@@ -0,0 +1,48 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.31.1
|
||||
// source: file_image_metadata.sql
|
||||
|
||||
package sqlc
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type CopyFileImageMetadataParams struct {
|
||||
FileID int32 `json:"file_id"`
|
||||
Width int32 `json:"width"`
|
||||
Height int32 `json:"height"`
|
||||
Format string `json:"format"`
|
||||
}
|
||||
|
||||
const createFileImageMetadata = `-- name: CreateFileImageMetadata :exec
|
||||
INSERT INTO file_image_metadata(file_id, width, height, format)
|
||||
VALUES ($1, $2, $3, $4)
|
||||
`
|
||||
|
||||
type CreateFileImageMetadataParams struct {
|
||||
FileID int32 `json:"file_id"`
|
||||
Width int32 `json:"width"`
|
||||
Height int32 `json:"height"`
|
||||
Format string `json:"format"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateFileImageMetadata(ctx context.Context, arg CreateFileImageMetadataParams) error {
|
||||
_, err := q.db.Exec(ctx, createFileImageMetadata,
|
||||
arg.FileID,
|
||||
arg.Width,
|
||||
arg.Height,
|
||||
arg.Format,
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
const truncateFileImageMetadata = `-- name: TruncateFileImageMetadata :exec
|
||||
TRUNCATE TABLE file_image_metadata
|
||||
`
|
||||
|
||||
func (q *Queries) TruncateFileImageMetadata(ctx context.Context) error {
|
||||
_, err := q.db.Exec(ctx, truncateFileImageMetadata)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user