Module describe

Module describe 

Source
Expand description

DESCRIBE command implementations for cqlsh-rs.

Provides schema introspection commands matching Python cqlsh:

  • DESCRIBE CLUSTER
  • DESCRIBE KEYSPACES
  • DESCRIBE KEYSPACE [name]
  • DESCRIBE TABLES
  • DESCRIBE TABLE
  • DESCRIBE SCHEMA
  • DESCRIBE FULL SCHEMA
  • DESCRIBE INDEX
  • DESCRIBE MATERIALIZED VIEW
  • DESCRIBE TYPE / DESCRIBE TYPES
  • DESCRIBE FUNCTION / DESCRIBE FUNCTIONS
  • DESCRIBE AGGREGATE / DESCRIBE AGGREGATES

Structsยง

MvDdlParts ๐Ÿ”’
Parts needed to format a CREATE MATERIALIZED VIEW DDL string.

Functionsยง

describe_aggregate ๐Ÿ”’
DESCRIBE AGGREGATE โ€” show CREATE AGGREGATE statement.
describe_aggregates ๐Ÿ”’
DESCRIBE AGGREGATES โ€” list all UDA names in the current keyspace.
describe_cluster ๐Ÿ”’
DESCRIBE CLUSTER โ€” show cluster name and partitioner.
describe_full_schema ๐Ÿ”’
DESCRIBE FULL SCHEMA โ€” show CREATE statements for ALL keyspaces (including system).
describe_function ๐Ÿ”’
DESCRIBE FUNCTION โ€” show CREATE FUNCTION statement.
describe_functions ๐Ÿ”’
DESCRIBE FUNCTIONS โ€” list all UDF names in the current keyspace.
describe_index ๐Ÿ”’
DESCRIBE INDEX โ€” show CREATE INDEX statement.
describe_keyspace ๐Ÿ”’
DESCRIBE KEYSPACE [name] โ€” show CREATE KEYSPACE statement.
describe_keyspaces ๐Ÿ”’
DESCRIBE KEYSPACES โ€” list all keyspace names.
describe_materialized_view ๐Ÿ”’
DESCRIBE MATERIALIZED VIEW โ€” show CREATE MATERIALIZED VIEW statement.
describe_schema ๐Ÿ”’
DESCRIBE SCHEMA โ€” show CREATE statements for all user keyspaces and their tables.
describe_schema_inner ๐Ÿ”’
Shared implementation for DESCRIBE SCHEMA and DESCRIBE FULL SCHEMA.
describe_table ๐Ÿ”’
DESCRIBE TABLE โ€” show CREATE TABLE statement.
describe_tables ๐Ÿ”’
DESCRIBE TABLES โ€” list tables in the current keyspace.
describe_type ๐Ÿ”’
DESCRIBE TYPE โ€” show CREATE TYPE statement.
describe_types ๐Ÿ”’
DESCRIBE TYPES โ€” list all UDT names in the current keyspace.
execute
Execute a DESCRIBE command and write output.
extract_map_value ๐Ÿ”’
Extract a value from a CQL map string like {'key': 'value', ...}.
format_create_aggregate_ddl ๐Ÿ”’
Format a CREATE AGGREGATE DDL string.
format_create_function_ddl ๐Ÿ”’
Format a CREATE FUNCTION DDL string.
format_create_mv_ddl ๐Ÿ”’
Format a CREATE MATERIALIZED VIEW DDL string.
format_create_type_ddl ๐Ÿ”’
Format a CREATE TYPE DDL string.
format_index_ddl ๐Ÿ”’
Format a CREATE INDEX DDL string.
is_system_keyspace ๐Ÿ”’
Check if a keyspace is a system keyspace.
parse_list_value ๐Ÿ”’
Parse a CQL list string like ['a', 'b', 'c'] or [a, b, c] into a Vec of strings.
quote_if_needed ๐Ÿ”’
Quote an identifier if it needs quoting (contains uppercase, spaces, or reserved words).
resolve_qualified_name ๐Ÿ”’
Resolve a potentially qualified name (ks.name or just name) into (keyspace, name).
strip_quotes ๐Ÿ”’
Strip surrounding single or double quotes from a string.
write_create_table ๐Ÿ”’
Write a CREATE TABLE statement for the given table metadata.