Skip to content

Commit 708c5f0

Browse files
authored
fix: add missing quotes to parameterized queries from python (#5768)
1 parent 2e2acdb commit 708c5f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

content/shared/v3-core-get-started/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def process_writes(influxdb3_local, table_batches, args=None):
468468
# here's an example of executing a parameterized query. Only SQL is supported.
469469
# It will query the database that the trigger is attached to by default. We'll
470470
# soon have support for querying other DBs.
471-
query_result = influxdb3_local.query("SELECT * FROM cpu where host = $host", query_params)
471+
query_result = influxdb3_local.query("SELECT * FROM cpu where host = '$host'", query_params)
472472
# the result is a list of Dict that have the column name as key and value as
473473
# value. If you run the WAL test plugin with your plugin against a DB that
474474
# you've written data into, you'll be able to see some results

content/shared/v3-enterprise-get-started/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def process_writes(influxdb3_local, table_batches, args=None):
471471
# here's an example of executing a parameterized query. Only SQL is supported.
472472
# It will query the database that the trigger is attached to by default. We'll
473473
# soon have support for querying other DBs.
474-
query_result = influxdb3_local.query("SELECT * FROM cpu where host = $host", query_params)
474+
query_result = influxdb3_local.query("SELECT * FROM cpu where host = '$host'", query_params)
475475
# the result is a list of Dict that have the column name as key and value as
476476
# value. If you run the WAL test plugin with your plugin against a DB that
477477
# you've written data into, you'll be able to see some results
@@ -743,4 +743,4 @@ To accelerate performance on specific queries, you can define non-primary keys t
743743
Create Usage: $ influxdb3 file-index create --host=http://127.0.0.1:8585 -d <DATABASE> -t <TABLE> <COLUMNS>
744744
745745
Delete Usage: $ influxdb3 file-index delete --host=http://127.0.0.1:8585 -d <DATABASE> -t <TABLE>
746-
```
746+
```

0 commit comments

Comments
 (0)