Skip to content

Commit

Permalink
clickhouse_info: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersson007 committed Feb 5, 2025
1 parent e8efd0b commit b751234
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions plugins/modules/clickhouse_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
- name: Query DB using non-default user & DB to connect to
register: result
community.clickhouse.clickhouse_client:
execute: SELECT version()
execute: SELECT * FROM my_table
login_host: localhost
login_user: alice
login_db: foo
login_password: my_password
- name: Print returned server version
- name: Print returned rows
ansible.builtin.debug:
var: result.result
Expand All @@ -76,7 +76,6 @@
flatten_nested: 0
short_circuit_function_evaluation: 'disable'
- name: Insert into test table using named parameters
register: result
community.clickhouse.clickhouse_client:
Expand All @@ -98,7 +97,7 @@
community.clickhouse.clickhouse_client:
execute: "SELECT * FROM test_table_1"
- name: Check return values
- name: Check returned values
ansible.builtin.assert:
that:
- result.result == [["one"], ["two"], ["three"]]
Expand All @@ -109,14 +108,14 @@
description:
- Executed query with substituted arguments if any.
returned: on success
sample: SHOW version()
sample: SELECT * FROM test_table_1
type: str
result:
description:
- Result returned by Client.execute().
returned: on success
type: list
sample: [["23.12.2.59"]]
sample: [["one"], ["two"], ["three"]]
statistics:
description:
- Last executed query statistics retrieved from the
Expand Down

0 comments on commit b751234

Please sign in to comment.