// 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, auth_data_json, campaign_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,
		&i.AuthDataJson,
		&i.CampaignID,
	)
	return i, err
}
