Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-21.2: builtins: hide multitenancy functions from docs and fix categories #87445

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions docs/generated/sql/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,8 @@ available replica will error.</p>
</span></td></tr>
<tr><td><a name="jsonb_typeof"></a><code>jsonb_typeof(val: jsonb) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the type of the outermost JSON value as a text string.</p>
</span></td></tr>
<tr><td><a name="row_to_json"></a><code>row_to_json(row: tuple) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the row as a JSON object.</p>
</span></td></tr>
<tr><td><a name="to_json"></a><code>to_json(val: anyelement) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the value as JSON or JSONB.</p>
</span></td></tr>
<tr><td><a name="to_jsonb"></a><code>to_jsonb(val: anyelement) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the value as JSON or JSONB.</p>
Expand Down Expand Up @@ -955,15 +957,6 @@ the locality flag on node startup. Returns an error if no region is set.</p>
</span></td></tr></tbody>
</table>

### Multi-tenancy functions

<table>
<thead><tr><th>Function &rarr; Returns</th><th>Description</th></tr></thead>
<tbody>
<tr><td><a name="crdb_internal.sql_liveness_is_alive"></a><code>crdb_internal.sql_liveness_is_alive(session_id: <a href="bytes.html">bytes</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Checks is given sqlliveness session id is not expired</p>
</span></td></tr></tbody>
</table>

### STRING[] functions

<table>
Expand Down Expand Up @@ -2956,15 +2949,6 @@ table. Returns an error if validation fails.</p>
</span></td></tr></tbody>
</table>

### TUPLE functions

<table>
<thead><tr><th>Function &rarr; Returns</th><th>Description</th></tr></thead>
<tbody>
<tr><td><a name="row_to_json"></a><code>row_to_json(row: tuple) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the row as a JSON object.</p>
</span></td></tr></tbody>
</table>

### UUID functions

<table>
Expand Down
9 changes: 6 additions & 3 deletions pkg/sql/sem/builtins/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -2987,7 +2987,7 @@ value if you rely on the HLC for accuracy.`,
},
),

"row_to_json": makeBuiltin(defProps(),
"row_to_json": makeBuiltin(jsonProps(),
tree.Overload{
Types: tree.ArgTypes{{"row", types.AnyTuple}},
ReturnType: tree.FixedReturnType(types.Jsonb),
Expand Down Expand Up @@ -5744,7 +5744,10 @@ value if you rely on the HLC for accuracy.`,

// Returns true iff the given sqlliveness session is not expired.
"crdb_internal.sql_liveness_is_alive": makeBuiltin(
tree.FunctionProperties{Category: categoryMultiTenancy},
tree.FunctionProperties{
Category: categorySystemInfo,
Undocumented: true,
},
tree.Overload{
Types: tree.ArgTypes{{"session_id", types.Bytes}},
ReturnType: tree.FixedReturnType(types.Bool),
Expand All @@ -5756,7 +5759,7 @@ value if you rely on the HLC for accuracy.`,
}
return tree.MakeDBool(tree.DBool(live)), nil
},
Info: "Checks is given sqlliveness session id is not expired",
Info: "Checks if given sqlliveness session id is not expired",
Volatility: tree.VolatilityStable,
},
),
Expand Down