proc.update0.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: "b8fba6d3") {
client.type.string.truncate(length: 5)
}
client.proc.update.call(name: "b8fba6d3") {
client.type.string.truncate(length: 3)
}
client.proc.create.call(undefined, b8fba6d3, () => {
return client.type.string.truncate(undefined, {length: 5});
});
client.proc.update.call(undefined, b8fba6d3, () => {
return client.type.string.truncate(undefined, {length: 3});
});
curl "https://proc.run/proc/create?name=b8fba6d3" --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=b8fba6d3" --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.