// Code generated by BobGen sqlite v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.

package factory

import (
	"strconv"
	"strings"

	"github.com/jaswdr/faker/v2"
)

var defaultFaker = faker.New()

func random___byte(f *faker.Faker, limits ...string) []byte {
	if f == nil {
		f = &defaultFaker
	}

	return []byte(random_string(f, limits...))
}

func random_bool(f *faker.Faker, limits ...string) bool {
	if f == nil {
		f = &defaultFaker
	}

	return f.Bool()
}

func random_int64(f *faker.Faker, limits ...string) int64 {
	if f == nil {
		f = &defaultFaker
	}

	return f.Int64()
}

func random_string(f *faker.Faker, limits ...string) string {
	if f == nil {
		f = &defaultFaker
	}

	val := strings.Join(f.Lorem().Words(f.IntBetween(1, 5)), " ")
	if len(limits) == 0 {
		return val
	}
	limitInt, _ := strconv.Atoi(limits[0])
	if limitInt > 0 && limitInt < len(val) {
		val = val[:limitInt]
	}
	return val
}
