Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]: Right Click on Keyspace - Create Table #545

Open
millerjp opened this issue Nov 3, 2024 · 0 comments
Open

[feat]: Right Click on Keyspace - Create Table #545

millerjp opened this issue Nov 3, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request right click schema schema management issues

Comments

@millerjp
Copy link
Contributor

millerjp commented Nov 3, 2024

Description

Add functionality to create a new table through a right-click context menu on keyspaces, with a guided dialog for table definition and CQL execution.

User Flow

  1. User right-clicks on a keyspace in the tree view
  2. Selects "Create Table" from context menu
  3. Dialog opens with the following steps:
    • Table name input
    • Column definitions
    • CQL review and execution

Technical Requirements

Table Name Validation

  • Must validate table name:
    • Check for existing table names in selected keyspace
    • No spaces allowed
    • No special characters (quotes, etc.)
    • Show validation errors in real-time
    • Disable "Next" button until valid name entered

Column Definition UI

  • Allow multiple column definitions
  • For each column:
    • Column name input (with same validation rules as table name)
    • Data type selector with two distinct sections:
      • Standard Cassandra types
      • UDTs (only shown if UDTs exist in keyspace)
    • Primary key checkbox
    • Clustering key order selector (if clustering key)

CQL Preview & Execution

  • Show generated CQL in editable text area
  • Include CONSISTENCY ALL; by default
  • Allow manual CQL editing
  • Add "Execute" button
  • Show execution results/errors

Error Handling

  • Display appropriate error messages for:
    • Invalid table names
    • Invalid column names
    • CQL execution failures
    • Network/connection issues

UI/UX Considerations

  • Modal dialog with clear step progression
  • Responsive validation feedback
  • Clear separation between standard types and UDTs
  • Intuitive column management (add/remove)
  • Syntax highlighting in CQL preview

Acceptance Criteria

  • Right-click context menu implemented with "Create Table" option
  • Table name validation working correctly
  • Column definition UI with proper data type segregation
  • UDT handling and display
  • CQL preview with syntax highlighting
  • Execution functionality with proper error handling
  • All validation rules enforced
  • Proper error messages displayed

Technical Notes

  • Need to fetch UDT information from keyspace metadata
  • Reuse existing CQL execution components
  • Maintain consistent error handling patterns

Related Issues

  • #544 (Similar dialog implementation reference)
@millerjp millerjp added enhancement New feature or request right click labels Nov 3, 2024
@millerjp millerjp added this to the v1.0.0-release milestone Nov 3, 2024
@millerjp millerjp added the schema schema management issues label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request right click schema schema management issues
Projects
None yet
Development

No branches or pull requests

2 participants