// Code generated by FTL. DO NOT EDIT.
package mysql

import (
	"context"
	ftldb "ftl/mysql/db"
	"github.com/block/ftl/common/reflection"
	"github.com/block/ftl/go-runtime/ftl"
	"github.com/block/ftl/go-runtime/server"
)

type FixtureClient func(context.Context) error

type InsertClient func(context.Context, InsertRequest) (InsertResponse, error)

type QueryClient func(context.Context) ([]string, error)

//ftl:database mysql testdb
type TestdbConfig struct{}

type TestdbHandle = ftl.DatabaseHandle[TestdbConfig]

func init() {
	reflection.Register(
		reflection.Database[TestdbConfig]("testdb", server.InitMySQL),

		reflection.ProvideResourcesForVerb(
			Fixture,
			server.SinkClient[ftldb.CreateRequestClient, ftl.Option[string]](),
			server.SourceClient[ftldb.GetRequestDataClient, []ftl.Option[string]](),
		),

		reflection.ProvideResourcesForVerb(
			Insert,
			server.SinkClient[ftldb.CreateRequestClient, ftl.Option[string]](),
		),

		reflection.ProvideResourcesForVerb(
			Query,
			server.SourceClient[ftldb.GetRequestDataClient, []ftl.Option[string]](),
		),
	)
}
