crate.operator.sql module¶
- class crate.operator.sql.SQLResult(rowcount, rows, error_code, error_message)¶
Bases:
object- Parameters:
- async crate.operator.sql.execute_sql(*, namespace, name, pod_name, scheme, sql, args, logger)¶
- async crate.operator.sql.execute_sql_via_crate_control(*, namespace, name, sql, args, logger)¶
- crate.operator.sql.parse_crash_table(output)¶
- async crate.operator.sql.run_crash_command(namespace, pod_name, scheme, command, logger, delay=30)¶
This connects to a CrateDB pod and executes a crash command in the
cratecontainer. It returns the result of the execution.- Parameters:
namespace (
str) – The Kubernetes namespace of the CrateDB cluster.pod_name (
str) – The pod name where the command should be run.scheme (
str) – The host scheme for running the command.command (
str) – The SQL query that should be run.logger – the logger on which we’re logging
delay (
int) – Time in seconds between the retries when executing the query.