Skip to content

Enhance to support named schames in spanner-cli commands #172

Description

@apstndb

Currently, there are no handling about named schemas.

I think some commands in spanner-cli that target schema objects need to be extended to support named schemas.
Let's take the SHOW TABLES command as an example.

The current behavior:

  • SHOW TABLES; shows tables only in the default schema.

The proposed behavior:

  • (preserving the current behavior) SHOW TABLES; shows tables only in the default schema.
  • SHOW TABLES <schema>; shows tables only in the schema named schema.

Another considerations

  • SHOW USER TABLES; shows tables in all user generated schemas(without INFORMATION_SCHEMA, SPANNER_SYS. SCHEMA_OWNER != "spanner_system").
  • SHOW SYSTEM TABLES; shows tables in all system generated schemas(SCHEMA_OWNER = "spanner_system").
  • SHOW ALL TABLES; shows tables in all schemas(USER + SYSTEM).
  • SHOW SCHEMAS; shows all schemas.
    • SHOW SCHEMATA may not be user friendly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions