// CountryExists checks if the Country row exists.
CountryExists checks if the Country row exists.
// CountryExists checks if the Country row exists .
func CountryExists(ctx context.Context, exec boil.ContextExecutor, countryID int64) (bool, error) {
	var exists bool
	sql := "select exists(select 1 from \"country\" where \"country_id\"=$1 limit 1)"
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, sql)
		fmt.Fprintln(boil.DebugWriter, countryID)
	}
	row := exec.QueryRowContext(ctx, sql, countryID)
	err := row.Scan(&exists)
	if err != nil {
		return false, errors.Wrap(err, "models: unable to check if country exists")
	}
	return exists, nil
}
func CountryExists ( ctx context . Context , exec boil . ContextExecutor , countryID int64 ) ( bool , error ) { var exists bool sql := " \" \" \" \" " if boil . DebugMode { fmt . Fprintln ( boil . DebugWriter , sql ) fmt . Fprintln ( boil . DebugWriter , countryID ) } row := exec . QueryRowContext ( ctx , sql , countryID ) err := row . Scan ( & exists ) if err != nil { return false , errors . Wrap ( err , " " ) } return exists , nil }
CountryExists checks if the Country row exists.
CountryExists checks if the Country row exists .