refact!: project structure
This commit is contained in:
parent
fd0ca4411b
commit
db53ae04e3
26 changed files with 971 additions and 6395 deletions
23
sql/queries.sql.go
Normal file
23
sql/queries.sql.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.30.0
|
||||
// source: queries.sql
|
||||
|
||||
package sqlc
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
const getImageByID = `-- name: GetImageByID :one
|
||||
SELECT image_id, storage_type, image_path
|
||||
FROM images
|
||||
WHERE image_id = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetImageByID(ctx context.Context, imageID int32) (Image, error) {
|
||||
row := q.db.QueryRow(ctx, getImageByID, imageID)
|
||||
var i Image
|
||||
err := row.Scan(&i.ImageID, &i.StorageType, &i.ImagePath)
|
||||
return i, err
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue