`bd create --file plan.md` had two implementations of one bulk create. The
direct route built types.Issue values in cmd/bd/markdown.go and handed them to
store.CreateIssues; the proxied route parsed the same templates again, opened a
unit of work, read a create context, checked the types itself and looped the
domain use case. Both now build ONE issueops.CreateBatchRequest from one shared
projection, and the difference between the two routes is which accessor answers.
THE ROLE. A batch's REQUEST is its transaction boundary, which is the same
reason BatchCloser exists and cannot be a loop over Lifecycle.Close: N creates
one call at a time are N transactions and N history entries, and the caller who
wants them to land together has no way to say so. It is its own role rather than
a Create overload because it is ALL OR NOTHING where the batch close keeps its
survivors, and one method cannot make both promises. The difference is what has
already happened: a close records work that is done, so a rollback destroys
information the batch was carrying; a create makes the work, so a refused item
leaves no survivors, and half a created plan cannot be re-run without
duplicating the half that landed.
It is born with Provenance, which CreateRequest does not have. Both --file
routes have always written `bd: create N issue(s) from <path>`, and a label
composed from the result cannot spell a file the result does not carry, so
without the field this commit would have caused the regression Q16 recorded
rather than inherited it.
USER-VISIBLE, and bigger than the bead described. The bead and the Q11 batch say
direct --file is non-atomic today - "a bad row can leave earlier rows created".
Reading the path does not support it: markdown.go built every issue first and
made ONE store.CreateIssues call, which both stores run in a single SQL
transaction. What was true is worse, and is recorded as Q25/Q26 in
AMBIGUITIES.md with A-bcr-2:
- a dependency naming an id that does not exist was SILENTLY DROPPED on the
direct route (the batch engine skips a dangling edge and nothing passed
OnSkippedDependency), while the proxied route already failed on it. Every
requested edge is now written or the batch refuses. An `external:` target
and an id belonging to another repository are still written, exactly as
`bd dep add` accepts them.
- --ephemeral, --no-history, --mol-type and --validate were accepted and
IGNORED on the direct route while the proxied route acted on all four, so
`--file --ephemeral` created durable issues locally and wisps on a team
server. All four now mean what they mean everywhere else, templates are
linted on both routes, and created_by/owner are set as the single-issue
create sets them.
- --file --json emits the stored post-create rows on both routes. Additive.
- proxied --file loses its config.yaml fallback for types.custom, the
convergence Q17 already recorded for single-issue create.
--graph is untouched, per Q10: an upsert over a declared shape is a different
contract and gets its own role when it gets one.
CONFORMANCE. backend/conformance/batch_creator_contract.go holds nine cases,
each citing the leaf doc by line, run at all three implementations with ZERO
parks: 27 subtests green. They are TWO independent bodies plus an engine check,
not three - dolt and embeddeddolt share issueops.ExecuteCreateBatch, which
prepares every item and hands the slice to one CreateIssuesInTxWithResult, while
the unit-of-work body creates item by item through the domain use case and keeps
"all or nothing" by returning early and letting the transaction roll back. That
is also why no case asks for a FORWARD reference inside a batch: the store body
could resolve one and the uow body provably cannot, so the role promises only an
edge onto an EARLIER item and the contract says so at the case site (A-bcr-4).
The store-backed body is an InTx function rather than an internal/workapi/store
package, the documented variant EdgeReader introduced: it must assign every id
before any row is written so an item's edge can name a sibling, which cannot be
expressed above storage.DoltStorage. It needs no depguard entry for the same
reason - the shared function takes a transaction, so no front door can call it.
HTTP. POST /v0/beads/issues:batchCreate is new canonical surface, spec written
first and the types generated from it. It is a collection-level custom method
spelled the way ready:count is, which leaves POST /v0/beads/issues free for the
single create that belongs there; it does not collide with the claim row's wide
POST wildcard, because that pattern requires the separating slash
(TestBatchCreateDoesNotShadowTheClaimRoute drives both). BatchCreateResponse
carries no allOf, so the oapi-codegen v2.6.0 pin-dropping trap does not apply,
and its Items are pinned to []types.Issue in pinning.go.
The wire publishes no `id` member, which is what keeps the role's
ErrAlreadyExists off a vocabulary that has no already_exists code (A-bcr-5): the
server assigns every id and `bd import` remains the upsert surface. The role's
ErrValidation is answered by the operation's own failure path rather than by
ClassifyError, because the dangling-edge refusal wraps BOTH ErrValidation and
ErrNotFound and the shared classifier reaches ErrNotFound first - a 404 for a
request that addressed no resource. Neither branch quotes the role's message: a
refused edge arrives as a driver error naming tables and constraints, and 4xx
details here reflect the caller's input.
httpapi.Config's roles source grows to eight roles. The half-set cases that
built a Config by hand now go through rolesConfig, so the next role does not
have to edit six literals that are not about the role set.
Verified: build, vet, gofmt clean; golangci-lint 0 issues; make api-check clean;
TestBatchCreatorContract green at dolt (9/9), embeddeddolt (9/9) and uow (9/9);
./internal/httpapi green including eleven new batch-create tests; TestCorpusGolden
green (the corpus has no --file capture); TestCreateFromMarkdownFile green; the
cmd/bd create suites green with BEADS_TEST_EMBEDDED_DOLT=1 and the proxied
integration create suites green with BEADS_TEST_PROXIED_SERVER=1;
TestProxiedLookup green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
404 lines
16 KiB
Go
404 lines
16 KiB
Go
package httpapi
|
|
|
|
import (
|
|
"encoding/json"
|
|
"errors"
|
|
"fmt"
|
|
"net/http"
|
|
"slices"
|
|
"strings"
|
|
|
|
"github.com/steveyegge/beads/internal/httpapi/apigen"
|
|
"github.com/steveyegge/beads/internal/storage"
|
|
"github.com/steveyegge/beads/internal/types"
|
|
"github.com/steveyegge/beads/issueops"
|
|
)
|
|
|
|
const (
|
|
// maxBatchCreateItems is the document's cap on `items`. It bounds how long
|
|
// one request may hold a write transaction — not batch semantics, which
|
|
// have no size in them.
|
|
maxBatchCreateItems = 100
|
|
// maxBatchCreateBodyBytes bounds the request body. A hundred items each
|
|
// carrying a description, a design and acceptance criteria is the shape
|
|
// this has to admit, so it is generous where the claim's is not; it exists
|
|
// to refuse the absurd before any of it is parsed.
|
|
maxBatchCreateBodyBytes = 4 << 20
|
|
)
|
|
|
|
// batchCreateMembers is the document's member list at each level. The schemas
|
|
// are additionalProperties: false, so anything else is refused BY NAME — which
|
|
// is the whole reason these are decoded as raw members first: encoding/json's
|
|
// DisallowUnknownFields reports the offender only inside an error string, and
|
|
// this surface exists to let clients stop parsing prose.
|
|
var (
|
|
batchCreateRequestMembers = []string{"actor", "items"}
|
|
batchCreateItemMembers = []string{"title", "description", "design", "acceptance_criteria", "priority", "issue_type", "assignee", "labels", "dependencies"}
|
|
batchCreateDependencyMembers = []string{"target_id", "type"}
|
|
)
|
|
|
|
// handleBatchCreate creates every issue in the request body, or none of them.
|
|
//
|
|
// WHAT IS NOT HERE is the point. Which rows land together, what an edge onto an
|
|
// absent target does, the create-only guard, the workspace's type and status
|
|
// vocabulary, the id assignment, the wisp routing, the transaction retry and the
|
|
// history entry all belong to issueops.BatchCreator, reached through the
|
|
// provider's own accessor. This function decodes a body, refuses the shapes the
|
|
// document refuses, and marshals what came back.
|
|
//
|
|
// It shares the claim's posture exactly: the actor is caller-ASSERTED
|
|
// provenance and not authenticated identity, hooks do not fire, and the
|
|
// per-command auto-commit machinery never runs. The only durable effect is the
|
|
// single storage commit the role makes inside its own transaction.
|
|
func (s *Server) handleBatchCreate(w http.ResponseWriter, r *http.Request) {
|
|
if !s.requireNoQuery(w, r) {
|
|
return
|
|
}
|
|
if !s.requireJSONContent(w, r) {
|
|
return
|
|
}
|
|
request, ok := s.batchCreateRequest(w, r)
|
|
if !ok {
|
|
return
|
|
}
|
|
|
|
creator, err := s.batchCreator(r)
|
|
if err != nil {
|
|
s.failBatchCreate(w, r, err)
|
|
return
|
|
}
|
|
result, err := creator.CreateBatch(r.Context(), request)
|
|
if err != nil {
|
|
s.failBatchCreate(w, r, err)
|
|
return
|
|
}
|
|
items := make([]types.Issue, len(result.Issues))
|
|
for i, issue := range result.Issues {
|
|
items[i] = *issue
|
|
}
|
|
writeJSON(w, apigen.BatchCreateResponse{Items: items})
|
|
}
|
|
|
|
// batchCreateRequest decodes and validates the body, and reports whether the
|
|
// request may proceed.
|
|
//
|
|
// Every refusal here happens BEFORE any database work, which is what lets the
|
|
// 400s be specific: they reflect the caller's own input back. The role's own
|
|
// refusals cannot be that specific without quoting a storage error into a
|
|
// response, so failBatchCreate answers those in the server's own words.
|
|
func (s *Server) batchCreateRequest(w http.ResponseWriter, r *http.Request) (issueops.CreateBatchRequest, bool) {
|
|
members, res := decodeJSONObject(w, r, maxBatchCreateBodyBytes)
|
|
if res != nil {
|
|
s.fail(w, r, *res)
|
|
return issueops.CreateBatchRequest{}, false
|
|
}
|
|
if offender, unknown := unknownMember(members, batchCreateRequestMembers); unknown {
|
|
s.failUnknownMember(w, r, offender, batchCreateRequestMembers)
|
|
return issueops.CreateBatchRequest{}, false
|
|
}
|
|
|
|
actor, ok := s.batchCreateActor(w, r, members)
|
|
if !ok {
|
|
return issueops.CreateBatchRequest{}, false
|
|
}
|
|
items, ok := s.batchCreateItems(w, r, members)
|
|
if !ok {
|
|
return issueops.CreateBatchRequest{}, false
|
|
}
|
|
return issueops.CreateBatchRequest{Actor: actor, Items: items}, true
|
|
}
|
|
|
|
// batchCreateActor validates `actor` under the claim's rules, which the
|
|
// document says are the same rules and which are shared here rather than
|
|
// restated: the value lands in the same columns and the same storage commit
|
|
// message, so a newline forges the same audit-trail lines.
|
|
func (s *Server) batchCreateActor(w http.ResponseWriter, r *http.Request, members map[string]json.RawMessage) (string, bool) {
|
|
raw, ok := members[claimActorMember]
|
|
if !ok {
|
|
s.fail(w, r, InvalidArgument(claimActorMember, ReasonInvalidValue, "`"+claimActorMember+"` is required"))
|
|
return "", false
|
|
}
|
|
// Through a POINTER so that `null` reaches the type-mismatch branch, for
|
|
// the reason claimActor gives.
|
|
var actor *string
|
|
if err := json.Unmarshal(raw, &actor); err != nil || actor == nil {
|
|
s.fail(w, r, InvalidArgument(claimActorMember, ReasonInvalidValue, "`"+claimActorMember+"` must be a string"))
|
|
return "", false
|
|
}
|
|
trimmed, res := validateActor(*actor)
|
|
if res != nil {
|
|
s.fail(w, r, *res)
|
|
return "", false
|
|
}
|
|
return trimmed, true
|
|
}
|
|
|
|
// batchCreateItems validates `items` and projects it onto the role's items.
|
|
func (s *Server) batchCreateItems(w http.ResponseWriter, r *http.Request, members map[string]json.RawMessage) ([]issueops.BatchCreateItem, bool) {
|
|
raw, ok := members["items"]
|
|
if !ok {
|
|
s.fail(w, r, InvalidArgument("items", ReasonInvalidValue, "`items` is required"))
|
|
return nil, false
|
|
}
|
|
var rawItems []map[string]json.RawMessage
|
|
if err := json.Unmarshal(raw, &rawItems); err != nil || rawItems == nil {
|
|
s.fail(w, r, InvalidArgument("items", ReasonInvalidValue, "`items` must be an array of objects"))
|
|
return nil, false
|
|
}
|
|
switch {
|
|
case len(rawItems) == 0:
|
|
s.fail(w, r, InvalidArgument("items", ReasonInvalidValue,
|
|
"`items` must carry at least one issue; a create that creates nothing is refused rather than answered"))
|
|
return nil, false
|
|
case len(rawItems) > maxBatchCreateItems:
|
|
s.fail(w, r, InvalidArgument("items", ReasonInvalidValue,
|
|
fmt.Sprintf("`items` carries %d issues; the limit is %d per request", len(rawItems), maxBatchCreateItems)))
|
|
return nil, false
|
|
}
|
|
|
|
items := make([]issueops.BatchCreateItem, 0, len(rawItems))
|
|
for i, rawItem := range rawItems {
|
|
if rawItem == nil {
|
|
s.fail(w, r, InvalidArgument(batchCreateItemParam(i, ""), ReasonInvalidValue, "an item must be a JSON object"))
|
|
return nil, false
|
|
}
|
|
if offender, unknown := unknownMember(rawItem, batchCreateItemMembers); unknown {
|
|
s.failUnknownMember(w, r, batchCreateItemParam(i, offender), batchCreateItemMembers)
|
|
return nil, false
|
|
}
|
|
item, res := batchCreateItem(i, rawItem)
|
|
if res != nil {
|
|
s.fail(w, r, *res)
|
|
return nil, false
|
|
}
|
|
items = append(items, item)
|
|
}
|
|
return items, true
|
|
}
|
|
|
|
// batchCreateItem projects one decoded item onto the role's item, or reports
|
|
// the refusal it earned.
|
|
//
|
|
// It decodes into the GENERATED struct, which is what makes a member's type the
|
|
// document's type: `priority: "high"` is refused here rather than reaching a
|
|
// role that would have to guess what the caller meant.
|
|
func batchCreateItem(index int, raw map[string]json.RawMessage) (issueops.BatchCreateItem, *Result) {
|
|
refuse := func(member, detail string) *Result {
|
|
res := InvalidArgument(batchCreateItemParam(index, member), ReasonInvalidValue, detail)
|
|
return &res
|
|
}
|
|
encoded, err := json.Marshal(raw)
|
|
if err != nil {
|
|
return issueops.BatchCreateItem{}, refuse("", "an item must be a JSON object")
|
|
}
|
|
var wire apigen.BatchCreateItem
|
|
if err := json.Unmarshal(encoded, &wire); err != nil {
|
|
return issueops.BatchCreateItem{}, refuse("", "an item member carries the wrong JSON type")
|
|
}
|
|
if strings.TrimSpace(wire.Title) == "" {
|
|
return issueops.BatchCreateItem{}, refuse("title", "`title` is required and must not be blank")
|
|
}
|
|
if types.CheckFieldLen("title", wire.Title) != nil {
|
|
return issueops.BatchCreateItem{}, refuse("title",
|
|
fmt.Sprintf("`title` is longer than the %d characters storage holds", types.MaxFieldLen))
|
|
}
|
|
// The role validates the type against the workspace's configured
|
|
// vocabulary, which this server cannot read without a transaction. What is
|
|
// checked here is only what the schema declares: a value at all, and one
|
|
// short enough for the column.
|
|
//
|
|
// A SLICE and not a map, so that an item breaking both rules always names
|
|
// the same offender: `param` is what a client dispatches on, and it must
|
|
// not depend on map order.
|
|
for _, bounded := range []struct {
|
|
member string
|
|
value *string
|
|
}{{"assignee", wire.Assignee}, {"issue_type", wire.IssueType}} {
|
|
if bounded.value != nil && types.CheckFieldLen(bounded.member, *bounded.value) != nil {
|
|
return issueops.BatchCreateItem{}, refuse(bounded.member,
|
|
fmt.Sprintf("`%s` is longer than the %d characters storage holds", bounded.member, types.MaxFieldLen))
|
|
}
|
|
}
|
|
issue := &types.Issue{
|
|
Title: wire.Title,
|
|
Description: derefString(wire.Description),
|
|
Design: derefString(wire.Design),
|
|
AcceptanceCriteria: derefString(wire.AcceptanceCriteria),
|
|
Status: types.StatusOpen,
|
|
Assignee: derefString(wire.Assignee),
|
|
IssueType: types.IssueType(derefString(wire.IssueType)),
|
|
}
|
|
if wire.Priority != nil {
|
|
if *wire.Priority < 0 || *wire.Priority > 4 {
|
|
return issueops.BatchCreateItem{}, refuse("priority",
|
|
fmt.Sprintf("`priority` is %d; the range is 0 to 4", *wire.Priority))
|
|
}
|
|
issue.Priority = *wire.Priority
|
|
}
|
|
if wire.Labels != nil {
|
|
for _, label := range *wire.Labels {
|
|
if types.CheckFieldLen("label", label) != nil {
|
|
return issueops.BatchCreateItem{}, refuse("labels",
|
|
fmt.Sprintf("a label is longer than the %d characters storage holds", types.MaxFieldLen))
|
|
}
|
|
}
|
|
issue.Labels = *wire.Labels
|
|
}
|
|
item := issueops.BatchCreateItem{Issue: issue}
|
|
if wire.Dependencies == nil {
|
|
return item, nil
|
|
}
|
|
rawEdges := rawDependencyMembers(raw)
|
|
for j, dependency := range *wire.Dependencies {
|
|
if offender, unknown := unknownMember(rawEdgeAt(rawEdges, j), batchCreateDependencyMembers); unknown {
|
|
res := InvalidArgument(batchCreateItemParam(index, "dependencies."+offender), ReasonUnknownParameter,
|
|
"an edge carries "+strings.Join(batchCreateDependencyMembers, ", ")+" and nothing else")
|
|
return issueops.BatchCreateItem{}, &res
|
|
}
|
|
if dependency.TargetId == "" || types.CheckFieldLen("target_id", dependency.TargetId) != nil {
|
|
return issueops.BatchCreateItem{}, refuse("dependencies.target_id",
|
|
"`target_id` is required and must be at most "+fmt.Sprint(types.MaxFieldLen)+" characters")
|
|
}
|
|
// A value at all, and one the column holds — never membership of a
|
|
// known-types list. The edge vocabulary is OPEN, exactly as
|
|
// EdgeReadRequest.Types says it is, so a workspace's own type passes
|
|
// here and only an unstorable one is refused.
|
|
if !types.DependencyType(dependency.Type).IsValid() {
|
|
return issueops.BatchCreateItem{}, refuse("dependencies.type",
|
|
fmt.Sprintf("`type` must be 1 to %d characters", types.MaxDependencyTypeLen))
|
|
}
|
|
item.Dependencies = append(item.Dependencies, issueops.CreateDependency{
|
|
TargetID: dependency.TargetId,
|
|
Type: types.DependencyType(dependency.Type),
|
|
})
|
|
}
|
|
return item, nil
|
|
}
|
|
|
|
// rawDependencyMembers decodes an item's edges as raw members, so an unknown
|
|
// member INSIDE an edge is refused by name like every other one. It answers nil
|
|
// — which carries no unknown member — when the shape is not the one the
|
|
// generated decode already accepted, because a disagreement between the two
|
|
// decodes is not a client-attributable refusal.
|
|
func rawDependencyMembers(item map[string]json.RawMessage) []map[string]json.RawMessage {
|
|
raw, ok := item["dependencies"]
|
|
if !ok {
|
|
return nil
|
|
}
|
|
var edges []map[string]json.RawMessage
|
|
if err := json.Unmarshal(raw, &edges); err != nil {
|
|
return nil
|
|
}
|
|
return edges
|
|
}
|
|
|
|
// rawEdgeAt is the bounds-checked read of one decoded edge.
|
|
func rawEdgeAt(edges []map[string]json.RawMessage, j int) map[string]json.RawMessage {
|
|
if j >= len(edges) {
|
|
return nil
|
|
}
|
|
return edges[j]
|
|
}
|
|
|
|
// batchCreateItemParam spells the `param` member for a refusal inside `items`,
|
|
// so a client dispatching on it learns WHICH item and WHICH member without
|
|
// reading the detail.
|
|
func batchCreateItemParam(index int, member string) string {
|
|
param := fmt.Sprintf("items[%d]", index)
|
|
if member == "" {
|
|
return param
|
|
}
|
|
return param + "." + member
|
|
}
|
|
|
|
// failUnknownMember answers an unknown body member the way an unknown query
|
|
// parameter is answered: one offender, chosen deterministically, and the
|
|
// allowed set in the detail.
|
|
func (s *Server) failUnknownMember(w http.ResponseWriter, r *http.Request, offender string, allowed []string) {
|
|
requestInfo(r.Context()).refuse(offender)
|
|
s.fail(w, r, InvalidArgument(offender, ReasonUnknownParameter,
|
|
"this operation's request body carries "+strings.Join(allowed, ", ")+" and nothing else"))
|
|
}
|
|
|
|
// failBatchCreate answers a failed batch.
|
|
//
|
|
// The role's ErrValidation is answered HERE rather than in ClassifyError, and
|
|
// the reason is the same one that makes this operation's 400 worth having: the
|
|
// role wraps its dangling-edge refusal in BOTH ErrValidation and ErrNotFound,
|
|
// so the shared classifier — which reaches ErrNotFound first — would answer 404
|
|
// for a request that addressed no resource at all.
|
|
//
|
|
// NEITHER BRANCH QUOTES THE ROLE'S MESSAGE. A refused edge arrives as a driver
|
|
// error naming tables and constraints, and 4xx details on this surface reflect
|
|
// the caller's own input back rather than server internals. The two sentences
|
|
// below say exactly what the client can act on, and the real error goes to the
|
|
// log with the request id, which is where the rest of it belongs.
|
|
func (s *Server) failBatchCreate(w http.ResponseWriter, r *http.Request, err error) {
|
|
if !errors.Is(err, storage.ErrValidation) {
|
|
s.failErr(w, r, err)
|
|
return
|
|
}
|
|
// The 4xx path does not log by default, so this is the one place the real
|
|
// refusal is recorded: without it the operator has a request id and a
|
|
// sentence that deliberately says less than the error did.
|
|
s.event("request_refused", "request_id", requestInfo(r.Context()).id, "error", err.Error())
|
|
if errors.Is(err, storage.ErrNotFound) {
|
|
s.fail(w, r, InvalidArgument("items", ReasonInvalidValue,
|
|
"a dependency target names no issue in this workspace; nothing was created"))
|
|
return
|
|
}
|
|
s.fail(w, r, InvalidArgument("items", ReasonInvalidValue,
|
|
"an item was refused by this workspace's own validation; nothing was created"))
|
|
}
|
|
|
|
// unknownMember reports the smallest member name outside allowed, chosen
|
|
// deterministically so a client dispatching on `param` never sees it depend on
|
|
// map order.
|
|
func unknownMember(members map[string]json.RawMessage, allowed []string) (string, bool) {
|
|
var unknown []string
|
|
for name := range members {
|
|
if !slices.Contains(allowed, name) {
|
|
unknown = append(unknown, name)
|
|
}
|
|
}
|
|
if len(unknown) == 0 {
|
|
return "", false
|
|
}
|
|
return slices.Min(unknown), true
|
|
}
|
|
|
|
// decodeJSONObject reads the body as a JSON object of raw members, bounded by
|
|
// limit. It is decodeClaimBody generalized over the bound, and it makes the
|
|
// same three refusals for the same reasons.
|
|
func decodeJSONObject(w http.ResponseWriter, r *http.Request, limit int64) (map[string]json.RawMessage, *Result) {
|
|
// A body with no nameable part: `param` is documented absent on exactly
|
|
// this case and present on every other 400.
|
|
unparseable := func(detail string) *Result {
|
|
res := InvalidArgument("", ReasonInvalidValue, detail)
|
|
return &res
|
|
}
|
|
var members map[string]json.RawMessage
|
|
dec := json.NewDecoder(http.MaxBytesReader(w, r.Body, limit))
|
|
if err := dec.Decode(&members); err != nil {
|
|
var tooLarge *http.MaxBytesError
|
|
if errors.As(err, &tooLarge) {
|
|
return nil, unparseable(fmt.Sprintf("request body is larger than %d bytes", limit))
|
|
}
|
|
return nil, unparseable("request body must be a JSON object")
|
|
}
|
|
if members == nil {
|
|
// Valid JSON, but `null`: no members to read anything out of.
|
|
return nil, unparseable("request body must be a JSON object")
|
|
}
|
|
if dec.More() {
|
|
return nil, unparseable("request body must be a single JSON object")
|
|
}
|
|
return members, nil
|
|
}
|
|
|
|
func derefString(value *string) string {
|
|
if value == nil {
|
|
return ""
|
|
}
|
|
return *value
|
|
}
|