Add gRPC server implementation and database integration for marketplace and products
This commit is contained in:
28
internal/marketplace/db/query.sql.go
Normal file
28
internal/marketplace/db/query.sql.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.28.0
|
||||
// source: query.sql
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
const getMarketplaceByID = `-- name: GetMarketplaceByID :one
|
||||
SELECT id, base_marketplace, name, auth_data, warehouse_id FROM marketplaces
|
||||
WHERE id = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetMarketplaceByID(ctx context.Context, id int32) (Marketplace, error) {
|
||||
row := q.db.QueryRow(ctx, getMarketplaceByID, id)
|
||||
var i Marketplace
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.BaseMarketplace,
|
||||
&i.Name,
|
||||
&i.AuthData,
|
||||
&i.WarehouseID,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
Reference in New Issue
Block a user