proc.update
0.000005

Updates a stored proc.

Arguments
namerequired
The name of the stored proc to update.
procrequired
The proc composition to store.
Return Value
true if the proc was updated, otherwise false.
something went wrong :(
Updating a stored proc
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.proc.create.call(name: "fa505241") {
  client.type.string.truncate(length: 5)
}

client.proc.update.call(name: "fa505241") {
  client.type.string.truncate(length: 3)
}
client.proc.create.call(undefined, fa505241, () => {
  return client.type.string.truncate(undefined, {length: 5});
});

client.proc.update.call(undefined, fa505241, () => {
  return client.type.string.truncate(undefined, {length: 3});
});
curl "https://proc.run/proc/create?name=fa505241" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/vnd.proc+json" \
--header "accept: text/plain" \
--data '[["$$", "proc", ["{}", ["()", "type.string.truncate", ["$$", "length", ["%%", 5]]]]]]'

curl "https://proc.run/proc/update?name=fa505241" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/vnd.proc+json" \
--header "accept: text/plain" \
--data '[["$$", "proc", ["{}", ["()", "type.string.truncate", ["$$", "length", ["%%", 3]]]]]]'
 

true


Stuck? Want to chat about an idea? Join the community on Discord.