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

Prototype CLI for CRUD operations and more #106

Open
jamesaoverton opened this issue Aug 3, 2024 · 0 comments · May be fixed by #112
Open

Prototype CLI for CRUD operations and more #106

jamesaoverton opened this issue Aug 3, 2024 · 0 comments · May be fixed by #112
Assignees

Comments

@jamesaoverton
Copy link
Member

I would like a CLI for working with tables, rows, columns, and cells.

Here are some ideas and examples of what I have in mind. If you have better ideas, give them a try.

  • for starters we should accept JSON and return JSON like the various VALVE API methods
    • eventually it would be nice to support TSV, CSV, and maybe more
  • user-specified values in the following examples:
    • TABLE is a table name
    • COLUMN is a column name (or label?)
    • ROW is a 'row_number'
    • VALUE is a JSON string
  • get values
    • valve get table TABLE return JSON representation of a table
    • valve get row TABLE ROW return JSON representation of a row
    • valve get cell TABLE ROW COLUMN return a JSON representation of a cell, including messages
    • valve get value TABLE ROW COLUMN return just the cell value
    • valve get messages TABLE ROW COLUMN return cell messages
  • validate values, without inserting; return JSON with validation messages; exit 0 on valid, exit 1 on invalid
    • valve validate row TABLE validate the addition of an input row, without inserting
    • valve validate TABLE ROW validate the replacement of an input row, without inserting
      • ROW isn't necessary if JSON includes 'row_number'?
    • valve validate TABLE ROW COLUMN VALUE validate the replacement of an input value, without inserting
  • add a row to a table; return JSON with validation messages; exit 0 if row was inserted, even if there were validation messages
    • valve add row TABLE
  • add a new table, using use guess functionality for a TSV path
    • valve add table PATH
    • if PATH is script/SQL we need to know the columns somehow?
  • update values in existing rows; return JSON with validation messages; exit 0 if row was updated, even if there were validation messages
    • valve update row TABLE ROW validate the replacement of an input row, without inserting
      • ROW isn't necessary if JSON includes 'row_number'?
    • valve update value TABLE ROW COLUMN VALUE update a single cell value
  • delete rows
    • valve delete row TABLE ROW+ multiple rows? range of rows?
  • work with messages, JSON input representing a message
    • valve add message
    • valve update message
    • valve delete message MESSAGE_ID+
    • work with multiple messages?
  • work with history
    • valve undo / valve redo
    • valve history list (some) of the history table?
  • other ideas
    • add column
    • rename column
    • move column
    • delete table
    • delete column
    • save
    • sort
@lmcmicu lmcmicu linked a pull request Nov 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants