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

import (
    "context"
    "github.com/alecthomas/types/tuple"
    "github.com/block/ftl/common/reflection"
    "github.com/block/ftl/go-runtime/ftl"
    "github.com/block/ftl/go-runtime/server"
    stdtime "time"
)

type FindByDataAndIdsQuery struct {
  	DataValues []string
  	Ids []int
}
type InsertTestTypesQuery struct {
  	IntVal int
  	FloatVal float64
  	TextVal string
  	BoolVal bool
  	TimeVal stdtime.Time
  	OptionalVal ftl.Option[string]
}
type RequestRow struct {
  	Id int
  	Data string
  	CreatedAt stdtime.Time
}
type TestTypeRow struct {
  	Id int
  	IntVal int
  	FloatVal float64
  	TextVal string
  	BoolVal bool
  	TimeVal stdtime.Time
  	OptionalVal ftl.Option[string]
}
	
type CreateRequestClient func(context.Context, string) error
	
type FindByDataAndIdsClient func(context.Context, FindByDataAndIdsQuery) ([]RequestRow, error)
	
type FindMultipleClient func(context.Context, []string) ([]RequestRow, error)
	
type GetAllTestTypesClient func(context.Context) ([]TestTypeRow, error)
	
type GetRequestDataClient func(context.Context) ([]string, error)
	
type GetTestTypeClient func(context.Context, int) (TestTypeRow, error)
	
type InsertTestTypesClient func(context.Context, InsertTestTypesQuery) error

func init() {
	reflection.Register(
		server.QuerySink[string]("mysql", "createRequest", reflection.CommandTypeExec, "testdb", "mysql", "INSERT INTO requests (data) VALUES (?)", []string{}, []tuple.Pair[string,string]{}),
		server.Query[FindByDataAndIdsQuery, RequestRow]("mysql", "findByDataAndIds", reflection.CommandTypeMany, "testdb", "mysql", "SELECT id, data, created_at FROM requests WHERE `data` IN (/*SLICE:dataValues*/?) AND `id` IN (/*SLICE:ids*/?)", []string{"DataValues","Ids"}, []tuple.Pair[string,string]{tuple.PairOf("id", "Id"),tuple.PairOf("data", "Data"),tuple.PairOf("created_at", "CreatedAt")}),
		server.Query[[]string, RequestRow]("mysql", "findMultiple", reflection.CommandTypeMany, "testdb", "mysql", "SELECT id, data, created_at FROM requests WHERE `data` IN (/*SLICE:dataValues*/?)", []string{}, []tuple.Pair[string,string]{tuple.PairOf("id", "Id"),tuple.PairOf("data", "Data"),tuple.PairOf("created_at", "CreatedAt")}),
		server.QuerySource[TestTypeRow]("mysql", "getAllTestTypes", reflection.CommandTypeMany, "testdb", "mysql", "SELECT id, int_val, float_val, text_val, bool_val, time_val, optional_val FROM test_types", []string{}, []tuple.Pair[string,string]{tuple.PairOf("id", "Id"),tuple.PairOf("int_val", "IntVal"),tuple.PairOf("float_val", "FloatVal"),tuple.PairOf("text_val", "TextVal"),tuple.PairOf("bool_val", "BoolVal"),tuple.PairOf("time_val", "TimeVal"),tuple.PairOf("optional_val", "OptionalVal")}),
		server.QuerySource[string]("mysql", "getRequestData", reflection.CommandTypeMany, "testdb", "mysql", "SELECT data FROM requests", []string{}, []tuple.Pair[string,string]{}),
		server.Query[int, TestTypeRow]("mysql", "getTestType", reflection.CommandTypeOne, "testdb", "mysql", "SELECT id, int_val, float_val, text_val, bool_val, time_val, optional_val FROM test_types WHERE id = ?", []string{}, []tuple.Pair[string,string]{tuple.PairOf("id", "Id"),tuple.PairOf("int_val", "IntVal"),tuple.PairOf("float_val", "FloatVal"),tuple.PairOf("text_val", "TextVal"),tuple.PairOf("bool_val", "BoolVal"),tuple.PairOf("time_val", "TimeVal"),tuple.PairOf("optional_val", "OptionalVal")}),
		server.QuerySink[InsertTestTypesQuery]("mysql", "insertTestTypes", reflection.CommandTypeExec, "testdb", "mysql", "INSERT INTO test_types (int_val, float_val, text_val, bool_val, time_val, optional_val) VALUES (?, ?, ?, ?, ?, ?)", []string{"IntVal","FloatVal","TextVal","BoolVal","TimeVal","OptionalVal"}, []tuple.Pair[string,string]{}),
	)
}