MCPcopy Create free account
hub / github.com/rilldata/rill / UpdateBookmark

Method UpdateBookmark

admin/database/postgres/postgres.go:2875–2882  ·  view source on GitHub ↗
(ctx context.Context, opts *database.UpdateBookmarkOptions)

Source from the content-addressed store, hash-verified

2873}
2874
2875func (c *connection) UpdateBookmark(ctx context.Context, opts *database.UpdateBookmarkOptions) error {
2876 if err := database.Validate(opts); err != nil {
2877 return err
2878 }
2879 res, err := c.getDB(ctx).ExecContext(ctx, `UPDATE bookmarks SET display_name=$1, description=$2, url_search=$3, shared=$4 WHERE id=$5`,
2880 opts.DisplayName, opts.Description, opts.URLSearch, opts.Shared, opts.BookmarkID)
2881 return checkUpdateRow("bookmark", res, err)
2882}
2883
2884// DeleteBookmark deletes a bookmark for a given bookmark id
2885func (c *connection) DeleteBookmark(ctx context.Context, bookmarkID string) error {

Callers

nothing calls this directly

Calls 4

getDBMethod · 0.95
ValidateFunction · 0.92
checkUpdateRowFunction · 0.85
ExecContextMethod · 0.45

Tested by

no test coverage detected