Skip to content

Adding ability to rename a table #3

Description

@Niwer1525

Description:

Currently, the Java API does not support renaming tables. While a workaround exists by executing raw SQLite commands directly, it is not convenient and breaks the abstraction provided by the library.

Proposed change:

Add a rename(String newName) method to the Table class. This method would handle the underlying SQL logic, such as:

-- Check if the table exists
SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='OLD_TABLE_NAME';

-- Execute the rename
ALTER TABLE "OLD_TABLE_NAME" RENAME TO "NEW_NAME";

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions