mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-16 18:15:58 -05:00
Compare commits
9 Commits
pr/dumians
...
test-pr-co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b607aa90c | ||
|
|
c7b1cae15a | ||
|
|
e8598fb53f | ||
|
|
e5e2eb36bd | ||
|
|
4769ac98c0 | ||
|
|
93cd0b84b5 | ||
|
|
a678886ee3 | ||
|
|
6602abd059 | ||
|
|
62b830987d |
68
.github/workflows/link_checker_workflow.yaml
vendored
68
.github/workflows/link_checker_workflow.yaml
vendored
@@ -15,6 +15,9 @@ name: Link Checker
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -23,8 +26,33 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Identify Changed Files
|
||||||
|
id: changed-files
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git fetch origin main
|
||||||
|
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRT origin/main...HEAD)
|
||||||
|
|
||||||
|
if [ -z "$CHANGED_FILES" ]; then
|
||||||
|
echo "No markdown files changed. Skipping checks."
|
||||||
|
echo "HAS_CHANGES=false" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "--- Changed Files to Scan ---"
|
||||||
|
echo "$CHANGED_FILES"
|
||||||
|
echo "-----------------------------"
|
||||||
|
|
||||||
|
# Flatten newlines to spaces for the args list
|
||||||
|
FILES_FLAT=$(echo "$CHANGED_FILES" | tr '\n' ' ')
|
||||||
|
|
||||||
|
echo "CHECK_FILES=$FILES_FLAT" >> $GITHUB_ENV
|
||||||
|
echo "HAS_CHANGES=true" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
- name: Restore lychee cache
|
- name: Restore lychee cache
|
||||||
|
if: env.HAS_CHANGES == 'true'
|
||||||
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
|
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
|
||||||
with:
|
with:
|
||||||
path: .lycheecache
|
path: .lycheecache
|
||||||
@@ -33,6 +61,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Link Checker
|
- name: Link Checker
|
||||||
id: lychee-check
|
id: lychee-check
|
||||||
|
if: env.HAS_CHANGES == 'true'
|
||||||
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2
|
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
@@ -42,8 +71,7 @@ jobs:
|
|||||||
--cache
|
--cache
|
||||||
--max-cache-age 1d
|
--max-cache-age 1d
|
||||||
--exclude '^neo4j\+.*' --exclude '^bolt://.*'
|
--exclude '^neo4j\+.*' --exclude '^bolt://.*'
|
||||||
README.md
|
${{ env.CHECK_FILES }}
|
||||||
docs/
|
|
||||||
output: lychee-report.md
|
output: lychee-report.md
|
||||||
format: markdown
|
format: markdown
|
||||||
fail: true
|
fail: true
|
||||||
@@ -52,17 +80,35 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Prepare Report Message
|
||||||
|
if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure'
|
||||||
|
run: |
|
||||||
|
# Create a new file 'full-report.md'
|
||||||
|
echo "## Link Resolution Note" > full-report.md
|
||||||
|
echo "Local links and directory changes work differently on GitHub than on the docsite." >> full-report.md
|
||||||
|
echo "You must ensure fixes pass the **GitHub check** and also work with **\`hugo server\`**." >> full-report.md
|
||||||
|
echo "See [Link Checking and Fixing with Lychee](https://github.com/googleapis/genai-toolbox/blob/main/DEVELOPER.md#link-checking-and-fixing-with-lychee) for more details." >> full-report.md
|
||||||
|
echo "---" >> full-report.md
|
||||||
|
echo "### Broken Links Found" >> full-report.md
|
||||||
|
|
||||||
|
# Append the actual Lychee report
|
||||||
|
cat lychee-report.md >> full-report.md
|
||||||
|
|
||||||
|
- name: Create PR Comment
|
||||||
|
if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure'
|
||||||
|
uses: peter-evans/create-or-update-comment@v4
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
# CHANGE: Read from the new combined file
|
||||||
|
body-path: full-report.md
|
||||||
|
edit-mode: replace
|
||||||
|
|
||||||
- name: Display Failure Report
|
- name: Display Failure Report
|
||||||
# Run this ONLY if the link checker failed
|
# Run this ONLY if the link checker failed
|
||||||
if: steps.lychee-check.outcome == 'failure'
|
if: steps.lychee-check.outcome == 'failure'
|
||||||
run: |
|
run: |
|
||||||
echo "## Link Resolution Note" >> $GITHUB_STEP_SUMMARY
|
# We can now simply output the prepared file to the job summary
|
||||||
echo "Local links and directory changes work differently on GitHub than on the docsite." >> $GITHUB_STEP_SUMMARY
|
cat full-report.md >> $GITHUB_STEP_SUMMARY
|
||||||
echo "You must ensure fixes pass the **GitHub check** and also work with **\`hugo server\`**." >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "See [Link Checking and Fixing with Lychee](https://github.com/googleapis/genai-toolbox/blob/main/DEVELOPER.md#link-checking-and-fixing-with-lychee) for more details." >> $GITHUB_STEP_SUMMARY
|
# Fail the job
|
||||||
echo "---" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
echo "### Broken Links Found" >> $GITHUB_STEP_SUMMARY
|
|
||||||
cat ./lychee-report.md >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 241 KiB After Width: | Height: | Size: 271 KiB |
@@ -20,7 +20,7 @@ to expose your developer assistant tools to a Looker instance:
|
|||||||
* [Claude code][claudecode]
|
* [Claude code][claudecode]
|
||||||
* [Antigravity][antigravity]
|
* [Antigravity][antigravity]
|
||||||
|
|
||||||
[toolbox]: https://github.com/googleapis/genai-toolbox
|
[toolbox]: https://github/googleapis/genai-toolbox
|
||||||
[gemini-cli]: #configure-your-mcp-client
|
[gemini-cli]: #configure-your-mcp-client
|
||||||
[cursor]: #configure-your-mcp-client
|
[cursor]: #configure-your-mcp-client
|
||||||
[windsurf]: #configure-your-mcp-client
|
[windsurf]: #configure-your-mcp-client
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* **Tools:**
|
* **Tools:**
|
||||||
* `execute_sql`: Executes a SQL query.
|
* `execute_sql`: Executes a SQL query.
|
||||||
* `list_tables`: Lists tables in the database.
|
* `list_tables`: Lists tables in the database.
|
||||||
|
* `list_active_queries`: Lists ongoing queries.
|
||||||
|
* `list_available_extensions`: Discover all PostgreSQL extensions available for installation.
|
||||||
|
* `list_installed_extensions`: List all installed PostgreSQL extensions.
|
||||||
|
* `long_running_transactions`: Identifies and lists database transactions that exceed a specified time limit.
|
||||||
|
* `list_locks`: Identifies all locks held by active processes.
|
||||||
|
* `replication_stats`: Lists each replica's process ID and sync state.
|
||||||
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
|
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
|
||||||
database.
|
database.
|
||||||
* `list_memory_configurations`: Lists memory-related configurations in the
|
* `list_memory_configurations`: Lists memory-related configurations in the
|
||||||
@@ -59,12 +65,16 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* `list_triggers`: Lists triggers in the database.
|
* `list_triggers`: Lists triggers in the database.
|
||||||
* `list_indexes`: List available user indexes in a PostgreSQL database.
|
* `list_indexes`: List available user indexes in a PostgreSQL database.
|
||||||
* `list_sequences`: List sequences in a PostgreSQL database.
|
* `list_sequences`: List sequences in a PostgreSQL database.
|
||||||
|
* `list_query_stats`: Lists query statistics.
|
||||||
|
* `get_column_cardinality`: Gets column cardinality.
|
||||||
|
* `list_table_stats`: Lists table statistics.
|
||||||
* `list_publication_tables`: List publication tables in a PostgreSQL database.
|
* `list_publication_tables`: List publication tables in a PostgreSQL database.
|
||||||
* `list_tablespaces`: Lists tablespaces in the database.
|
* `list_tablespaces`: Lists tablespaces in the database.
|
||||||
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
|
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
|
||||||
* `list_database_stats`: Lists the key performance and activity statistics for
|
* `list_database_stats`: Lists the key performance and activity statistics for
|
||||||
each database in the AlloyDB instance.
|
each database in the AlloyDB instance.
|
||||||
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
|
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
|
||||||
|
* `list_stored_procedure`: Lists stored procedures.
|
||||||
|
|
||||||
## AlloyDB Postgres Admin
|
## AlloyDB Postgres Admin
|
||||||
|
|
||||||
@@ -113,6 +123,12 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* **Tools:**
|
* **Tools:**
|
||||||
* `execute_sql`: Executes a SQL query.
|
* `execute_sql`: Executes a SQL query.
|
||||||
* `list_tables`: Lists tables in the database.
|
* `list_tables`: Lists tables in the database.
|
||||||
|
* `list_active_queries`: Lists ongoing queries.
|
||||||
|
* `list_available_extensions`: Discover all PostgreSQL extensions available for installation.
|
||||||
|
* `list_installed_extensions`: List all installed PostgreSQL extensions.
|
||||||
|
* `long_running_transactions`: Identifies and lists database transactions that exceed a specified time limit.
|
||||||
|
* `list_locks`: Identifies all locks held by active processes.
|
||||||
|
* `replication_stats`: Lists each replica's process ID and sync state.
|
||||||
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
|
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
|
||||||
database.
|
database.
|
||||||
* `list_columnar_configurations`: List AlloyDB Omni columnar-related configurations.
|
* `list_columnar_configurations`: List AlloyDB Omni columnar-related configurations.
|
||||||
@@ -130,12 +146,16 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* `list_triggers`: Lists triggers in the database.
|
* `list_triggers`: Lists triggers in the database.
|
||||||
* `list_indexes`: List available user indexes in a PostgreSQL database.
|
* `list_indexes`: List available user indexes in a PostgreSQL database.
|
||||||
* `list_sequences`: List sequences in a PostgreSQL database.
|
* `list_sequences`: List sequences in a PostgreSQL database.
|
||||||
|
* `list_query_stats`: Lists query statistics.
|
||||||
|
* `get_column_cardinality`: Gets column cardinality.
|
||||||
|
* `list_table_stats`: Lists table statistics.
|
||||||
* `list_publication_tables`: List publication tables in a PostgreSQL database.
|
* `list_publication_tables`: List publication tables in a PostgreSQL database.
|
||||||
* `list_tablespaces`: Lists tablespaces in the database.
|
* `list_tablespaces`: Lists tablespaces in the database.
|
||||||
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
|
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
|
||||||
* `list_database_stats`: Lists the key performance and activity statistics for
|
* `list_database_stats`: Lists the key performance and activity statistics for
|
||||||
each database in the AlloyDB instance.
|
each database in the AlloyDB instance.
|
||||||
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
|
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
|
||||||
|
* `list_stored_procedure`: Lists stored procedures.
|
||||||
|
|
||||||
## BigQuery
|
## BigQuery
|
||||||
|
|
||||||
@@ -173,6 +193,21 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* `list_table_ids`: Lists tables.
|
* `list_table_ids`: Lists tables.
|
||||||
* `search_catalog`: Search for entries based on the provided query.
|
* `search_catalog`: Search for entries based on the provided query.
|
||||||
|
|
||||||
|
## ClickHouse
|
||||||
|
|
||||||
|
* `--prebuilt` value: `clickhouse`
|
||||||
|
* **Environment Variables:**
|
||||||
|
* `CLICKHOUSE_HOST`: The hostname or IP address of the ClickHouse server.
|
||||||
|
* `CLICKHOUSE_PORT`: The port number of the ClickHouse server.
|
||||||
|
* `CLICKHOUSE_USER`: The database username.
|
||||||
|
* `CLICKHOUSE_PASSWORD`: The password for the database user.
|
||||||
|
* `CLICKHOUSE_DATABASE`: The name of the database to connect to.
|
||||||
|
* `CLICKHOUSE_PROTOCOL`: The protocol to use (e.g., http).
|
||||||
|
* **Tools:**
|
||||||
|
* `execute_sql`: Use this tool to execute SQL.
|
||||||
|
* `list_databases`: Use this tool to list all databases in ClickHouse.
|
||||||
|
* `list_tables`: Use this tool to list all tables in a specific ClickHouse database.
|
||||||
|
|
||||||
## Cloud SQL for MySQL
|
## Cloud SQL for MySQL
|
||||||
|
|
||||||
* `--prebuilt` value: `cloud-sql-mysql`
|
* `--prebuilt` value: `cloud-sql-mysql`
|
||||||
@@ -270,6 +305,12 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* **Tools:**
|
* **Tools:**
|
||||||
* `execute_sql`: Executes a SQL query.
|
* `execute_sql`: Executes a SQL query.
|
||||||
* `list_tables`: Lists tables in the database.
|
* `list_tables`: Lists tables in the database.
|
||||||
|
* `list_active_queries`: Lists ongoing queries.
|
||||||
|
* `list_available_extensions`: Discover all PostgreSQL extensions available for installation.
|
||||||
|
* `list_installed_extensions`: List all installed PostgreSQL extensions.
|
||||||
|
* `long_running_transactions`: Identifies and lists database transactions that exceed a specified time limit.
|
||||||
|
* `list_locks`: Identifies all locks held by active processes.
|
||||||
|
* `replication_stats`: Lists each replica's process ID and sync state.
|
||||||
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
|
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
|
||||||
database.
|
database.
|
||||||
* `list_memory_configurations`: Lists memory-related configurations in the
|
* `list_memory_configurations`: Lists memory-related configurations in the
|
||||||
@@ -285,12 +326,16 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* `list_triggers`: Lists triggers in the database.
|
* `list_triggers`: Lists triggers in the database.
|
||||||
* `list_indexes`: List available user indexes in a PostgreSQL database.
|
* `list_indexes`: List available user indexes in a PostgreSQL database.
|
||||||
* `list_sequences`: List sequences in a PostgreSQL database.
|
* `list_sequences`: List sequences in a PostgreSQL database.
|
||||||
|
* `list_query_stats`: Lists query statistics.
|
||||||
|
* `get_column_cardinality`: Gets column cardinality.
|
||||||
|
* `list_table_stats`: Lists table statistics.
|
||||||
* `list_publication_tables`: List publication tables in a PostgreSQL database.
|
* `list_publication_tables`: List publication tables in a PostgreSQL database.
|
||||||
* `list_tablespaces`: Lists tablespaces in the database.
|
* `list_tablespaces`: Lists tablespaces in the database.
|
||||||
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
|
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
|
||||||
* `list_database_stats`: Lists the key performance and activity statistics for
|
* `list_database_stats`: Lists the key performance and activity statistics for
|
||||||
each database in the postgreSQL instance.
|
each database in the postgreSQL instance.
|
||||||
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
|
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
|
||||||
|
* `list_stored_procedure`: Lists stored procedures.
|
||||||
|
|
||||||
## Cloud SQL for PostgreSQL Observability
|
## Cloud SQL for PostgreSQL Observability
|
||||||
|
|
||||||
@@ -336,6 +381,7 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* `create_user`: Creates a new user in a Cloud SQL instance.
|
* `create_user`: Creates a new user in a Cloud SQL instance.
|
||||||
* `wait_for_operation`: Waits for a Cloud SQL operation to complete.
|
* `wait_for_operation`: Waits for a Cloud SQL operation to complete.
|
||||||
* `clone_instance`: Creates a clone for an existing Cloud SQL for PostgreSQL instance.
|
* `clone_instance`: Creates a clone for an existing Cloud SQL for PostgreSQL instance.
|
||||||
|
* `postgres_upgrade_precheck`: Performs a precheck for a major version upgrade of a Cloud SQL for PostgreSQL instance.
|
||||||
* `create_backup`: Creates a backup on a Cloud SQL instance.
|
* `create_backup`: Creates a backup on a Cloud SQL instance.
|
||||||
* `restore_backup`: Restores a backup of a Cloud SQL instance.
|
* `restore_backup`: Restores a backup of a Cloud SQL instance.
|
||||||
|
|
||||||
@@ -420,6 +466,15 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* `search_aspect_types`: Finds aspect types relevant to the
|
* `search_aspect_types`: Finds aspect types relevant to the
|
||||||
query.
|
query.
|
||||||
|
|
||||||
|
## Elasticsearch
|
||||||
|
|
||||||
|
* `--prebuilt` value: `elasticsearch`
|
||||||
|
* **Environment Variables:**
|
||||||
|
* `ELASTICSEARCH_HOST`: The hostname or IP address of the Elasticsearch server.
|
||||||
|
* `ELASTICSEARCH_APIKEY`: The API key for authentication.
|
||||||
|
* **Tools:**
|
||||||
|
* `execute_esql_query`: Use this tool to execute ES|QL queries.
|
||||||
|
|
||||||
## Firestore
|
## Firestore
|
||||||
|
|
||||||
* `--prebuilt` value: `firestore`
|
* `--prebuilt` value: `firestore`
|
||||||
@@ -537,6 +592,19 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* `execute_sql`: Executes a SQL query.
|
* `execute_sql`: Executes a SQL query.
|
||||||
* `list_tables`: Lists tables in the database.
|
* `list_tables`: Lists tables in the database.
|
||||||
|
|
||||||
|
## MindsDB
|
||||||
|
|
||||||
|
* `--prebuilt` value: `mindsdb`
|
||||||
|
* **Environment Variables:**
|
||||||
|
* `MINDSDB_HOST`: The hostname or IP address of the MindsDB server.
|
||||||
|
* `MINDSDB_PORT`: The port number of the MindsDB server.
|
||||||
|
* `MINDSDB_DATABASE`: The name of the database to connect to.
|
||||||
|
* `MINDSDB_USER`: The database username.
|
||||||
|
* `MINDSDB_PASS`: The password for the database user.
|
||||||
|
* **Tools:**
|
||||||
|
* `mindsdb-execute-sql`: Execute SQL queries directly on MindsDB database.
|
||||||
|
* `mindsdb-sql`: Execute parameterized SQL queries on MindsDB database.
|
||||||
|
|
||||||
## MySQL
|
## MySQL
|
||||||
|
|
||||||
* `--prebuilt` value: `mysql`
|
* `--prebuilt` value: `mysql`
|
||||||
@@ -592,6 +660,12 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* **Tools:**
|
* **Tools:**
|
||||||
* `execute_sql`: Executes a SQL query.
|
* `execute_sql`: Executes a SQL query.
|
||||||
* `list_tables`: Lists tables in the database.
|
* `list_tables`: Lists tables in the database.
|
||||||
|
* `list_active_queries`: Lists ongoing queries.
|
||||||
|
* `list_available_extensions`: Discover all PostgreSQL extensions available for installation.
|
||||||
|
* `list_installed_extensions`: List all installed PostgreSQL extensions.
|
||||||
|
* `long_running_transactions`: Identifies and lists database transactions that exceed a specified time limit.
|
||||||
|
* `list_locks`: Identifies all locks held by active processes.
|
||||||
|
* `replication_stats`: Lists each replica's process ID and sync state.
|
||||||
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
|
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
|
||||||
database.
|
database.
|
||||||
* `list_memory_configurations`: Lists memory-related configurations in the
|
* `list_memory_configurations`: Lists memory-related configurations in the
|
||||||
@@ -607,12 +681,16 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
* `list_triggers`: Lists triggers in the database.
|
* `list_triggers`: Lists triggers in the database.
|
||||||
* `list_indexes`: List available user indexes in a PostgreSQL database.
|
* `list_indexes`: List available user indexes in a PostgreSQL database.
|
||||||
* `list_sequences`: List sequences in a PostgreSQL database.
|
* `list_sequences`: List sequences in a PostgreSQL database.
|
||||||
|
* `list_query_stats`: Lists query statistics.
|
||||||
|
* `get_column_cardinality`: Gets column cardinality.
|
||||||
|
* `list_table_stats`: Lists table statistics.
|
||||||
* `list_publication_tables`: List publication tables in a PostgreSQL database.
|
* `list_publication_tables`: List publication tables in a PostgreSQL database.
|
||||||
* `list_tablespaces`: Lists tablespaces in the database.
|
* `list_tablespaces`: Lists tablespaces in the database.
|
||||||
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
|
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
|
||||||
* `list_database_stats`: Lists the key performance and activity statistics for
|
* `list_database_stats`: Lists the key performance and activity statistics for
|
||||||
each database in the PostgreSQL server.
|
each database in the PostgreSQL server.
|
||||||
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
|
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
|
||||||
|
* `list_stored_procedure`: Lists stored procedures.
|
||||||
|
|
||||||
## Google Cloud Serverless for Apache Spark
|
## Google Cloud Serverless for Apache Spark
|
||||||
|
|
||||||
@@ -627,6 +705,38 @@ See [Usage Examples](../reference/cli.md#examples).
|
|||||||
view serverless batches.
|
view serverless batches.
|
||||||
* **Tools:**
|
* **Tools:**
|
||||||
* `list_batches`: Lists Spark batches.
|
* `list_batches`: Lists Spark batches.
|
||||||
|
* `get_batch`: Gets information about a Spark batch.
|
||||||
|
* `cancel_batch`: Cancels a Spark batch.
|
||||||
|
* `create_pyspark_batch`: Creates a PySpark batch.
|
||||||
|
* `create_spark_batch`: Creates a Spark batch.
|
||||||
|
|
||||||
|
## SingleStore
|
||||||
|
|
||||||
|
* `--prebuilt` value: `singlestore`
|
||||||
|
* **Environment Variables:**
|
||||||
|
* `SINGLESTORE_HOST`: The hostname or IP address of the SingleStore server.
|
||||||
|
* `SINGLESTORE_PORT`: The port number of the SingleStore server.
|
||||||
|
* `SINGLESTORE_DATABASE`: The name of the database to connect to.
|
||||||
|
* `SINGLESTORE_USER`: The database username.
|
||||||
|
* `SINGLESTORE_PASSWORD`: The password for the database user.
|
||||||
|
* **Tools:**
|
||||||
|
* `execute_sql`: Use this tool to execute SQL.
|
||||||
|
* `list_tables`: Lists detailed schema information for user-created tables.
|
||||||
|
|
||||||
|
## Snowflake
|
||||||
|
|
||||||
|
* `--prebuilt` value: `snowflake`
|
||||||
|
* **Environment Variables:**
|
||||||
|
* `SNOWFLAKE_ACCOUNT`: The Snowflake account.
|
||||||
|
* `SNOWFLAKE_USER`: The database username.
|
||||||
|
* `SNOWFLAKE_PASSWORD`: The password for the database user.
|
||||||
|
* `SNOWFLAKE_DATABASE`: The name of the database to connect to.
|
||||||
|
* `SNOWFLAKE_SCHEMA`: The schema name.
|
||||||
|
* `SNOWFLAKE_WAREHOUSE`: The warehouse name.
|
||||||
|
* `SNOWFLAKE_ROLE`: The role name.
|
||||||
|
* **Tools:**
|
||||||
|
* `execute_sql`: Use this tool to execute SQL.
|
||||||
|
* `list_tables`: Lists detailed schema information for user-created tables.
|
||||||
|
|
||||||
## Spanner (GoogleSQL dialect)
|
## Spanner (GoogleSQL dialect)
|
||||||
|
|
||||||
|
|||||||
@@ -36,15 +36,17 @@ var (
|
|||||||
AlloyDBDatabase = "postgres"
|
AlloyDBDatabase = "postgres"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Copied over from postgres.go
|
func buildPostgresURL(host, port, user, pass, dbname string) *url.URL {
|
||||||
func initPostgresConnectionPool(host, port, user, pass, dbname string) (*pgxpool.Pool, error) {
|
return &url.URL{
|
||||||
// urlExample := "postgres:dd//username:password@localhost:5432/database_name"
|
|
||||||
url := &url.URL{
|
|
||||||
Scheme: "postgres",
|
Scheme: "postgres",
|
||||||
User: url.UserPassword(user, pass),
|
User: url.UserPassword(user, pass),
|
||||||
Host: fmt.Sprintf("%s:%s", host, port),
|
Host: fmt.Sprintf("%s:%s", host, port),
|
||||||
Path: dbname,
|
Path: dbname,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func initPostgresConnectionPool(host, port, user, pass, dbname string) (*pgxpool.Pool, error) {
|
||||||
|
url := buildPostgresURL(host, port, user, pass, dbname)
|
||||||
pool, err := pgxpool.New(context.Background(), url.String())
|
pool, err := pgxpool.New(context.Background(), url.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Unable to create connection pool: %w", err)
|
return nil, fmt.Errorf("Unable to create connection pool: %w", err)
|
||||||
@@ -63,7 +65,8 @@ func setupAlloyDBContainer(ctx context.Context, t *testing.T) (string, string, f
|
|||||||
"POSTGRES_PASSWORD": AlloyDBPass,
|
"POSTGRES_PASSWORD": AlloyDBPass,
|
||||||
},
|
},
|
||||||
WaitingFor: wait.ForAll(
|
WaitingFor: wait.ForAll(
|
||||||
wait.ForLog("Post Startup: Successfully reinstalled extensions"),
|
wait.ForLog("database system was shut down at"),
|
||||||
|
wait.ForLog("database system is ready to accept connections"),
|
||||||
wait.ForExposedPort(),
|
wait.ForExposedPort(),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user