mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-21 18:13:57 +00:00
docs: update example names (#4887)
Use neutral placeholder names and values in a few code examples in the docs and Python docstrings. Text-only; no behavior change. --- _Generated by [Claude Code](https://claude.ai/code/session_019iqZdtD3ZMnvTMeoNsULgX)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
96328f6e08
commit
e2501b0dab
@@ -26,10 +26,10 @@ GRANT OPERATE, USAGE ON SYSTEM TO ROLE ops
|
||||
GRANT USAGE, CREATE SCHEMA ON DATABASE analytics TO ROLE readers
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE events TO ROLE etl
|
||||
GRANT CREATE SECRET, CREATE FUNCTION ON SCHEMA platform TO ROLE platform_admins
|
||||
GRANT USAGE, UPDATE ON SECRET platform.`openai-prod` TO ROLE etl, rotation_service
|
||||
GRANT USAGE ON SECRET platform.`openai-prod` TO USER alice, GROUP ID 'g1'
|
||||
GRANT USAGE, UPDATE ON SECRET platform.`model-api-key` TO ROLE etl, rotation_service
|
||||
GRANT USAGE ON SECRET platform.`model-api-key` TO USER alice, GROUP ID 'g1'
|
||||
GRANT USAGE ON FUNCTION platform.embed TO ROLE research
|
||||
GRANT OWNERSHIP ON SECRET platform.`openai-prod` TO ROLE platform_admins
|
||||
GRANT OWNERSHIP ON SECRET platform.`model-api-key` TO ROLE platform_admins
|
||||
REVOKE USAGE ON FUNCTION platform.embed FROM ROLE research
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
+13
-13
@@ -21,8 +21,8 @@ and `-`, so quote one that contains `.` or `-`:
|
||||
<CodeGroup>
|
||||
```sql SQL icon="database"
|
||||
api_key
|
||||
platform.`openai-prod`
|
||||
analytics.`ml$vision`.`openai-prod`
|
||||
platform.`model-api-key`
|
||||
analytics.`ml$vision`.`model-api-key`
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -34,8 +34,8 @@ Secret (for `ALTER` and `DROP`) is an error rather than a status.
|
||||
|
||||
<CodeGroup>
|
||||
```sql SQL icon="database"
|
||||
CREATE SECRET platform.`openai-prod` TYPE = GENERIC_STRING SECRET_STRING = 'sk-...'
|
||||
CREATE SECRET IF NOT EXISTS api_key TYPE = GENERIC_STRING SECRET_STRING = $$sk-...$$
|
||||
CREATE SECRET platform.`model-api-key` TYPE = GENERIC_STRING SECRET_STRING = '<api-key>'
|
||||
CREATE SECRET IF NOT EXISTS api_key TYPE = GENERIC_STRING SECRET_STRING = $$<api-key>$$
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -47,8 +47,8 @@ value never has to appear in the SQL text itself:
|
||||
<CodeGroup>
|
||||
```python Python icon="python"
|
||||
db.execute_query(
|
||||
"CREATE SECRET platform.`openai-prod` TYPE = GENERIC_STRING SECRET_STRING = $1",
|
||||
parameters=["sk-..."],
|
||||
"CREATE SECRET platform.`model-api-key` TYPE = GENERIC_STRING SECRET_STRING = $1",
|
||||
parameters=["<api-key>"],
|
||||
)
|
||||
```
|
||||
</CodeGroup>
|
||||
@@ -63,8 +63,8 @@ overwrites an existing Secret; use `ALTER SECRET`.
|
||||
|
||||
<CodeGroup>
|
||||
```sql SQL icon="database"
|
||||
ALTER SECRET platform.`openai-prod` SET SECRET_STRING = 'sk-...'
|
||||
ALTER SECRET IF EXISTS api_key SET SECRET_STRING = $$sk-...$$
|
||||
ALTER SECRET platform.`model-api-key` SET SECRET_STRING = '<api-key>'
|
||||
ALTER SECRET IF EXISTS api_key SET SECRET_STRING = $$<api-key>$$
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -81,7 +81,7 @@ The status is `altered`, or `not_found` with `IF EXISTS`.
|
||||
|
||||
<CodeGroup>
|
||||
```sql SQL icon="database"
|
||||
DROP SECRET platform.`openai-prod`
|
||||
DROP SECRET platform.`model-api-key`
|
||||
DROP SECRET IF EXISTS api_key
|
||||
```
|
||||
</CodeGroup>
|
||||
@@ -104,7 +104,7 @@ SHOW SECRETS
|
||||
SHOW SECRETS IN platform
|
||||
SHOW SECRETS IN analytics.`ml$vision`
|
||||
SHOW SECRETS IN public
|
||||
SHOW SECRETS IN platform WHERE name > 'openai-prod' LIMIT 50
|
||||
SHOW SECRETS IN platform WHERE name > 'model-api-key' LIMIT 50
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -118,7 +118,7 @@ bounds the page size; `WHERE` must compare `name` with `>`. Requires
|
||||
|
||||
<CodeGroup>
|
||||
```sql SQL icon="database"
|
||||
DESCRIBE SECRET platform.`openai-prod`
|
||||
DESCRIBE SECRET platform.`model-api-key`
|
||||
DESC SECRET api_key
|
||||
```
|
||||
</CodeGroup>
|
||||
@@ -139,8 +139,8 @@ A missing Secret is an error. Requires `USAGE` on the Secret.
|
||||
<CodeGroup>
|
||||
```sql SQL icon="database"
|
||||
GRANT CREATE SECRET ON SCHEMA platform TO ROLE platform_admins
|
||||
GRANT USAGE, UPDATE ON SECRET platform.`openai-prod` TO ROLE etl, rotation_service
|
||||
REVOKE UPDATE ON SECRET platform.`openai-prod` FROM ROLE etl
|
||||
GRANT USAGE, UPDATE ON SECRET platform.`model-api-key` TO ROLE etl, rotation_service
|
||||
REVOKE UPDATE ON SECRET platform.`model-api-key` FROM ROLE etl
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user